diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/AudioVisualItemItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/AudioVisualItemItemProvider.java index 9d436a110..1d7a4e94b 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/AudioVisualItemItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/AudioVisualItemItemProvider.java @@ -23,14 +23,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.emf.parsley.examples.library.AudioVisualItem; @@ -44,163 +38,155 @@ * @generated */ public class AudioVisualItemItemProvider - extends CirculatingItemItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends CirculatingItemItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public AudioVisualItemItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addTitlePropertyDescriptor(object); - addMinutesLengthPropertyDescriptor(object); - addDamagedPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addTitlePropertyDescriptor(object); + addMinutesLengthPropertyDescriptor(object); + addDamagedPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Title feature. - * + * This adds a property descriptor for the Title feature. + * * - * @generated - */ + * @generated + */ protected void addTitlePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_AudioVisualItem_title_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_title_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__TITLE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_AudioVisualItem_title_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_title_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__TITLE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Minutes Length feature. - * + * This adds a property descriptor for the Minutes Length feature. + * * - * @generated - */ + * @generated + */ protected void addMinutesLengthPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_AudioVisualItem_minutesLength_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_minutesLength_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__MINUTES_LENGTH, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_AudioVisualItem_minutesLength_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_minutesLength_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__MINUTES_LENGTH, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Damaged feature. - * + * This adds a property descriptor for the Damaged feature. + * * - * @generated - */ + * @generated + */ protected void addDamagedPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_AudioVisualItem_damaged_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_damaged_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__DAMAGED, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_AudioVisualItem_damaged_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_damaged_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__DAMAGED, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((AudioVisualItem)object).getTitle(); - return label == null || label.length() == 0 ? - getString("_UI_AudioVisualItem_type") : //$NON-NLS-1$ - getString("_UI_AudioVisualItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((AudioVisualItem)object).getTitle(); + return label == null || label.length() == 0 ? + getString("_UI_AudioVisualItem_type") : //$NON-NLS-1$ + getString("_UI_AudioVisualItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(AudioVisualItem.class)) - { - case EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE: - case EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH: - case EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + updateChildren(notification); + + switch (notification.getFeatureID(AudioVisualItem.class)) { + case EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE: + case EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH: + case EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED: + 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. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BookItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BookItemProvider.java index 6c683779f..f4a915c8f 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BookItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BookItemProvider.java @@ -23,14 +23,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.emf.parsley.examples.library.Book; @@ -44,137 +38,130 @@ * @generated */ public class BookItemProvider - extends CirculatingItemItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends CirculatingItemItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public BookItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); - - addTitlePropertyDescriptor(object); - addPagesPropertyDescriptor(object); - addCategoryPropertyDescriptor(object); - addAuthorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addTitlePropertyDescriptor(object); + addPagesPropertyDescriptor(object); + addCategoryPropertyDescriptor(object); + addAuthorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Title feature. - * + * This adds a property descriptor for the Title feature. + * * - * @generated - */ + * @generated + */ protected void addTitlePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Book_title_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Book_title_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.BOOK__TITLE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Book_title_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Book_title_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.BOOK__TITLE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Pages feature. - * + * This adds a property descriptor for the Pages feature. + * * - * @generated - */ + * @generated + */ protected void addPagesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Book_pages_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Book_pages_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.BOOK__PAGES, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Book_pages_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Book_pages_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.BOOK__PAGES, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Category feature. - * + * This adds a property descriptor for the Category feature. + * * - * @generated - */ + * @generated + */ protected void addCategoryPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Book_category_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Book_category_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.BOOK__CATEGORY, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Book_category_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Book_category_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.BOOK__CATEGORY, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Author feature. - * + * This adds a property descriptor for the Author feature. + * * - * @generated - */ + * @generated + */ protected void addAuthorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Book_author_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Book_author_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.BOOK__AUTHOR, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Book_author_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Book_author_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.BOOK__AUTHOR, + true, + false, + false, + null, + null, + null)); + } /** * This returns Book.gif. @@ -189,54 +176,53 @@ public Object getImage(Object object) } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((Book)object).getTitle(); - return label == null || label.length() == 0 ? - getString("_UI_Book_type") : //$NON-NLS-1$ - getString("_UI_Book_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((Book)object).getTitle(); + return label == null || label.length() == 0 ? + getString("_UI_Book_type") : //$NON-NLS-1$ + getString("_UI_Book_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(Book.class)) - { - case EXTLibraryPackage.BOOK__TITLE: - case EXTLibraryPackage.BOOK__PAGES: - case EXTLibraryPackage.BOOK__CATEGORY: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + updateChildren(notification); + + switch (notification.getFeatureID(Book.class)) { + case EXTLibraryPackage.BOOK__TITLE: + case EXTLibraryPackage.BOOK__PAGES: + case EXTLibraryPackage.BOOK__CATEGORY: + 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. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BookOnTapeItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BookOnTapeItemProvider.java index a4ac4be38..8e4d5831c 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BookOnTapeItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BookOnTapeItemProvider.java @@ -23,14 +23,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.parsley.examples.library.BookOnTape; import org.eclipse.emf.parsley.examples.library.EXTLibraryPackage; @@ -42,142 +36,135 @@ * @generated */ public class BookOnTapeItemProvider - extends AudioVisualItemItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends AudioVisualItemItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public BookOnTapeItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addReaderPropertyDescriptor(object); - addAuthorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addReaderPropertyDescriptor(object); + addAuthorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Reader feature. - * + * This adds a property descriptor for the Reader feature. + * * - * @generated - */ + * @generated + */ protected void addReaderPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_BookOnTape_reader_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_reader_feature", "_UI_BookOnTape_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.BOOK_ON_TAPE__READER, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BookOnTape_reader_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_reader_feature", "_UI_BookOnTape_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.BOOK_ON_TAPE__READER, + true, + false, + false, + null, + null, + null)); + } /** - * This adds a property descriptor for the Author feature. - * + * This adds a property descriptor for the Author feature. + * * - * @generated - */ + * @generated + */ protected void addAuthorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_BookOnTape_author_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_author_feature", "_UI_BookOnTape_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.BOOK_ON_TAPE__AUTHOR, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BookOnTape_author_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_author_feature", "_UI_BookOnTape_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.BOOK_ON_TAPE__AUTHOR, + true, + false, + false, + null, + null, + null)); + } /** - * This returns BookOnTape.gif. - * + * This returns BookOnTape.gif. + * * - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/BookOnTape")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/BookOnTape")); //$NON-NLS-1$ + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((BookOnTape)object).getTitle(); - return label == null || label.length() == 0 ? - getString("_UI_BookOnTape_type") : //$NON-NLS-1$ - getString("_UI_BookOnTape_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((BookOnTape)object).getTitle(); + return label == null || label.length() == 0 ? + getString("_UI_BookOnTape_type") : //$NON-NLS-1$ + getString("_UI_BookOnTape_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } + updateChildren(notification); + super.notifyChanged(notification); + } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BorrowerItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BorrowerItemProvider.java index 87b84d0e9..045785a8e 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BorrowerItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/BorrowerItemProvider.java @@ -23,14 +23,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.parsley.examples.library.Borrower; import org.eclipse.emf.parsley.examples.library.EXTLibraryPackage; @@ -42,118 +36,111 @@ * @generated */ public class BorrowerItemProvider - extends PersonItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends PersonItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public BorrowerItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addBorrowedPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addBorrowedPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Borrowed feature. - * + * This adds a property descriptor for the Borrowed feature. + * * - * @generated - */ + * @generated + */ protected void addBorrowedPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Borrower_borrowed_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Borrower_borrowed_feature", "_UI_Borrower_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.BORROWER__BORROWED, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Borrower_borrowed_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Borrower_borrowed_feature", "_UI_Borrower_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.BORROWER__BORROWED, + true, + false, + false, + null, + null, + null)); + } /** - * This returns Borrower.gif. - * + * This returns Borrower.gif. + * * - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Borrower")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/Borrower")); //$NON-NLS-1$ + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((Borrower)object).getLastName(); - return label == null || label.length() == 0 ? - getString("_UI_Borrower_type") : //$NON-NLS-1$ - getString("_UI_Borrower_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((Borrower)object).getLastName(); + return label == null || label.length() == 0 ? + getString("_UI_Borrower_type") : //$NON-NLS-1$ + getString("_UI_Borrower_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } + updateChildren(notification); + super.notifyChanged(notification); + } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/CirculatingItemItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/CirculatingItemItemProvider.java index 03351176e..efbcf560a 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/CirculatingItemItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/CirculatingItemItemProvider.java @@ -24,14 +24,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.emf.parsley.examples.library.CirculatingItem; @@ -45,150 +39,142 @@ * @generated */ public class CirculatingItemItemProvider - extends ItemItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends ItemItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public CirculatingItemItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addCopiesPropertyDescriptor(object); - addBorrowersPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addCopiesPropertyDescriptor(object); + addBorrowersPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Copies feature. - * + * This adds a property descriptor for the Copies feature. + * * - * @generated - */ + * @generated + */ protected void addCopiesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Lendable_copies_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Lendable_copies_feature", "_UI_Lendable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.LENDABLE__COPIES, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Lendable_copies_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Lendable_copies_feature", "_UI_Lendable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.LENDABLE__COPIES, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Borrowers feature. - * + * This adds a property descriptor for the Borrowers feature. + * * - * @generated - */ + * @generated + */ protected void addBorrowersPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Lendable_borrowers_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Lendable_borrowers_feature", "_UI_Lendable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.LENDABLE__BORROWERS, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Lendable_borrowers_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Lendable_borrowers_feature", "_UI_Lendable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.LENDABLE__BORROWERS, + true, + false, + false, + null, + null, + null)); + } /** - * This returns CirculatingItem.gif. - * + * This returns CirculatingItem.gif. + * * - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/CirculatingItem")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/CirculatingItem")); //$NON-NLS-1$ + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - Date labelValue = ((CirculatingItem)object).getPublicationDate(); - String label = labelValue == null ? null : labelValue.toString(); - return label == null || label.length() == 0 ? - getString("_UI_CirculatingItem_type") : //$NON-NLS-1$ - getString("_UI_CirculatingItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + Date labelValue = ((CirculatingItem)object).getPublicationDate(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_CirculatingItem_type") : //$NON-NLS-1$ + getString("_UI_CirculatingItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(CirculatingItem.class)) - { - case EXTLibraryPackage.CIRCULATING_ITEM__COPIES: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(CirculatingItem.class)) { + case EXTLibraryPackage.CIRCULATING_ITEM__COPIES: + 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. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EXTLibraryEditPlugin.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EXTLibraryEditPlugin.java index fb81048d9..07d2e0f38 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EXTLibraryEditPlugin.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EXTLibraryEditPlugin.java @@ -17,7 +17,6 @@ package org.eclipse.emf.parsley.examples.library.provider; import org.eclipse.emf.common.EMFPlugin; - import org.eclipse.emf.common.util.ResourceLocator; /** @@ -29,82 +28,81 @@ public final class EXTLibraryEditPlugin extends EMFPlugin { /** - * Keep track of the singleton. - * + * Keep track of the singleton. + * * - * @generated - */ + * @generated + */ public static final EXTLibraryEditPlugin INSTANCE = new EXTLibraryEditPlugin(); /** - * Keep track of the singleton. - * + * Keep track of the singleton. + * * - * @generated - */ + * @generated + */ private static Implementation plugin; /** - * Create the instance. - * + * Create the instance. + * * - * @generated - */ + * @generated + */ public EXTLibraryEditPlugin() { - super - (new ResourceLocator [] - { - }); - } + super + (new ResourceLocator [] { + }); + } /** - * Returns the singleton instance of the Eclipse plugin. - * + * Returns the singleton instance of the Eclipse plugin. + * * - * @return the singleton instance. - * @generated - */ + * @return the singleton instance. + * @generated + */ @Override public ResourceLocator getPluginResourceLocator() { - return plugin; - } + return plugin; + } /** - * Returns the singleton instance of the Eclipse plugin. - * + * Returns the singleton instance of the Eclipse plugin. + * * - * @return the singleton instance. - * @generated - */ + * @return the singleton instance. + * @generated + */ public static Implementation getPlugin() { - return plugin; - } + return plugin; + } /** - * The actual implementation of the Eclipse Plugin. - * + * The actual implementation of the Eclipse Plugin. + * * - * @generated - */ + * @generated + */ public static class Implementation extends EclipsePlugin { /** - * Creates an instance. - * + * Creates an instance. + * * - * @generated - */ + * @generated + */ public Implementation() { - super(); + super(); - // Remember the static instance. - // - plugin = this; - } + // Remember the static instance. + // + plugin = this; + } } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EXTLibraryItemProviderAdapterFactory.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EXTLibraryItemProviderAdapterFactory.java index 41ceadb02..dc301e875 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EXTLibraryItemProviderAdapterFactory.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EXTLibraryItemProviderAdapterFactory.java @@ -23,7 +23,6 @@ import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notifier; - import org.eclipse.emf.edit.provider.ChangeNotifier; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ComposedAdapterFactory; @@ -50,363 +49,352 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { /** - * This keeps track of the root adapter factory that delegates to this adapter factory. - * + * This keeps track of the root adapter factory that delegates to this adapter factory. + * * - * @generated - */ + * @generated + */ protected ComposedAdapterFactory parentAdapterFactory; /** - * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. - * + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * * - * @generated - */ + * @generated + */ protected IChangeNotifier changeNotifier = new ChangeNotifier(); /** - * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. - * + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * * - * @generated - */ + * @generated + */ protected Collection supportedTypes = new ArrayList(); /** - * This constructs an instance. - * + * This constructs an instance. + * * - * @generated - */ + * @generated + */ public EXTLibraryItemProviderAdapterFactory() { - supportedTypes.add(IEditingDomainItemProvider.class); - supportedTypes.add(IStructuredItemContentProvider.class); - supportedTypes.add(ITreeItemContentProvider.class); - supportedTypes.add(IItemLabelProvider.class); - supportedTypes.add(IItemPropertySource.class); - } + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } /** - * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Book} instances. - * + * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Book} instances. + * * - * @generated - */ + * @generated + */ protected BookItemProvider bookItemProvider; /** - * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Book}. - * + * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Book}. + * * - * @generated - */ + * @generated + */ @Override public Adapter createBookAdapter() { - if (bookItemProvider == null) - { - bookItemProvider = new BookItemProvider(this); - } + if (bookItemProvider == null) { + bookItemProvider = new BookItemProvider(this); + } - return bookItemProvider; - } + return bookItemProvider; + } /** - * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Library} instances. - * + * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Library} instances. + * * - * @generated - */ + * @generated + */ protected LibraryItemProvider libraryItemProvider; /** - * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Library}. - * + * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Library}. + * * - * @generated - */ + * @generated + */ @Override public Adapter createLibraryAdapter() { - if (libraryItemProvider == null) - { - libraryItemProvider = new LibraryItemProvider(this); - } + if (libraryItemProvider == null) { + libraryItemProvider = new LibraryItemProvider(this); + } - return libraryItemProvider; - } + return libraryItemProvider; + } /** - * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Writer} instances. - * + * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Writer} instances. + * * - * @generated - */ + * @generated + */ protected WriterItemProvider writerItemProvider; /** - * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Writer}. - * + * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Writer}. + * * - * @generated - */ + * @generated + */ @Override public Adapter createWriterAdapter() { - if (writerItemProvider == null) - { - writerItemProvider = new WriterItemProvider(this); - } + if (writerItemProvider == null) { + writerItemProvider = new WriterItemProvider(this); + } - return writerItemProvider; - } + return writerItemProvider; + } /** - * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.BookOnTape} instances. - * + * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.BookOnTape} instances. + * * - * @generated - */ + * @generated + */ protected BookOnTapeItemProvider bookOnTapeItemProvider; /** - * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.BookOnTape}. - * + * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.BookOnTape}. + * * - * @generated - */ + * @generated + */ @Override public Adapter createBookOnTapeAdapter() { - if (bookOnTapeItemProvider == null) - { - bookOnTapeItemProvider = new BookOnTapeItemProvider(this); - } + if (bookOnTapeItemProvider == null) { + bookOnTapeItemProvider = new BookOnTapeItemProvider(this); + } - return bookOnTapeItemProvider; - } + return bookOnTapeItemProvider; + } /** - * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.VideoCassette} instances. - * + * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.VideoCassette} instances. + * * - * @generated - */ + * @generated + */ protected VideoCassetteItemProvider videoCassetteItemProvider; /** - * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.VideoCassette}. - * + * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.VideoCassette}. + * * - * @generated - */ + * @generated + */ @Override public Adapter createVideoCassetteAdapter() { - if (videoCassetteItemProvider == null) - { - videoCassetteItemProvider = new VideoCassetteItemProvider(this); - } + if (videoCassetteItemProvider == null) { + videoCassetteItemProvider = new VideoCassetteItemProvider(this); + } - return videoCassetteItemProvider; - } + return videoCassetteItemProvider; + } /** - * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Borrower} instances. - * + * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Borrower} instances. + * * - * @generated - */ + * @generated + */ protected BorrowerItemProvider borrowerItemProvider; /** - * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Borrower}. - * + * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Borrower}. + * * - * @generated - */ + * @generated + */ @Override public Adapter createBorrowerAdapter() { - if (borrowerItemProvider == null) - { - borrowerItemProvider = new BorrowerItemProvider(this); - } + if (borrowerItemProvider == null) { + borrowerItemProvider = new BorrowerItemProvider(this); + } - return borrowerItemProvider; - } + return borrowerItemProvider; + } /** - * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Person} instances. - * + * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Person} instances. + * * - * @generated - */ + * @generated + */ protected PersonItemProvider personItemProvider; /** - * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Person}. - * + * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Person}. + * * - * @generated - */ + * @generated + */ @Override public Adapter createPersonAdapter() { - if (personItemProvider == null) - { - personItemProvider = new PersonItemProvider(this); - } + if (personItemProvider == null) { + personItemProvider = new PersonItemProvider(this); + } - return personItemProvider; - } + return personItemProvider; + } /** - * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Employee} instances. - * + * This keeps track of the one adapter used for all {@link org.eclipse.emf.parsley.examples.library.Employee} instances. + * * - * @generated - */ + * @generated + */ protected EmployeeItemProvider employeeItemProvider; /** - * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Employee}. - * + * This creates an adapter for a {@link org.eclipse.emf.parsley.examples.library.Employee}. + * * - * @generated - */ + * @generated + */ @Override public Adapter createEmployeeAdapter() { - if (employeeItemProvider == null) - { - employeeItemProvider = new EmployeeItemProvider(this); - } + if (employeeItemProvider == null) { + employeeItemProvider = new EmployeeItemProvider(this); + } - return employeeItemProvider; - } + return employeeItemProvider; + } /** - * This returns the root adapter factory that contains this factory. - * + * This returns the root adapter factory that contains this factory. + * * - * @generated - */ + * @generated + */ public ComposeableAdapterFactory getRootAdapterFactory() { - return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); - } + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } /** - * This sets the composed adapter factory that contains this factory. - * + * This sets the composed adapter factory that contains this factory. + * * - * @generated - */ + * @generated + */ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { - this.parentAdapterFactory = parentAdapterFactory; - } + this.parentAdapterFactory = parentAdapterFactory; + } /** - * + * * - * @generated - */ + * @generated + */ @Override public boolean isFactoryForType(Object type) { - return supportedTypes.contains(type) || super.isFactoryForType(type); - } + return supportedTypes.contains(type) || super.isFactoryForType(type); + } /** - * This implementation substitutes the factory itself as the key for the adapter. - * + * This implementation substitutes the factory itself as the key for the adapter. + * * - * @generated - */ + * @generated + */ @Override public Adapter adapt(Notifier notifier, Object type) { - return super.adapt(notifier, this); - } + return super.adapt(notifier, this); + } /** - * + * * - * @generated - */ + * @generated + */ @Override public Object adapt(Object object, Object type) { - if (isFactoryForType(type)) - { - Object adapter = super.adapt(object, type); - if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) - { - return adapter; - } - } - - return null; - } + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } /** - * This adds a listener. - * + * This adds a listener. + * * - * @generated - */ + * @generated + */ public void addListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.addListener(notifyChangedListener); - } + changeNotifier.addListener(notifyChangedListener); + } /** - * This removes a listener. - * + * This removes a listener. + * * - * @generated - */ + * @generated + */ public void removeListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.removeListener(notifyChangedListener); - } + changeNotifier.removeListener(notifyChangedListener); + } /** - * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. - * + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * * - * @generated - */ + * @generated + */ public void fireNotifyChanged(Notification notification) { - changeNotifier.fireNotifyChanged(notification); + changeNotifier.fireNotifyChanged(notification); - if (parentAdapterFactory != null) - { - parentAdapterFactory.fireNotifyChanged(notification); - } - } + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } /** - * This disposes all of the item providers created by this factory. - * + * This disposes all of the item providers created by this factory. + * * - * @generated - */ + * @generated + */ public void dispose() { - if (bookItemProvider != null) bookItemProvider.dispose(); - if (libraryItemProvider != null) libraryItemProvider.dispose(); - if (writerItemProvider != null) writerItemProvider.dispose(); - if (bookOnTapeItemProvider != null) bookOnTapeItemProvider.dispose(); - if (videoCassetteItemProvider != null) videoCassetteItemProvider.dispose(); - if (borrowerItemProvider != null) borrowerItemProvider.dispose(); - if (personItemProvider != null) personItemProvider.dispose(); - if (employeeItemProvider != null) employeeItemProvider.dispose(); - } + if (bookItemProvider != null) bookItemProvider.dispose(); + if (libraryItemProvider != null) libraryItemProvider.dispose(); + if (writerItemProvider != null) writerItemProvider.dispose(); + if (bookOnTapeItemProvider != null) bookOnTapeItemProvider.dispose(); + if (videoCassetteItemProvider != null) videoCassetteItemProvider.dispose(); + if (borrowerItemProvider != null) borrowerItemProvider.dispose(); + if (personItemProvider != null) personItemProvider.dispose(); + if (employeeItemProvider != null) employeeItemProvider.dispose(); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EmployeeItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EmployeeItemProvider.java index 978ac2454..b2736ef3c 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EmployeeItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/EmployeeItemProvider.java @@ -23,14 +23,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.parsley.examples.library.EXTLibraryPackage; import org.eclipse.emf.parsley.examples.library.Employee; @@ -42,118 +36,111 @@ * @generated */ public class EmployeeItemProvider - extends PersonItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends PersonItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public EmployeeItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addManagerPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addManagerPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Manager feature. - * + * This adds a property descriptor for the Manager feature. + * * - * @generated - */ + * @generated + */ protected void addManagerPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Employee_manager_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Employee_manager_feature", "_UI_Employee_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.EMPLOYEE__MANAGER, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Employee_manager_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Employee_manager_feature", "_UI_Employee_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.EMPLOYEE__MANAGER, + true, + false, + false, + null, + null, + null)); + } /** - * This returns Employee.gif. - * + * This returns Employee.gif. + * * - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Employee")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/Employee")); //$NON-NLS-1$ + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((Employee)object).getLastName(); - return label == null || label.length() == 0 ? - getString("_UI_Employee_type") : //$NON-NLS-1$ - getString("_UI_Employee_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((Employee)object).getLastName(); + return label == null || label.length() == 0 ? + getString("_UI_Employee_type") : //$NON-NLS-1$ + getString("_UI_Employee_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } + updateChildren(notification); + super.notifyChanged(notification); + } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/ItemItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/ItemItemProvider.java index 274beab61..c39d33772 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/ItemItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/ItemItemProvider.java @@ -24,9 +24,7 @@ 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; @@ -57,117 +55,115 @@ public class ItemItemProvider IItemPropertySource { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public ItemItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addPublicationDatePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addPublicationDatePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Publication Date feature. - * + * This adds a property descriptor for the Publication Date feature. + * * - * @generated - */ + * @generated + */ protected void addPublicationDatePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Item_publicationDate_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Item_publicationDate_feature", "_UI_Item_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.ITEM__PUBLICATION_DATE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Item_publicationDate_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Item_publicationDate_feature", "_UI_Item_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.ITEM__PUBLICATION_DATE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - Date labelValue = ((Item)object).getPublicationDate(); - String label = labelValue == null ? null : labelValue.toString(); - return label == null || label.length() == 0 ? - getString("_UI_Item_type") : //$NON-NLS-1$ - getString("_UI_Item_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + Date labelValue = ((Item)object).getPublicationDate(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_Item_type") : //$NON-NLS-1$ + getString("_UI_Item_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(Item.class)) - { - case EXTLibraryPackage.ITEM__PUBLICATION_DATE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(Item.class)) { + case EXTLibraryPackage.ITEM__PUBLICATION_DATE: + 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. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override 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. - * + * Return the resource locator for this item provider's resources. + * * - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return EXTLibraryEditPlugin.INSTANCE; - } + return EXTLibraryEditPlugin.INSTANCE; + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/LibraryItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/LibraryItemProvider.java index ee2b45afc..061dd0126 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/LibraryItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/LibraryItemProvider.java @@ -23,11 +23,8 @@ 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.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -59,256 +56,253 @@ public class LibraryItemProvider IItemPropertySource { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public LibraryItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addAddressPropertyDescriptor(object); - addNamePropertyDescriptor(object); - addBooksPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addAddressPropertyDescriptor(object); + addNamePropertyDescriptor(object); + addBooksPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Address feature. - * + * This adds a property descriptor for the Address feature. + * * - * @generated - */ + * @generated + */ protected void addAddressPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Addressable_address_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", "_UI_Addressable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Addressable_address_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", "_UI_Addressable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Name feature. - * + * This adds a property descriptor for the Name feature. + * * - * @generated - */ + * @generated + */ protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Library_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Library_name_feature", "_UI_Library_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.LIBRARY__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Library_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Library_name_feature", "_UI_Library_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.LIBRARY__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Books feature. - * + * This adds a property descriptor for the Books feature. + * * - * @generated - */ + * @generated + */ protected void addBooksPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Library_books_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Library_books_feature", "_UI_Library_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.LIBRARY__BOOKS, - false, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Library_books_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Library_books_feature", "_UI_Library_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.LIBRARY__BOOKS, + false, + false, + false, + null, + null, + null)); + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public Collection getChildrenFeatures(Object object) { - if (childrenFeatures == null) - { - super.getChildrenFeatures(object); - childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__WRITERS); - childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES); - childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__BORROWERS); - childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__STOCK); - childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__BRANCHES); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__WRITERS); + childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES); + childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__BORROWERS); + childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__STOCK); + childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__BRANCHES); + } + return childrenFeatures; + } /** - * + * * - * @generated - */ + * @generated + */ @Override 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 Library.gif. - * + * This returns Library.gif. + * * - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Library")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/Library")); //$NON-NLS-1$ + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((Library)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_Library_type") : //$NON-NLS-1$ - getString("_UI_Library_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((Library)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Library_type") : //$NON-NLS-1$ + getString("_UI_Library_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(Library.class)) - { - case EXTLibraryPackage.LIBRARY__ADDRESS: - case EXTLibraryPackage.LIBRARY__NAME: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - case EXTLibraryPackage.LIBRARY__WRITERS: - case EXTLibraryPackage.LIBRARY__EMPLOYEES: - case EXTLibraryPackage.LIBRARY__BORROWERS: - case EXTLibraryPackage.LIBRARY__STOCK: - case EXTLibraryPackage.LIBRARY__BRANCHES: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(Library.class)) { + case EXTLibraryPackage.LIBRARY__ADDRESS: + case EXTLibraryPackage.LIBRARY__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case EXTLibraryPackage.LIBRARY__WRITERS: + case EXTLibraryPackage.LIBRARY__EMPLOYEES: + case EXTLibraryPackage.LIBRARY__BORROWERS: + case EXTLibraryPackage.LIBRARY__STOCK: + case EXTLibraryPackage.LIBRARY__BRANCHES: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); + super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add - (createChildParameter - (EXTLibraryPackage.Literals.LIBRARY__WRITERS, - EXTLibraryFactory.eINSTANCE.createWriter())); + newChildDescriptors.add + (createChildParameter + (EXTLibraryPackage.Literals.LIBRARY__WRITERS, + EXTLibraryFactory.eINSTANCE.createWriter())); - newChildDescriptors.add - (createChildParameter - (EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES, - EXTLibraryFactory.eINSTANCE.createEmployee())); + newChildDescriptors.add + (createChildParameter + (EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES, + EXTLibraryFactory.eINSTANCE.createEmployee())); - newChildDescriptors.add - (createChildParameter - (EXTLibraryPackage.Literals.LIBRARY__BORROWERS, - EXTLibraryFactory.eINSTANCE.createBorrower())); + newChildDescriptors.add + (createChildParameter + (EXTLibraryPackage.Literals.LIBRARY__BORROWERS, + EXTLibraryFactory.eINSTANCE.createBorrower())); - newChildDescriptors.add - (createChildParameter - (EXTLibraryPackage.Literals.LIBRARY__STOCK, - EXTLibraryFactory.eINSTANCE.createBook())); + newChildDescriptors.add + (createChildParameter + (EXTLibraryPackage.Literals.LIBRARY__STOCK, + EXTLibraryFactory.eINSTANCE.createBook())); - newChildDescriptors.add - (createChildParameter - (EXTLibraryPackage.Literals.LIBRARY__STOCK, - EXTLibraryFactory.eINSTANCE.createBookOnTape())); + newChildDescriptors.add + (createChildParameter + (EXTLibraryPackage.Literals.LIBRARY__STOCK, + EXTLibraryFactory.eINSTANCE.createBookOnTape())); - newChildDescriptors.add - (createChildParameter - (EXTLibraryPackage.Literals.LIBRARY__STOCK, - EXTLibraryFactory.eINSTANCE.createVideoCassette())); + newChildDescriptors.add + (createChildParameter + (EXTLibraryPackage.Literals.LIBRARY__STOCK, + EXTLibraryFactory.eINSTANCE.createVideoCassette())); - newChildDescriptors.add - (createChildParameter - (EXTLibraryPackage.Literals.LIBRARY__BRANCHES, - EXTLibraryFactory.eINSTANCE.createLibrary())); - } + newChildDescriptors.add + (createChildParameter + (EXTLibraryPackage.Literals.LIBRARY__BRANCHES, + EXTLibraryFactory.eINSTANCE.createLibrary())); + } /** - * Return the resource locator for this item provider's resources. - * + * Return the resource locator for this item provider's resources. + * * - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return EXTLibraryEditPlugin.INSTANCE; - } + return EXTLibraryEditPlugin.INSTANCE; + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/PeriodicalItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/PeriodicalItemProvider.java index 0e2370786..3ad250659 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/PeriodicalItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/PeriodicalItemProvider.java @@ -23,14 +23,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.emf.parsley.examples.library.EXTLibraryPackage; @@ -44,138 +38,130 @@ * @generated */ public class PeriodicalItemProvider - extends ItemItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends ItemItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public PeriodicalItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addTitlePropertyDescriptor(object); - addIssuesPerYearPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addTitlePropertyDescriptor(object); + addIssuesPerYearPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Title feature. - * + * This adds a property descriptor for the Title feature. + * * - * @generated - */ + * @generated + */ protected void addTitlePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Periodical_title_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Periodical_title_feature", "_UI_Periodical_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.PERIODICAL__TITLE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Periodical_title_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Periodical_title_feature", "_UI_Periodical_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.PERIODICAL__TITLE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Issues Per Year feature. - * + * This adds a property descriptor for the Issues Per Year feature. + * * - * @generated - */ + * @generated + */ protected void addIssuesPerYearPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Periodical_issuesPerYear_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Periodical_issuesPerYear_feature", "_UI_Periodical_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.PERIODICAL__ISSUES_PER_YEAR, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Periodical_issuesPerYear_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Periodical_issuesPerYear_feature", "_UI_Periodical_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.PERIODICAL__ISSUES_PER_YEAR, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((Periodical)object).getTitle(); - return label == null || label.length() == 0 ? - getString("_UI_Periodical_type") : //$NON-NLS-1$ - getString("_UI_Periodical_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((Periodical)object).getTitle(); + return label == null || label.length() == 0 ? + getString("_UI_Periodical_type") : //$NON-NLS-1$ + getString("_UI_Periodical_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(Periodical.class)) - { - case EXTLibraryPackage.PERIODICAL__TITLE: - case EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(Periodical.class)) { + case EXTLibraryPackage.PERIODICAL__TITLE: + case EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR: + 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. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/PersonItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/PersonItemProvider.java index 449e57786..04cdeb990 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/PersonItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/PersonItemProvider.java @@ -23,9 +23,7 @@ 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; @@ -56,178 +54,176 @@ public class PersonItemProvider IItemPropertySource { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public PersonItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addAddressPropertyDescriptor(object); - addFirstNamePropertyDescriptor(object); - addLastNamePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addAddressPropertyDescriptor(object); + addFirstNamePropertyDescriptor(object); + addLastNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Address feature. - * + * This adds a property descriptor for the Address feature. + * * - * @generated - */ + * @generated + */ protected void addAddressPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Addressable_address_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", "_UI_Addressable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Addressable_address_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", "_UI_Addressable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the First Name feature. - * + * This adds a property descriptor for the First Name feature. + * * - * @generated - */ + * @generated + */ protected void addFirstNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Person_firstName_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Person_firstName_feature", "_UI_Person_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.PERSON__FIRST_NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Person_firstName_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Person_firstName_feature", "_UI_Person_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.PERSON__FIRST_NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Last Name feature. - * + * This adds a property descriptor for the Last Name feature. + * * - * @generated - */ + * @generated + */ protected void addLastNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Person_lastName_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Person_lastName_feature", "_UI_Person_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.PERSON__LAST_NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Person_lastName_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Person_lastName_feature", "_UI_Person_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.PERSON__LAST_NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This returns Person.gif. - * + * This returns Person.gif. + * * - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Person")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/Person")); //$NON-NLS-1$ + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((Person)object).getLastName(); - return label == null || label.length() == 0 ? - getString("_UI_Person_type") : //$NON-NLS-1$ - getString("_UI_Person_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((Person)object).getLastName(); + return label == null || label.length() == 0 ? + getString("_UI_Person_type") : //$NON-NLS-1$ + getString("_UI_Person_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(Person.class)) - { - case EXTLibraryPackage.PERSON__ADDRESS: - case EXTLibraryPackage.PERSON__FIRST_NAME: - case EXTLibraryPackage.PERSON__LAST_NAME: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + updateChildren(notification); + + switch (notification.getFeatureID(Person.class)) { + case EXTLibraryPackage.PERSON__ADDRESS: + case EXTLibraryPackage.PERSON__FIRST_NAME: + case EXTLibraryPackage.PERSON__LAST_NAME: + 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. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override 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. - * + * Return the resource locator for this item provider's resources. + * * - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return EXTLibraryEditPlugin.INSTANCE; - } + return EXTLibraryEditPlugin.INSTANCE; + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/VideoCassetteItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/VideoCassetteItemProvider.java index e5581ae09..372cc91e7 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/VideoCassetteItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/VideoCassetteItemProvider.java @@ -23,14 +23,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.parsley.examples.library.EXTLibraryPackage; import org.eclipse.emf.parsley.examples.library.VideoCassette; @@ -42,118 +36,111 @@ * @generated */ public class VideoCassetteItemProvider - extends AudioVisualItemItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends AudioVisualItemItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public VideoCassetteItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addCastPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addCastPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Cast feature. - * + * This adds a property descriptor for the Cast feature. + * * - * @generated - */ + * @generated + */ protected void addCastPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_VideoCassette_cast_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_VideoCassette_cast_feature", "_UI_VideoCassette_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.VIDEO_CASSETTE__CAST, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_VideoCassette_cast_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_VideoCassette_cast_feature", "_UI_VideoCassette_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.VIDEO_CASSETTE__CAST, + true, + false, + false, + null, + null, + null)); + } /** - * This returns VideoCassette.gif. - * + * This returns VideoCassette.gif. + * * - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/VideoCassette")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/VideoCassette")); //$NON-NLS-1$ + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((VideoCassette)object).getTitle(); - return label == null || label.length() == 0 ? - getString("_UI_VideoCassette_type") : //$NON-NLS-1$ - getString("_UI_VideoCassette_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((VideoCassette)object).getTitle(); + return label == null || label.length() == 0 ? + getString("_UI_VideoCassette_type") : //$NON-NLS-1$ + getString("_UI_VideoCassette_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } + updateChildren(notification); + super.notifyChanged(notification); + } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/WriterItemProvider.java b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/WriterItemProvider.java index 971155fe0..f4aa375ed 100644 --- a/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/WriterItemProvider.java +++ b/examples/org.eclipse.emf.parsley.examples.library.edit/src/org/eclipse/emf/parsley/examples/library/provider/WriterItemProvider.java @@ -23,14 +23,8 @@ 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.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.emf.parsley.examples.library.EXTLibraryPackage; @@ -44,149 +38,141 @@ * @generated */ public class WriterItemProvider - extends PersonItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource + extends PersonItemProvider { /** - * This constructs an instance from a factory and a notifier. - * + * This constructs an instance from a factory and a notifier. + * * - * @generated - */ + * @generated + */ public WriterItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * + * This returns the property descriptors for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) - { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addNamePropertyDescriptor(object); - addBooksPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addNamePropertyDescriptor(object); + addBooksPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Name feature. - * + * This adds a property descriptor for the Name feature. + * * - * @generated - */ + * @generated + */ protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Writer_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Writer_name_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.WRITER__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Writer_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Writer_name_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.WRITER__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Books feature. - * + * This adds a property descriptor for the Books feature. + * * - * @generated - */ + * @generated + */ protected void addBooksPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Writer_books_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_Writer_books_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - EXTLibraryPackage.Literals.WRITER__BOOKS, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Writer_books_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_Writer_books_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EXTLibraryPackage.Literals.WRITER__BOOKS, + true, + false, + false, + null, + null, + null)); + } /** - * This returns Writer.gif. - * + * This returns Writer.gif. + * * - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Writer")); //$NON-NLS-1$ - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/Writer")); //$NON-NLS-1$ + } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. + * * - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((Writer)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_Writer_type") : //$NON-NLS-1$ - getString("_UI_Writer_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } + String label = ((Writer)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Writer_type") : //$NON-NLS-1$ + getString("_UI_Writer_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } /** - * 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}. - * + * 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}. + * * - * @generated - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(Writer.class)) - { - case EXTLibraryPackage.WRITER__NAME: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(Writer.class)) { + case EXTLibraryPackage.WRITER__NAME: + 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. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * * - * @generated - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } }