コード例 #1
0
 public void addAllTypes(org.eclipse.ocl.pivot.@NonNull Package pkge) {
   if (accepts(PivotPackage.Literals.CLASS)) {
     CompletePackage completePackage =
         environmentFactory.getMetamodelManager().getCompletePackage(pkge);
     String name2 = name;
     if (name2 != null) {
       org.eclipse.ocl.pivot.Class type = completePackage.getMemberType(name2);
       if (type != null) {
         addNamedElement(type);
       } else {
         completePackage = environmentFactory.getCompleteModel().getPrimitiveCompletePackage();
         type = completePackage.getMemberType(name2);
         if (type != null) {
           addNamedElement(type);
         }
       }
     } else {
       for (CompleteClass completeClass : completePackage.getOwnedCompleteClasses()) {
         addNamedElement(completeClass.getPrimaryClass());
       }
       completePackage = environmentFactory.getCompleteModel().getPrimitiveCompletePackage();
       for (CompleteClass completeClass : completePackage.getOwnedCompleteClasses()) {
         addNamedElement(completeClass.getPrimaryClass());
       }
     }
   }
 }
コード例 #2
0
 public void addAllOperations(
     org.eclipse.ocl.pivot.@NonNull Class type, @Nullable FeatureFilter featureFilter) {
   if (accepts(
           PivotPackage.Literals.ITERATION) // If ITERATION is acceptable then so too is OPERATION
       && (requiredType
           != PivotPackage.Literals
               .NAMESPACE)) { // Don't really want operations when looking for NAMESPACE
     assert environmentFactory.getMetamodelManager().isTypeServeable(type);
     type = PivotUtil.getUnspecializedTemplateableElement(type);
     CompleteClass completeClass = environmentFactory.getMetamodelManager().getCompleteClass(type);
     String name2 = name;
     if (name2 != null) {
       for (Operation operation : completeClass.getOperations(featureFilter, name2)) {
         if ((operation != null) /*&& (operation.isStatic() == selectStatic)*/) {
           addElement(name2, operation);
         }
       }
     } else {
       for (Operation operation : completeClass.getOperations(featureFilter)) {
         if ((operation != null) /*&& (operation.isStatic() == selectStatic)*/) {
           addNamedElement(operation);
         }
       }
     }
   }
 }
コード例 #3
0
 public void addAllStates(@NonNull Type type) {
   if (accepts(PivotPackage.Literals.STATE)) {
     assert environmentFactory.getMetamodelManager().isTypeServeable(type);
     CompleteClass completeClass = environmentFactory.getCompleteModel().getCompleteClass(type);
     String name2 = name;
     if (name2 != null) {
       for (State state : completeClass.getStates(name2)) {
         if (state != null) {
           addNamedElement(state);
         }
       }
     } else {
       for (State state : completeClass.getStates()) {
         if (state != null) {
           addNamedElement(state);
         }
       }
     }
   }
 }
コード例 #4
0
 public void addAllProperties(
     org.eclipse.ocl.pivot.@NonNull Class type, @Nullable FeatureFilter featureFilter) {
   if (accepts(PivotPackage.Literals.PROPERTY)
       && (requiredType
           != PivotPackage.Literals
               .NAMESPACE)) { // Don't really want properties when looking for NAMESPACE
     assert environmentFactory.getMetamodelManager().isTypeServeable(type);
     CompleteClass completeClass = environmentFactory.getMetamodelManager().getCompleteClass(type);
     String name2 = name;
     if (name2 != null) {
       for (Property property : completeClass.getProperties(featureFilter, name2)) {
         if (property != null) {
           addNamedElement(property);
         }
       }
     } else {
       for (Property property : completeClass.getProperties(featureFilter)) {
         if (property != null) {
           addNamedElement(property);
         }
       }
     }
   }
 }