com.intellij.openapi.editor.actionSystem.EditorAction Java Examples
The following examples show how to use
com.intellij.openapi.editor.actionSystem.EditorAction.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EditorTextFieldProviderImpl.java From consulo with Apache License 2.0 | 6 votes |
@Override public int compare(AnAction o1, AnAction o2) { if (o1 instanceof EditorAction && o2 instanceof EditorAction) { return 0; } if (o1 instanceof TextComponentEditorAction) { return -1; } if (o2 instanceof TextComponentEditorAction) { return 1; } if (o1 instanceof EditorAction) { return 1; } if (o2 instanceof EditorAction) { return -1; } return 0; }
Example #2
Source File: EditorTextFieldActionPromoter.java From consulo with Apache License 2.0 | 5 votes |
@Override public int compare(AnAction o1, AnAction o2) { boolean textFieldAction1 = o1 instanceof TextComponentEditorAction; boolean textFieldAction2 = o2 instanceof TextComponentEditorAction; boolean plainEditorAction1 = o1 instanceof EditorAction && !textFieldAction1; boolean plainEditorAction2 = o2 instanceof EditorAction && !textFieldAction2; if (textFieldAction1 && plainEditorAction2) return -1; if (textFieldAction2 && plainEditorAction1) return 1; return 0; }