本文整理汇总了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();
}
}
}
示例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());
}
示例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);
}
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例8: isSelected
import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
public boolean isSelected(AnActionEvent e) {
GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
return editor != null && editor.isShowGrid();
}
示例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);
}
}
示例10: isSelected
import com.intellij.uiDesigner.FormEditingUtil; //导入方法依赖的package包/类
public boolean isSelected(AnActionEvent e) {
GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
return editor != null && editor.isShowComponentTags();
}
示例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);
}
}