Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/ComponentTypeItemProvider.java')
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/ComponentTypeItemProvider.java263
1 files changed, 130 insertions, 133 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/ComponentTypeItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/ComponentTypeItemProvider.java
index 741452067..96baac37a 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/ComponentTypeItemProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/ComponentTypeItemProvider.java
@@ -34,20 +34,18 @@ import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
/**
- * This is the item provider adapter for a
- * {@link org.eclipse.jst.jsf.facesconfig.emf.ComponentType} object.
+ * This is the item provider adapter for a {@link org.eclipse.jst.jsf.facesconfig.emf.ComponentType} object.
* <!-- begin-user-doc -->
* @extends ITableItemLabelProvider
* <!-- end-user-doc -->
- *
* @generated
*/
public class ComponentTypeItemProvider extends ItemProviderAdapter implements
IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider {
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
public static final String copyright = "Copyright (c) 2005, 2006 IBM Corporation and others"; //$NON-NLS-1$
/**
@@ -58,25 +56,24 @@ public class ComponentTypeItemProvider extends ItemProviderAdapter implements
* @generated
*/
public ComponentTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
+ super(adapterFactory);
+ }
/**
- * This returns the property descriptors for the adapted class.
+ * This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
*
* <!-- end-user-doc -->
- *
* @generated
*/
public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
- addIdPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
+ addIdPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
/**
* @param object
@@ -110,71 +107,71 @@ public class ComponentTypeItemProvider extends ItemProviderAdapter implements
/**
- * This adds a property descriptor for the Id feature.
- * <!-- begin-user-doc -->
+ * This adds a property descriptor for the Id feature.
+ * <!-- begin-user-doc -->
* @param object
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated NOT
+ */
protected void addIdPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ComponentType_id_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ComponentType_id_feature", "_UI_ComponentType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- FacesConfigPackage.Literals.COMPONENT_TYPE__ID,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ComponentType_id_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_ComponentType_id_feature", "_UI_ComponentType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FacesConfigPackage.Literals.COMPONENT_TYPE__ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
/**
- * This specifies how to implement {@link #getChildren(Object)} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand(Object, org.eclipse.emf.edit.domain.EditingDomain, Class, org.eclipse.emf.edit.command.CommandParameter)}.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
public Collection getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__DESCRIPTION);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__DISPLAY_NAME);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__ICON);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_TYPE);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_CLASS);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__FACET);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__ATTRIBUTE);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__PROPERTY);
- childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_EXTENSION);
- }
- return childrenFeatures;
- }
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__DESCRIPTION);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__DISPLAY_NAME);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__ICON);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_TYPE);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_CLASS);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__FACET);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__ATTRIBUTE);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__PROPERTY);
+ childrenFeatures.add(FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_EXTENSION);
+ }
+ return childrenFeatures;
+ }
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
- return super.getChildFeature(object, child);
- }
+ return super.getChildFeature(object, child);
+ }
/**
* This returns ComponentType.gif. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
- * @generated
+ * @generated NOT
*/
public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/ComponentType")); //$NON-NLS-1$
- }
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ComponentType")); //$NON-NLS-1$
+ }
/**
* This returns the label text for the adapted class. <!-- begin-user-doc
@@ -202,89 +199,89 @@ public class ComponentTypeItemProvider extends ItemProviderAdapter implements
}
/**
- * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}.
- * <!-- begin-user-doc --> <!--
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public void notifyChanged(Notification notification) {
- updateChildren(notification);
+ updateChildren(notification);
- switch (notification.getFeatureID(ComponentType.class)) {
- case FacesConfigPackage.COMPONENT_TYPE__ID:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case FacesConfigPackage.COMPONENT_TYPE__DESCRIPTION:
- case FacesConfigPackage.COMPONENT_TYPE__DISPLAY_NAME:
- case FacesConfigPackage.COMPONENT_TYPE__ICON:
- case FacesConfigPackage.COMPONENT_TYPE__COMPONENT_TYPE:
- case FacesConfigPackage.COMPONENT_TYPE__COMPONENT_CLASS:
- case FacesConfigPackage.COMPONENT_TYPE__FACET:
- case FacesConfigPackage.COMPONENT_TYPE__ATTRIBUTE:
- case FacesConfigPackage.COMPONENT_TYPE__PROPERTY:
- case FacesConfigPackage.COMPONENT_TYPE__COMPONENT_EXTENSION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
+ switch (notification.getFeatureID(ComponentType.class)) {
+ case FacesConfigPackage.COMPONENT_TYPE__ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case FacesConfigPackage.COMPONENT_TYPE__DESCRIPTION:
+ case FacesConfigPackage.COMPONENT_TYPE__DISPLAY_NAME:
+ case FacesConfigPackage.COMPONENT_TYPE__ICON:
+ case FacesConfigPackage.COMPONENT_TYPE__COMPONENT_TYPE:
+ case FacesConfigPackage.COMPONENT_TYPE__COMPONENT_CLASS:
+ case FacesConfigPackage.COMPONENT_TYPE__FACET:
+ case FacesConfigPackage.COMPONENT_TYPE__ATTRIBUTE:
+ case FacesConfigPackage.COMPONENT_TYPE__PROPERTY:
+ case FacesConfigPackage.COMPONENT_TYPE__COMPONENT_EXTENSION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
/**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object.
- * <!-- begin-user-doc
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc
* --> <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
+ super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__DESCRIPTION,
- FacesConfigFactory.eINSTANCE.createDescriptionType()));
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__DESCRIPTION,
+ FacesConfigFactory.eINSTANCE.createDescriptionType()));
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__DISPLAY_NAME,
- FacesConfigFactory.eINSTANCE.createDisplayNameType()));
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__DISPLAY_NAME,
+ FacesConfigFactory.eINSTANCE.createDisplayNameType()));
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__ICON,
- FacesConfigFactory.eINSTANCE.createIconType()));
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__ICON,
+ FacesConfigFactory.eINSTANCE.createIconType()));
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_TYPE,
- FacesConfigFactory.eINSTANCE.createComponentTypeType()));
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_TYPE,
+ FacesConfigFactory.eINSTANCE.createComponentTypeType()));
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_CLASS,
- FacesConfigFactory.eINSTANCE.createComponentClassType()));
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_CLASS,
+ FacesConfigFactory.eINSTANCE.createComponentClassType()));
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__FACET,
- FacesConfigFactory.eINSTANCE.createFacetType()));
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__FACET,
+ FacesConfigFactory.eINSTANCE.createFacetType()));
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__ATTRIBUTE,
- FacesConfigFactory.eINSTANCE.createAttributeType()));
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__ATTRIBUTE,
+ FacesConfigFactory.eINSTANCE.createAttributeType()));
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__PROPERTY,
- FacesConfigFactory.eINSTANCE.createPropertyType()));
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__PROPERTY,
+ FacesConfigFactory.eINSTANCE.createPropertyType()));
- newChildDescriptors.add
- (createChildParameter
- (FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_EXTENSION,
- FacesConfigFactory.eINSTANCE.createComponentExtensionType()));
- }
+ newChildDescriptors.add
+ (createChildParameter
+ (FacesConfigPackage.Literals.COMPONENT_TYPE__COMPONENT_EXTENSION,
+ FacesConfigFactory.eINSTANCE.createComponentExtensionType()));
+ }
/**
* Return the resource locator for this item provider's resources. <!--
@@ -293,8 +290,8 @@ public class ComponentTypeItemProvider extends ItemProviderAdapter implements
* @generated
*/
public ResourceLocator getResourceLocator() {
- return FacesConfigPlugin.INSTANCE;
- }
+ return FacesConfigPlugin.INSTANCE;
+ }
/* (non-Javadoc)
* @see org.eclipse.emf.edit.provider.ITableItemLabelProvider#getColumnImage(java.lang.Object, int)

Back to the top