Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two issues fixed #13

Merged
merged 2 commits into from
Nov 8, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.intellij.openapi.fileEditor.FileEditorPolicy;
import com.intellij.openapi.fileEditor.FileEditorProvider;
import com.intellij.openapi.fileEditor.FileEditorState;
import com.intellij.openapi.project.PossiblyDumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import org.jdom.Element;
Expand All @@ -28,7 +29,7 @@
import vietj.intellij.asciidoc.file.AsciiDocFileType;

/** @author Julien Viet */
public class AsciiDocPreviewEditorProvider implements FileEditorProvider {
public class AsciiDocPreviewEditorProvider implements FileEditorProvider, PossiblyDumbAware {

/** The id of the editors provided by this {@link FileEditorProvider}. */
public static final String EDITOR_TYPE_ID = AsciiDocLanguage.LANGUAGE_NAME + "PreviewEditor";
Expand Down Expand Up @@ -110,11 +111,18 @@ public String getEditorTypeId() {

/**
* Get the {@link FileEditorPolicy} defining how to show editors created via the {@link FileEditorProvider}.
*
* @return {@link FileEditorPolicy#NONE}
*/
@NotNull
public FileEditorPolicy getPolicy() {
return FileEditorPolicy.NONE;
return FileEditorPolicy.PLACE_AFTER_DEFAULT_EDITOR;
}

/**
* Indicates the editor can be created while background indexing is running.
*
* @return {@code true}
*/
public boolean isDumbAware() {
return true;
}
}