コード例 #1
0
ファイル: TypeSystemStateTree.java プロジェクト: yan96in/MPS
 @Override
 @Nullable
 public Object getData(@NonNls String id) {
   TypeSystemStateTreeNode currentNode = (TypeSystemStateTreeNode) this.getCurrentNode();
   if (id.equals(MPSDataKeys.RULE_MODEL_AND_ID.getName())) {
     String ruleModel = currentNode.getRuleModel();
     String ruleId = currentNode.getRuleId();
     if (ruleModel == null || ruleId == null) {
       return null;
     }
     return new Pair<String, String>(ruleModel, ruleId);
   }
   return null;
 }
コード例 #2
0
 @Nullable
 public Object getData(@NonNls String id) {
   TypeSystemStateTreeNode currentNode = (TypeSystemStateTreeNode) this.getCurrentNode();
   if (id.equals(MPSCommonDataKeys.OPERATION_CONTEXT.getName())) {
     return myOperationContext;
   }
   if (id.equals(MPSDataKeys.RULE_MODEL_AND_ID.getName())) {
     String ruleModel = currentNode.getRuleModel();
     String ruleId = currentNode.getRuleId();
     if (ruleModel == null || ruleId == null) {
       return null;
     }
     return new Pair<String, String>(ruleModel, ruleId);
   }
   return null;
 }