Java 类com.intellij.openapi.editor.actionSystem.EditorAction 实例源码

项目:tools-idea    文件:EditorTextFieldProviderImpl.java   
@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;
}
项目:consulo    文件:EditorTextFieldProviderImpl.java   
@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;
}
项目:intellij-ce-playground    文件:EditorTextFieldActionPromoter.java   
@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;
}
项目:consulo    文件:EditorTextFieldActionPromoter.java   
@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;
}