Java 类com.intellij.uiDesigner.SelectionState 实例源码

项目:consulo-ui-designer    文件:ExpandSelectionAction.java   
@Override
public void update(final AnActionEvent e)
{
    final Presentation presentation = e.getPresentation();
    final GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());

    if(editor == null)
    {
        presentation.setEnabled(false);
        return;
    }

    final SelectionState selectionState = editor.getSelectionState();
    selectionState.setInsideChange(true);
    final Stack<ComponentPtr[]> history = selectionState.getSelectionHistory();

    presentation.setEnabled(!history.isEmpty());
}
项目:intellij-ce-playground    文件:ExpandSelectionAction.java   
public void update(final AnActionEvent e) {
  final Presentation presentation = e.getPresentation();
  final GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());

  if(editor == null){
    presentation.setEnabled(false);
    return;
  }

  final SelectionState selectionState = editor.getSelectionState();
  selectionState.setInsideChange(true);
  final Stack<ComponentPtr[]> history = selectionState.getSelectionHistory();

  presentation.setEnabled(!history.isEmpty());
}