- Common ways to obtain EStructuralFeature
private void myMethod () {EStructuralFeature e =
ItemProviderAdapter zuper;zuper.getChildFeature(object, child)
EClass eClass;String featureName;eClass.getEStructuralFeature(featureName)
FeatureMap.Entry entry;entry.getEStructuralFeature()
- Smart code suggestions by Codota
}
private static void fixedDefaultValues(PropertiesPackageImpl thePropertiesPackage) { //fix the workaround spaces in the defaults EStructuralFeature excludes = thePropertiesPackage.scanConfigurationEClass.getEStructuralFeature(SCAN_CONFIGURATION__EXCLUDE); if(excludes.getDefaultValueLiteral()!=null) { String exclude = excludes.getDefaultValueLiteral().replace(" ", ""); exclude = exclude.replace("\\\\", "\\"); excludes.setDefaultValueLiteral(exclude); } EStructuralFeature includes = thePropertiesPackage.scanConfigurationEClass.getEStructuralFeature(SCAN_CONFIGURATION__INCLUDE); if(includes.getDefaultValueLiteral()!=null) { String include = includes.getDefaultValueLiteral().replace(" ", ""); include = include.replace("\\\\", "\\"); includes.setDefaultValueLiteral(include); } }
public static void initEStructuralFeature(final EStructuralFeature s, final EClassifier type, final String name, final String defaultValue, final int lowerBound, final int upperBound, final Class containerClass, final boolean isTransient, final boolean isVolatile, final boolean isChangeable, final boolean isUnsettable, final boolean isUnique, final boolean isDerived, final boolean isOrdered) { s.setName(name); ((EStructuralFeatureImpl) s).setContainerClass(containerClass); s.setTransient(isTransient); s.setVolatile(isVolatile); s.setChangeable(isChangeable); s.setUnsettable(isUnsettable); s.setUnique(isUnique); s.setDerived(isDerived); s.setOrdered(isOrdered); s.setLowerBound(lowerBound); s.setUpperBound(upperBound); s.setEType(type); if (defaultValue != null) { s.setDefaultValueLiteral(defaultValue); } }
if (defaultValue != null) s.setDefaultValueLiteral(defaultValue); if (defaultValue != null) s.setDefaultValueLiteral(defaultValue);
if (defaultValue != null) s.setDefaultValueLiteral(defaultValue); if (defaultValue != null) s.setDefaultValueLiteral(defaultValue);