diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/DynamicAttributeItemProvider.java')
-rw-r--r-- | jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/DynamicAttributeItemProvider.java | 201 |
1 files changed, 99 insertions, 102 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/DynamicAttributeItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/DynamicAttributeItemProvider.java index cdcecc99d..e44c45251 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/DynamicAttributeItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/edit/provider/DynamicAttributeItemProvider.java @@ -17,9 +17,7 @@ import java.util.List; 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.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -29,9 +27,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; - import org.eclipse.jst.jsf.facesconfig.FacesConfigPlugin; - import org.eclipse.jst.jsf.facesconfig.emf.DynamicAttribute; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; @@ -41,6 +37,7 @@ import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; * <!-- end-user-doc --> * @generated */ +@SuppressWarnings("nls") public class DynamicAttributeItemProvider extends ItemProviderAdapter implements @@ -50,146 +47,146 @@ public class DynamicAttributeItemProvider IItemLabelProvider, IItemPropertySource { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final String copyright = "Copyright (c) 2005, 2006 IBM Corporation and others"; //$NON-NLS-1$ /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * @param adapterFactory * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DynamicAttributeItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addNamePropertyDescriptor(object); - addValuePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addNamePropertyDescriptor(object); + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Name feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Name feature. + * <!-- begin-user-doc --> * @param object * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_DynamicAttribute_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_DynamicAttribute_name_feature", "_UI_DynamicAttribute_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - FacesConfigPackage.Literals.DYNAMIC_ATTRIBUTE__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_DynamicAttribute_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_DynamicAttribute_name_feature", "_UI_DynamicAttribute_type"), + FacesConfigPackage.Literals.DYNAMIC_ATTRIBUTE__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Value feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Value feature. + * <!-- begin-user-doc --> * @param object * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addValuePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_DynamicAttribute_value_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_DynamicAttribute_value_feature", "_UI_DynamicAttribute_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - FacesConfigPackage.Literals.DYNAMIC_ATTRIBUTE__VALUE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_DynamicAttribute_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_DynamicAttribute_value_feature", "_UI_DynamicAttribute_type"), + FacesConfigPackage.Literals.DYNAMIC_ATTRIBUTE__VALUE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This returns DynamicAttribute.gif. - * <!-- begin-user-doc --> + * This returns DynamicAttribute.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/DynamicAttribute")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/DynamicAttribute")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public String getText(Object object) { - String label = ((DynamicAttribute)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_DynamicAttribute_type") : //$NON-NLS-1$ - getString("_UI_DynamicAttribute_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((DynamicAttribute)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_DynamicAttribute_type") : + getString("_UI_DynamicAttribute_type") + " " + label; + } /** - * 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(DynamicAttribute.class)) { - case FacesConfigPackage.DYNAMIC_ATTRIBUTE__NAME: - case FacesConfigPackage.DYNAMIC_ATTRIBUTE__VALUE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(DynamicAttribute.class)) { + case FacesConfigPackage.DYNAMIC_ATTRIBUTE__NAME: + case FacesConfigPackage.DYNAMIC_ATTRIBUTE__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + 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); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceLocator getResourceLocator() { - return FacesConfigPlugin.INSTANCE; - } + return FacesConfigPlugin.INSTANCE; + } } |