コード例 #1
0
 protected boolean collectActionData(AnActionEvent event, final Map<String, Object> _params) {
   if (!(super.collectActionData(event, _params))) {
     return false;
   }
   {
     SNode node = event.getData(MPSCommonDataKeys.NODE);
     if (node != null) {}
     MapSequence.fromMap(_params).put("node", node);
   }
   if (MapSequence.fromMap(_params).get("node") == null) {
     return false;
   }
   MapSequence.fromMap(_params).put("frame", event.getData(MPSCommonDataKeys.FRAME));
   if (MapSequence.fromMap(_params).get("frame") == null) {
     return false;
   }
   MapSequence.fromMap(_params).put("ideaProject", event.getData(CommonDataKeys.PROJECT));
   if (MapSequence.fromMap(_params).get("ideaProject") == null) {
     return false;
   }
   MapSequence.fromMap(_params)
       .put("operationContext", event.getData(MPSCommonDataKeys.OPERATION_CONTEXT));
   if (MapSequence.fromMap(_params).get("operationContext") == null) {
     return false;
   }
   {
     EditorComponent editorComponent = event.getData(MPSEditorDataKeys.EDITOR_COMPONENT);
     if (editorComponent != null && editorComponent.isInvalid()) {
       editorComponent = null;
     }
     MapSequence.fromMap(_params).put("editorComponent", editorComponent);
   }
   if (MapSequence.fromMap(_params).get("editorComponent") == null) {
     return false;
   }
   MapSequence.fromMap(_params).put("project", event.getData(MPSCommonDataKeys.MPS_PROJECT));
   if (MapSequence.fromMap(_params).get("project") == null) {
     return false;
   }
   return true;
 }
コード例 #2
0
 @Override
 protected boolean collectActionData(AnActionEvent event, final Map<String, Object> _params) {
   if (!(super.collectActionData(event, _params))) {
     return false;
   }
   {
     EditorComponent editorComponent = event.getData(MPSEditorDataKeys.EDITOR_COMPONENT);
     if (editorComponent != null && editorComponent.isInvalid()) {
       editorComponent = null;
     }
     MapSequence.fromMap(_params).put("editorComponent", editorComponent);
     if (editorComponent == null) {
       return false;
     }
   }
   {
     EditorCell p = event.getData(MPSEditorDataKeys.EDITOR_CELL);
     MapSequence.fromMap(_params).put("cell", p);
     if (p == null) {
       return false;
     }
   }
   {
     IOperationContext p = event.getData(MPSCommonDataKeys.OPERATION_CONTEXT);
     MapSequence.fromMap(_params).put("context", p);
     if (p == null) {
       return false;
     }
   }
   {
     SNode p = event.getData(MPSCommonDataKeys.NODE);
     MapSequence.fromMap(_params).put("node", p);
     if (p == null) {
       return false;
     }
   }
   return true;
 }
コード例 #3
0
ファイル: Escape_Action.java プロジェクト: norro/MPS
 @Override
 protected boolean collectActionData(AnActionEvent event, final Map<String, Object> _params) {
   if (!(super.collectActionData(event, _params))) {
     return false;
   }
   {
     EditorComponent editorComponent = event.getData(MPSEditorDataKeys.EDITOR_COMPONENT);
     if (editorComponent != null && editorComponent.isInvalid()) {
       editorComponent = null;
     }
     MapSequence.fromMap(_params).put("editorComponent", editorComponent);
     if (editorComponent == null) {
       return false;
     }
   }
   {
     Boolean p = event.getData(PlatformDataKeys.IS_MODAL_CONTEXT);
     MapSequence.fromMap(_params).put("isModalContext", p);
     if (p == null) {
       return false;
     }
   }
   return true;
 }