Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }