當前位置: 首頁>>代碼示例>>Java>>正文


Java FormEditingUtil.getEditorFromContext方法代碼示例

本文整理匯總了Java中com.intellij.uiDesigner.FormEditingUtil.getEditorFromContext方法的典型用法代碼示例。如果您正苦於以下問題:Java FormEditingUtil.getEditorFromContext方法的具體用法?Java FormEditingUtil.getEditorFromContext怎麽用?Java FormEditingUtil.getEditorFromContext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.uiDesigner.FormEditingUtil的用法示例。


在下文中一共展示了FormEditingUtil.getEditorFromContext方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: actionPerformed

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public final void actionPerformed(final AnActionEvent e) {
  final GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  if (editor != null) {
    final ArrayList<RadComponent> selection = FormEditingUtil.getSelectedComponents(editor);
    if (myModifying) {
      if (!editor.ensureEditable()) return;
    }
    Runnable runnable = new Runnable() {
      public void run() {
        actionPerformed(editor, selection, e);
        if (myModifying) {
          editor.refreshAndSave(true);
        }
      }
    };
    if (getCommandName() != null) {
      CommandProcessor.getInstance().executeCommand(editor.getProject(), runnable, getCommandName(), null);
    }
    else {
      runnable.run();
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:24,代碼來源:AbstractGuiEditorAction.java

示例2: update

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
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());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:ExpandSelectionAction.java

示例3: update

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public final void update(AnActionEvent e) {
  GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  if (editor == null) {
    e.getPresentation().setVisible(false);
    e.getPresentation().setEnabled(false);
  }
  else {
    e.getPresentation().setVisible(true);
    e.getPresentation().setEnabled(true);
    final ArrayList<RadComponent> selection = FormEditingUtil.getSelectedComponents(editor);
    update(editor, selection, e);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:AbstractGuiEditorAction.java

示例4: actionPerformed

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public void actionPerformed(final AnActionEvent e) {
  GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  CaptionSelection selection = CaptionSelection.DATA_KEY.getData(e.getDataContext());
  if (editor == null || selection == null || !editor.ensureEditable()) {
    return;
  }
  actionPerformed(selection);
  selection.getContainer().revalidate();
  editor.refreshAndSave(true);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:RowColumnAction.java

示例5: actionPerformed

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public void actionPerformed(final AnActionEvent e) {
  final GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  CaptionSelection selection = CaptionSelection.DATA_KEY.getData(e.getDataContext());
  if (editor == null || selection == null || selection.getFocusedIndex() < 0) return;
  FormEditingUtil.deleteRowOrColumn(editor, selection.getContainer(), selection.getSelection(), selection.isRow());
  selection.getContainer().revalidate();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:8,代碼來源:DeleteAction.java

示例6: update

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
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 Stack<ComponentPtr[]> history = editor.getSelectionState().getSelectionHistory();
  presentation.setEnabled(history.size() > 1);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:12,代碼來源:ShrinkSelectionAction.java

示例7: update

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public void update(final AnActionEvent e) {
  super.update(e);
  GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  e.getPresentation().setEnabled(editor != null);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:ShowGridAction.java

示例8: isSelected

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public boolean isSelected(AnActionEvent e) {
  GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  return editor != null && editor.isShowGrid();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:ShowGridAction.java

示例9: setSelected

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public void setSelected(AnActionEvent e, boolean state) {
  GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  if (editor != null) {
    editor.setShowGrid(state);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:ShowGridAction.java

示例10: isSelected

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public boolean isSelected(AnActionEvent e) {
  GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  return editor != null && editor.isShowComponentTags();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:ShowComponentTagsAction.java

示例11: setSelected

import com.intellij.uiDesigner.FormEditingUtil; //導入方法依賴的package包/類
public void setSelected(AnActionEvent e, boolean state) {
  GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
  if (editor != null) {
    editor.setShowComponentTags(state);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:ShowComponentTagsAction.java


注:本文中的com.intellij.uiDesigner.FormEditingUtil.getEditorFromContext方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。