コード例 #1
0
 @Override
 public boolean canExecute() {
   if (!super.canExecute()) {
     return false;
   }
   ObjectTemplateExp pivotElement =
       PivotUtil.getPivot(ObjectTemplateExp.class, csElement.getObjectTemplate());
   if (pivotElement == null) {
     return false;
   }
   Type type = pivotElement.getType();
   return type != null;
 }
コード例 #2
0
 @Override
 public BasicContinuation<?> execute() {
   ObjectTemplateExp pivotElement = PivotUtil.getPivot(ObjectTemplateExp.class, csElement);
   if (pivotElement != null) {
     org.eclipse.ocl.examples.pivot.Class type =
         PivotUtil.getPivot(org.eclipse.ocl.examples.pivot.Class.class, csElement.getType());
     pivotElement.setReferredClass(type);
     pivotElement.setType(type);
     Variable variable = pivotElement.getBindsTo();
     if (variable != null) {
       variable.setType(type);
     }
   }
   return null;
 }