public virtual Environment getEnvironmentWithoutParents() { if (isDirty || this.environmentWithoutParents == null) { this.environmentWithoutParents = EnvironmentFactoryManager.getInstance(this.getModel().getOclPackage()).getEnvironmentInstance(); populateEnvironment(this.environmentWithoutParents); isDirty = false; } return(this.environmentWithoutParents); }
public override Environment getEnvironmentWithoutParents() { if (getIsDirty() || this.environmentWithoutParents == null) { try { this.environmentWithoutParents = EnvironmentFactoryManager.getInstance(this.getOclPackage()).getEnvironmentInstance(); this.environmentWithoutParents = this.environmentWithoutParents.addEnvironment(OclTypesDefinition.getEnvironment()); populateEnvironment(this.environmentWithoutParents); isDirty = false; } catch (NameClashException e) { Console.WriteLine(e.StackTrace); } } return(this.environmentWithoutParents); }
private static void loadTypesDefinitions() { if (oclTypesEnvironment == null) { XmiReader reader = new XmiReader(@"C:\Repos\SheetModel\Ocl20\resource\metamodels\oclPrimitiveTypes.xml"); oclTypesModel = reader.getMetamodel(); if (oclTypesModel != null) { if (oclPackage == null) { oclPackage = new Ocl20PackageImpl(); } oclTypesEnvironment = EnvironmentFactoryManager.getInstance(oclPackage).getEnvironmentInstance(); oclTypesModel.setOclPackage(oclPackage); oclTypesModel.populateEnvironment(oclTypesEnvironment); } } }
private Environment getEnvironmentWithoutAncestors() { if (isDirty || envWithoutAncestors == null) { this.envWithoutAncestors = EnvironmentFactoryManager.getInstance(this.getModel().getOclPackage()).getEnvironmentInstance(); populateWithFeatures(envWithoutAncestors); populateWithAssociationEnds(envWithoutAncestors); populateWithAssociationClasses(envWithoutAncestors); populateWithDefinedFeatures(envWithoutAncestors); if (isDirty) { base.resetEnvironments(); } isDirty = false; } return(envWithoutAncestors); }
public Environment getEnvironmentWithParents() { if (isDirty || this.environmentWithParents == null) { try { this.environmentWithParents = EnvironmentFactoryManager.getInstance(this.getModel().getOclPackage()).getEnvironmentInstance(); this.environmentWithParents = this.environmentWithParents.addEnvironment(getEnvironmentWithoutParents()); } catch (NameClashException) { // in this particular situation, there will be no name clash } CoreModelElement owner = this.getElemOwner(); if (owner != null && owner is CoreNamespaceImpl) { this.environmentWithParents.setParent(((CoreNamespace)owner).getEnvironmentWithParents()); } isDirty = false; } return(this.environmentWithParents); }