Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit/src/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/provider/FacetAttributeItemProvider.java')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit/src/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/provider/FacetAttributeItemProvider.java398
1 files changed, 2 insertions, 396 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit/src/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/provider/FacetAttributeItemProvider.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit/src/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/provider/FacetAttributeItemProvider.java
index cb792b0771d..8cc23f5923c 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit/src/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/provider/FacetAttributeItemProvider.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit/src/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/provider/FacetAttributeItemProvider.java
@@ -25,11 +25,10 @@ import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.provider.EAttributeItemProvider;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.EFacetPackage;
import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.FacetAttribute;
@@ -43,7 +42,7 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.query.QueryF
* @generated
*/
public class FacetAttributeItemProvider
- extends ItemProviderAdapter {
+ extends EAttributeItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
@@ -67,23 +66,6 @@ public class FacetAttributeItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addNamePropertyDescriptor(object);
- addOrderedPropertyDescriptor(object);
- addUniquePropertyDescriptor(object);
- addLowerBoundPropertyDescriptor(object);
- addUpperBoundPropertyDescriptor(object);
- addManyPropertyDescriptor(object);
- addRequiredPropertyDescriptor(object);
- addETypePropertyDescriptor(object);
- addChangeablePropertyDescriptor(object);
- addVolatilePropertyDescriptor(object);
- addTransientPropertyDescriptor(object);
- addDefaultValueLiteralPropertyDescriptor(object);
- addDefaultValuePropertyDescriptor(object);
- addUnsettablePropertyDescriptor(object);
- addDerivedPropertyDescriptor(object);
- addIDPropertyDescriptor(object);
- addEAttributeTypePropertyDescriptor(object);
addDocumentationPropertyDescriptor(object);
addCategoriesPropertyDescriptor(object);
addOverridePropertyDescriptor(object);
@@ -92,363 +74,6 @@ public class FacetAttributeItemProvider
}
/**
- * This adds a property descriptor for the Name feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ENamedElement_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ENamedElement_name_feature", "_UI_ENamedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ENAMED_ELEMENT__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Ordered feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addOrderedPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ETypedElement_ordered_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ETypedElement_ordered_feature", "_UI_ETypedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ETYPED_ELEMENT__ORDERED,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Unique feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addUniquePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ETypedElement_unique_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ETypedElement_unique_feature", "_UI_ETypedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ETYPED_ELEMENT__UNIQUE,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Lower Bound feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addLowerBoundPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ETypedElement_lowerBound_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ETypedElement_lowerBound_feature", "_UI_ETypedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ETYPED_ELEMENT__LOWER_BOUND,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Upper Bound feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addUpperBoundPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ETypedElement_upperBound_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ETypedElement_upperBound_feature", "_UI_ETypedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ETYPED_ELEMENT__UPPER_BOUND,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Many feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addManyPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ETypedElement_many_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ETypedElement_many_feature", "_UI_ETypedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ETYPED_ELEMENT__MANY,
- false,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Required feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addRequiredPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ETypedElement_required_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ETypedElement_required_feature", "_UI_ETypedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ETYPED_ELEMENT__REQUIRED,
- false,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the EType feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addETypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ETypedElement_eType_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ETypedElement_eType_feature", "_UI_ETypedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ETYPED_ELEMENT__ETYPE,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Changeable feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addChangeablePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EStructuralFeature_changeable_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeature_changeable_feature", "_UI_EStructuralFeature_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ESTRUCTURAL_FEATURE__CHANGEABLE,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Volatile feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addVolatilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EStructuralFeature_volatile_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeature_volatile_feature", "_UI_EStructuralFeature_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ESTRUCTURAL_FEATURE__VOLATILE,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Transient feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addTransientPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EStructuralFeature_transient_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeature_transient_feature", "_UI_EStructuralFeature_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ESTRUCTURAL_FEATURE__TRANSIENT,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Default Value Literal feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addDefaultValueLiteralPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EStructuralFeature_defaultValueLiteral_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeature_defaultValueLiteral_feature", "_UI_EStructuralFeature_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ESTRUCTURAL_FEATURE__DEFAULT_VALUE_LITERAL,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Default Value feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addDefaultValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EStructuralFeature_defaultValue_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeature_defaultValue_feature", "_UI_EStructuralFeature_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ESTRUCTURAL_FEATURE__DEFAULT_VALUE,
- false,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Unsettable feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addUnsettablePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EStructuralFeature_unsettable_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeature_unsettable_feature", "_UI_EStructuralFeature_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ESTRUCTURAL_FEATURE__UNSETTABLE,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Derived feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addDerivedPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EStructuralFeature_derived_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeature_derived_feature", "_UI_EStructuralFeature_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.ESTRUCTURAL_FEATURE__DERIVED,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the ID feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addIDPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EAttribute_iD_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EAttribute_iD_feature", "_UI_EAttribute_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.EATTRIBUTE__ID,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the EAttribute Type feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addEAttributeTypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_EAttribute_eAttributeType_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EAttribute_eAttributeType_feature", "_UI_EAttribute_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EcorePackage.Literals.EATTRIBUTE__EATTRIBUTE_TYPE,
- false,
- false,
- false,
- null,
- null,
- null));
- }
-
- /**
* This adds a property descriptor for the Documentation feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -524,8 +149,6 @@ public class FacetAttributeItemProvider
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
- childrenFeatures.add(EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS);
- childrenFeatures.add(EcorePackage.Literals.ETYPED_ELEMENT__EGENERIC_TYPE);
childrenFeatures.add(EFacetPackage.Literals.DERIVED_TYPED_ELEMENT__QUERY);
}
return childrenFeatures;
@@ -585,26 +208,9 @@ public class FacetAttributeItemProvider
updateChildren(notification);
switch (notification.getFeatureID(FacetAttribute.class)) {
- case EFacetPackage.FACET_ATTRIBUTE__NAME:
- case EFacetPackage.FACET_ATTRIBUTE__ORDERED:
- case EFacetPackage.FACET_ATTRIBUTE__UNIQUE:
- case EFacetPackage.FACET_ATTRIBUTE__LOWER_BOUND:
- case EFacetPackage.FACET_ATTRIBUTE__UPPER_BOUND:
- case EFacetPackage.FACET_ATTRIBUTE__MANY:
- case EFacetPackage.FACET_ATTRIBUTE__REQUIRED:
- case EFacetPackage.FACET_ATTRIBUTE__CHANGEABLE:
- case EFacetPackage.FACET_ATTRIBUTE__VOLATILE:
- case EFacetPackage.FACET_ATTRIBUTE__TRANSIENT:
- case EFacetPackage.FACET_ATTRIBUTE__DEFAULT_VALUE_LITERAL:
- case EFacetPackage.FACET_ATTRIBUTE__DEFAULT_VALUE:
- case EFacetPackage.FACET_ATTRIBUTE__UNSETTABLE:
- case EFacetPackage.FACET_ATTRIBUTE__DERIVED:
- case EFacetPackage.FACET_ATTRIBUTE__ID:
case EFacetPackage.FACET_ATTRIBUTE__DOCUMENTATION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case EFacetPackage.FACET_ATTRIBUTE__EANNOTATIONS:
- case EFacetPackage.FACET_ATTRIBUTE__EGENERIC_TYPE:
case EFacetPackage.FACET_ATTRIBUTE__QUERY:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;

Back to the top