Beispiel #1
0
 @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;
 }
 @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;
 }