| /** |
| */ |
| package org.eclipse.osbp.ecview.core.extension.model.extension.provider; |
| |
| |
| import java.util.Collection; |
| import java.util.List; |
| |
| import org.eclipse.emf.common.notify.AdapterFactory; |
| import org.eclipse.emf.common.notify.Notification; |
| |
| 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.ViewerNotification; |
| |
| import org.eclipse.osbp.ecview.core.common.model.core.CoreModelPackage; |
| |
| import org.eclipse.osbp.ecview.core.extension.model.extension.ExtensionModelPackage; |
| import org.eclipse.osbp.ecview.core.extension.model.extension.YKanban; |
| |
| /** |
| * This is the item provider adapter for a {@link org.eclipse.osbp.ecview.core.extension.model.extension.YKanban} object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class YKanbanItemProvider extends YInputItemProvider { |
| /** |
| * This constructs an instance from a factory and a notifier. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public YKanbanItemProvider(AdapterFactory adapterFactory) { |
| super(adapterFactory); |
| } |
| |
| /** |
| * This returns the property descriptors for the adapted class. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
| if (itemPropertyDescriptors == null) { |
| super.getPropertyDescriptors(object); |
| |
| addSelectionBindingEndpointPropertyDescriptor(object); |
| addUseBeanServicePropertyDescriptor(object); |
| addDatadescriptionPropertyDescriptor(object); |
| addSelectionTypePropertyDescriptor(object); |
| addSelectionPropertyDescriptor(object); |
| addTypePropertyDescriptor(object); |
| addEmfNsURIPropertyDescriptor(object); |
| addTypeQualifiedNamePropertyDescriptor(object); |
| addCardECViewIdPropertyDescriptor(object); |
| addEditDialogIdPropertyDescriptor(object); |
| addDoubleClickedPropertyDescriptor(object); |
| addStateChangedPropertyDescriptor(object); |
| addToRefreshPropertyDescriptor(object); |
| } |
| return itemPropertyDescriptors; |
| } |
| |
| /** |
| * This adds a property descriptor for the Selection Binding Endpoint feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addSelectionBindingEndpointPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YSelectionBindable_selectionBindingEndpoint_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YSelectionBindable_selectionBindingEndpoint_feature", "_UI_YSelectionBindable_type"), |
| CoreModelPackage.Literals.YSELECTION_BINDABLE__SELECTION_BINDING_ENDPOINT, |
| true, |
| false, |
| true, |
| null, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Use Bean Service feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addUseBeanServicePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YBeanServiceConsumer_useBeanService_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YBeanServiceConsumer_useBeanService_feature", "_UI_YBeanServiceConsumer_type"), |
| ExtensionModelPackage.Literals.YBEAN_SERVICE_CONSUMER__USE_BEAN_SERVICE, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Datadescription feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addDatadescriptionPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_datadescription_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_datadescription_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__DATADESCRIPTION, |
| true, |
| false, |
| true, |
| null, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Selection Type feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addSelectionTypePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_selectionType_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_selectionType_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__SELECTION_TYPE, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Selection feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addSelectionPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_selection_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_selection_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__SELECTION, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Type feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addTypePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_type_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_type_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__TYPE, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Emf Ns URI feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addEmfNsURIPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_emfNsURI_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_emfNsURI_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__EMF_NS_URI, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Type Qualified Name feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addTypeQualifiedNamePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_typeQualifiedName_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_typeQualifiedName_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__TYPE_QUALIFIED_NAME, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Card EC View Id feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addCardECViewIdPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_cardECViewId_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_cardECViewId_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__CARD_EC_VIEW_ID, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Edit Dialog Id feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addEditDialogIdPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_editDialogId_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_editDialogId_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__EDIT_DIALOG_ID, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Double Clicked feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addDoubleClickedPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_doubleClicked_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_doubleClicked_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__DOUBLE_CLICKED, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the State Changed feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addStateChangedPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_stateChanged_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_stateChanged_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__STATE_CHANGED, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the To Refresh feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addToRefreshPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_YKanban_toRefresh_feature"), |
| getString("_UI_PropertyDescriptor_description", "_UI_YKanban_toRefresh_feature", "_UI_YKanban_type"), |
| ExtensionModelPackage.Literals.YKANBAN__TO_REFRESH, |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This returns YKanban.gif. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object getImage(Object object) { |
| return overlayImage(object, getResourceLocator().getImage("full/obj16/YKanban")); |
| } |
| |
| /** |
| * This returns the label text for the adapted class. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String getText(Object object) { |
| String label = ((YKanban)object).getName(); |
| return label == null || label.length() == 0 ? |
| getString("_UI_YKanban_type") : |
| getString("_UI_YKanban_type") + " " + label; |
| } |
| |
| |
| /** |
| * 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 |
| */ |
| @Override |
| public void notifyChanged(Notification notification) { |
| updateChildren(notification); |
| |
| switch (notification.getFeatureID(YKanban.class)) { |
| case ExtensionModelPackage.YKANBAN__USE_BEAN_SERVICE: |
| case ExtensionModelPackage.YKANBAN__SELECTION_TYPE: |
| case ExtensionModelPackage.YKANBAN__SELECTION: |
| case ExtensionModelPackage.YKANBAN__TYPE: |
| case ExtensionModelPackage.YKANBAN__EMF_NS_URI: |
| case ExtensionModelPackage.YKANBAN__TYPE_QUALIFIED_NAME: |
| case ExtensionModelPackage.YKANBAN__CARD_EC_VIEW_ID: |
| case ExtensionModelPackage.YKANBAN__EDIT_DIALOG_ID: |
| case ExtensionModelPackage.YKANBAN__DOUBLE_CLICKED: |
| case ExtensionModelPackage.YKANBAN__STATE_CHANGED: |
| case ExtensionModelPackage.YKANBAN__TO_REFRESH: |
| fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
| return; |
| } |
| super.notifyChanged(notification); |
| } |
| |
| /** |
| * 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 |
| */ |
| @Override |
| protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
| super.collectNewChildDescriptors(newChildDescriptors, object); |
| } |
| |
| /** |
| * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { |
| Object childFeature = feature; |
| Object childObject = child; |
| |
| boolean qualify = |
| childFeature == CoreModelPackage.Literals.YFIELD__VALIDATORS || |
| childFeature == CoreModelPackage.Literals.YFIELD__INTERNAL_VALIDATORS; |
| |
| if (qualify) { |
| return getString |
| ("_UI_CreateChild_text2", |
| new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); |
| } |
| return super.getCreateChildText(owner, feature, child, selection); |
| } |
| |
| } |