mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-92422 Unable to Annotate plain text files
When the UI Designer plugin is disabled, it doesn't register its own FileType, thus StdFileTypes.GUI_DESIGNER_FORM is precalculated as plain text. Anyway, here is no reason anymore to prohibit Annotate on UI Designer forms, because there is a tab with XML, and annotate is perfectly valid for the XML. This change undoes the change made for IDEA-34646.
This commit is contained in:
@@ -26,8 +26,6 @@ import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.fileEditor.FileEditor;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileEditor.TextEditor;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
import com.intellij.openapi.localVcs.UpToDateLineNumberProvider;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
@@ -93,9 +91,8 @@ public class AnnotateToggleAction extends ToggleAction implements DumbAware, Ann
|
||||
return hasTextEditor(file);
|
||||
}
|
||||
|
||||
private static boolean hasTextEditor(VirtualFile selectedFile) {
|
||||
FileType fileType = selectedFile.getFileType();
|
||||
return !fileType.isBinary() && fileType != StdFileTypes.GUI_DESIGNER_FORM;
|
||||
private static boolean hasTextEditor(@NotNull VirtualFile selectedFile) {
|
||||
return !selectedFile.getFileType().isBinary();
|
||||
}
|
||||
|
||||
public boolean isSelected(AnActionEvent e) {
|
||||
|
||||
Reference in New Issue
Block a user