public static Hashtable<String, Object> getChoiceOfValues( EObject object, EStructuralFeature feature) { ExtendedPropertiesAdapter adapter = (ExtendedPropertiesAdapter) AdapterUtil.adapt(object, ExtendedPropertiesAdapter.class); if (adapter != null) return adapter.getFeatureDescriptor(feature).getChoiceOfValues(object); return null; }
public static String getText(EObject object, EStructuralFeature feature) { if (feature == null) return getText(object); ExtendedPropertiesAdapter adapter = (ExtendedPropertiesAdapter) AdapterUtil.adapt(object, ExtendedPropertiesAdapter.class); if (adapter != null) return adapter.getFeatureDescriptor(feature).getText(object); return getDisplayName(object, feature); }
public static String getLabel(EObject object, EStructuralFeature feature) { String label = ""; ExtendedPropertiesAdapter adapter = (ExtendedPropertiesAdapter) AdapterUtil.adapt(object, ExtendedPropertiesAdapter.class); if (adapter != null) label = adapter.getFeatureDescriptor(feature).getLabel(object); else label = ModelUtil.toDisplayName(feature.getName()); label = label.replaceAll(" Ref$", ""); return label; }
public static EObject createObject(EObject object, EStructuralFeature feature, EClass eclass) { ExtendedPropertiesAdapter adapter = (ExtendedPropertiesAdapter) AdapterUtil.adapt(object, ExtendedPropertiesAdapter.class); if (adapter != null) return adapter.getFeatureDescriptor(feature).createObject(object, eclass); return null; }
public static boolean getIsMultiLine(EObject object, EStructuralFeature feature) { ExtendedPropertiesAdapter adapter = (ExtendedPropertiesAdapter) AdapterUtil.adapt(object, ExtendedPropertiesAdapter.class); if (adapter != null) return adapter.getFeatureDescriptor(feature).isMultiLine(object); return false; }