public List<GenFeature> getAllGenFeatures() { List<GenFeature> result = new ArrayList<GenFeature>(); // Any features from one package that delegate to features in another. // List<GenFeature> delegated = new ArrayList<GenFeature>(); for (GenPackage genPackage : getAllGenAndUsedGenPackagesWithClassifiers()) { if (genPackage.getGenModel() == this || !genPackage.getGenModel().hasEditSupport()) { for (GenFeature genFeature : genPackage.getAllGenFeatures()) { List<GenFeature> addTo = genFeature.getGenPackage() == genPackage ? result : delegated; addTo.add(genFeature); } } } // If there are features delegating across packages, add only those that aren't already being generated. // if (!delegated.isEmpty()) { addNonDuplicates(result, delegated, null); } return result; }
public List<GenFeature> getAllGenFeatures() { List<GenFeature> result = new ArrayList<GenFeature>(); // Any features from one package that delegate to features in another. // List<GenFeature> delegated = new ArrayList<GenFeature>(); for (GenPackage genPackage : getAllGenAndUsedGenPackagesWithClassifiers()) { if (genPackage.getGenModel() == this || !genPackage.getGenModel().hasEditSupport()) { for (GenFeature genFeature : genPackage.getAllGenFeatures()) { List<GenFeature> addTo = genFeature.getGenPackage() == genPackage ? result : delegated; addTo.add(genFeature); } } } // If there are features delegating across packages, add only those that aren't already being generated. // if (!delegated.isEmpty()) { addNonDuplicates(result, delegated, null); } return result; }
public static String getFeatureLiteral(final GenFeature genFeature, final ResourceSet resourceSet) { boolean _isLiteralsInterface = genFeature.getGenPackage().isLiteralsInterface(); if (_isLiteralsInterface) { String _featureID = genFeature.getGenClass().getFeatureID(genFeature); return ("Literals." + _featureID); } else { String _featureAccessorName = genFeature.getFeatureAccessorName(); String _plus = ("eINSTANCE.get" + _featureAccessorName); return (_plus + "()"); } }
if (childCreationData.delegatedFeature != null && childCreationData.delegatedFeature.getGenPackage() == this || childCreationData.createClassifier.getGenPackage() == this && (childCreationData.delegatedFeature == null || allUsedGenPackagesWithClassifiers.contains(childCreationData.delegatedFeature.getGenPackage())))
if (reverseGenFeature != null) initializationDependencies.add(reverseGenFeature.getGenPackage()); initializationDependencies.add(keyFeature.getGenPackage()); if (delegateFeature != null) initializationDependencies.add(delegateFeature.getGenPackage());
String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()"; stringBuffer.append(TEXT_313); stringBuffer.append(genFeature.getFeatureAccessorName()); stringBuffer.append(genFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_335); stringBuffer.append(genPackage.getPackageInstanceVariable(keyFeature.getGenPackage())); stringBuffer.append(TEXT_336); stringBuffer.append(keyFeature.getFeatureAccessorName());
String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()"; stringBuffer.append(TEXT_236); stringBuffer.append(genFeature.getFeatureAccessorName()); stringBuffer.append(genFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_240); stringBuffer.append(genPackage.getPackageInstanceVariable(keyFeature.getGenPackage())); stringBuffer.append(TEXT_225); stringBuffer.append(keyFeature.getFeatureAccessorName());
if (reverseGenFeature != null) initializationDependencies.add(reverseGenFeature.getGenPackage()); initializationDependencies.add(keyFeature.getGenPackage()); if (delegateFeature != null) initializationDependencies.add(delegateFeature.getGenPackage());