diff options
author | Kenji Hosokawa <khosokawa@jp.adit-jv.com> | 2021-08-03 18:42:39 +0900 |
---|---|---|
committer | Kenji Hosokawa <khosokawa@jp.adit-jv.com> | 2021-08-06 19:32:38 +0900 |
commit | be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 (patch) | |
tree | 1f3f1a96251ac4f655c8a96fc33d5d4ee779cd06 /rba.model.view.edit | |
parent | 71ca7c6cab863767ef30c8bd05b2bbfda8731cb5 (diff) |
Initial commit
Bug-AGL: SPEC-4033
Signed-off-by: Kenji Hosokawa <khosokawa@jp.adit-jv.com>
Diffstat (limited to 'rba.model.view.edit')
63 files changed, 4876 insertions, 0 deletions
diff --git a/rba.model.view.edit/.classpath b/rba.model.view.edit/.classpath new file mode 100644 index 0000000..22f3064 --- /dev/null +++ b/rba.model.view.edit/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/rba.model.view.edit/.project b/rba.model.view.edit/.project new file mode 100644 index 0000000..8418c6a --- /dev/null +++ b/rba.model.view.edit/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>rba.model.view.edit</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/rba.model.view.edit/META-INF/MANIFEST.MF b/rba.model.view.edit/META-INF/MANIFEST.MF new file mode 100644 index 0000000..4bb5f1d --- /dev/null +++ b/rba.model.view.edit/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: rba.model.view.edit;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: rba.view.provider.RbaViewEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: rba.view.provider +Require-Bundle: org.eclipse.core.runtime, + rba.model.view;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport, + rba.model.core;visibility:=reexport, + rba.model.core.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/rba.model.view.edit/build.properties b/rba.model.view.edit/build.properties new file mode 100644 index 0000000..6e3e902 --- /dev/null +++ b/rba.model.view.edit/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/rba.model.view.edit/icons/full/obj16/AllInstanceOfArea.gif b/rba.model.view.edit/icons/full/obj16/AllInstanceOfArea.gif Binary files differnew file mode 100644 index 0000000..ef56c14 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/AllInstanceOfArea.gif diff --git a/rba.model.view.edit/icons/full/obj16/AllInstanceOfViewContent.gif b/rba.model.view.edit/icons/full/obj16/AllInstanceOfViewContent.gif Binary files differnew file mode 100644 index 0000000..afb82ea --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/AllInstanceOfViewContent.gif diff --git a/rba.model.view.edit/icons/full/obj16/Area.gif b/rba.model.view.edit/icons/full/obj16/Area.gif Binary files differnew file mode 100644 index 0000000..d3dc5a9 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/Area.gif diff --git a/rba.model.view.edit/icons/full/obj16/AreaSet.gif b/rba.model.view.edit/icons/full/obj16/AreaSet.gif Binary files differnew file mode 100644 index 0000000..89ad5da --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/AreaSet.gif diff --git a/rba.model.view.edit/icons/full/obj16/CompositeArea.gif b/rba.model.view.edit/icons/full/obj16/CompositeArea.gif Binary files differnew file mode 100644 index 0000000..4365960 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/CompositeArea.gif diff --git a/rba.model.view.edit/icons/full/obj16/CyclicContent.gif b/rba.model.view.edit/icons/full/obj16/CyclicContent.gif Binary files differnew file mode 100644 index 0000000..90d10f9 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/CyclicContent.gif diff --git a/rba.model.view.edit/icons/full/obj16/Display.gif b/rba.model.view.edit/icons/full/obj16/Display.gif Binary files differnew file mode 100644 index 0000000..2b69256 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/Display.gif diff --git a/rba.model.view.edit/icons/full/obj16/DisplayingContent.gif b/rba.model.view.edit/icons/full/obj16/DisplayingContent.gif Binary files differnew file mode 100644 index 0000000..498364f --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/DisplayingContent.gif diff --git a/rba.model.view.edit/icons/full/obj16/FixedPositionLayout.gif b/rba.model.view.edit/icons/full/obj16/FixedPositionLayout.gif Binary files differnew file mode 100644 index 0000000..a26660e --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/FixedPositionLayout.gif diff --git a/rba.model.view.edit/icons/full/obj16/HideLowerPriority.gif b/rba.model.view.edit/icons/full/obj16/HideLowerPriority.gif Binary files differnew file mode 100644 index 0000000..83afb9b --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/HideLowerPriority.gif diff --git a/rba.model.view.edit/icons/full/obj16/HorizontalLayout.gif b/rba.model.view.edit/icons/full/obj16/HorizontalLayout.gif Binary files differnew file mode 100644 index 0000000..c00aedf --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/HorizontalLayout.gif diff --git a/rba.model.view.edit/icons/full/obj16/IsChangedDisplay.gif b/rba.model.view.edit/icons/full/obj16/IsChangedDisplay.gif Binary files differnew file mode 100644 index 0000000..420eee1 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/IsChangedDisplay.gif diff --git a/rba.model.view.edit/icons/full/obj16/IsDisplayed.gif b/rba.model.view.edit/icons/full/obj16/IsDisplayed.gif Binary files differnew file mode 100644 index 0000000..a3908bc --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/IsDisplayed.gif diff --git a/rba.model.view.edit/icons/full/obj16/IsDisplayedOn.gif b/rba.model.view.edit/icons/full/obj16/IsDisplayedOn.gif Binary files differnew file mode 100644 index 0000000..5a9bc75 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/IsDisplayedOn.gif diff --git a/rba.model.view.edit/icons/full/obj16/IsHidden.gif b/rba.model.view.edit/icons/full/obj16/IsHidden.gif Binary files differnew file mode 100644 index 0000000..33a997a --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/IsHidden.gif diff --git a/rba.model.view.edit/icons/full/obj16/IsTranslatedViewTo.gif b/rba.model.view.edit/icons/full/obj16/IsTranslatedViewTo.gif Binary files differnew file mode 100644 index 0000000..35ef84e --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/IsTranslatedViewTo.gif diff --git a/rba.model.view.edit/icons/full/obj16/IsVisible.gif b/rba.model.view.edit/icons/full/obj16/IsVisible.gif Binary files differnew file mode 100644 index 0000000..d92f34c --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/IsVisible.gif diff --git a/rba.model.view.edit/icons/full/obj16/MessageApp.gif b/rba.model.view.edit/icons/full/obj16/MessageApp.gif Binary files differnew file mode 100644 index 0000000..c673a52 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/MessageApp.gif diff --git a/rba.model.view.edit/icons/full/obj16/MessageContent.gif b/rba.model.view.edit/icons/full/obj16/MessageContent.gif Binary files differnew file mode 100644 index 0000000..98b351f --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/MessageContent.gif diff --git a/rba.model.view.edit/icons/full/obj16/Offset.gif b/rba.model.view.edit/icons/full/obj16/Offset.gif Binary files differnew file mode 100644 index 0000000..53500da --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/Offset.gif diff --git a/rba.model.view.edit/icons/full/obj16/PositionContainer.gif b/rba.model.view.edit/icons/full/obj16/PositionContainer.gif Binary files differnew file mode 100644 index 0000000..e4bc22d --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/PositionContainer.gif diff --git a/rba.model.view.edit/icons/full/obj16/Size.gif b/rba.model.view.edit/icons/full/obj16/Size.gif Binary files differnew file mode 100644 index 0000000..7c2aaac --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/Size.gif diff --git a/rba.model.view.edit/icons/full/obj16/SizeReference.gif b/rba.model.view.edit/icons/full/obj16/SizeReference.gif Binary files differnew file mode 100644 index 0000000..9041598 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/SizeReference.gif diff --git a/rba.model.view.edit/icons/full/obj16/VerticalLayout.gif b/rba.model.view.edit/icons/full/obj16/VerticalLayout.gif Binary files differnew file mode 100644 index 0000000..35ef84e --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/VerticalLayout.gif diff --git a/rba.model.view.edit/icons/full/obj16/ViewContent.gif b/rba.model.view.edit/icons/full/obj16/ViewContent.gif Binary files differnew file mode 100644 index 0000000..05dc74a --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/ViewContent.gif diff --git a/rba.model.view.edit/icons/full/obj16/ViewContentSet.gif b/rba.model.view.edit/icons/full/obj16/ViewContentSet.gif Binary files differnew file mode 100644 index 0000000..ef56c14 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/ViewContentSet.gif diff --git a/rba.model.view.edit/icons/full/obj16/ViewContentState.gif b/rba.model.view.edit/icons/full/obj16/ViewContentState.gif Binary files differnew file mode 100644 index 0000000..10d2229 --- /dev/null +++ b/rba.model.view.edit/icons/full/obj16/ViewContentState.gif diff --git a/rba.model.view.edit/plugin.xml b/rba.model.view.edit/plugin.xml new file mode 100644 index 0000000..95079bc --- /dev/null +++ b/rba.model.view.edit/plugin.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- +--> + +<plugin> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <!-- @generated rbaview --> + <factory + uri="http://www.denso.com/ict/rba/view" + class="rba.view.provider.RBAViewItemProviderAdapterFactory" + supportedTypes= + "org.eclipse.emf.edit.provider.IEditingDomainItemProvider + org.eclipse.emf.edit.provider.IStructuredItemContentProvider + org.eclipse.emf.edit.provider.ITreeItemContentProvider + org.eclipse.emf.edit.provider.IItemLabelProvider + org.eclipse.emf.edit.provider.IItemPropertySource"/> + </extension> + +</plugin> diff --git a/rba.model.view.edit/src/rba/view/provider/AlignedLayoutItemProvider.java b/rba.model.view.edit/src/rba/view/provider/AlignedLayoutItemProvider.java new file mode 100644 index 0000000..c322558 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/AlignedLayoutItemProvider.java @@ -0,0 +1,131 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import rba.view.AlignedLayout; +import rba.view.BasePoint; +import rba.view.RBAViewPackage; + +/** + * This is the item provider adapter for a {@link rba.view.AlignedLayout} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class AlignedLayoutItemProvider extends LayoutManagerItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AlignedLayoutItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addSubareaPropertyDescriptor(object); + addBasePointPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Subarea feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addSubareaPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_AlignedLayout_subarea_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_AlignedLayout_subarea_feature", + "_UI_AlignedLayout_type"), + RBAViewPackage.Literals.ALIGNED_LAYOUT__SUBAREA, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Base Point feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addBasePointPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_AlignedLayout_basePoint_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_AlignedLayout_basePoint_feature", + "_UI_AlignedLayout_type"), + RBAViewPackage.Literals.ALIGNED_LAYOUT__BASE_POINT, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + BasePoint labelValue = ((AlignedLayout) object).getBasePoint(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_AlignedLayout_type") + : getString("_UI_AlignedLayout_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(AlignedLayout.class)) { + case RBAViewPackage.ALIGNED_LAYOUT__BASE_POINT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/AllInstanceOfAreaItemProvider.java b/rba.model.view.edit/src/rba/view/provider/AllInstanceOfAreaItemProvider.java new file mode 100644 index 0000000..be663b5 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/AllInstanceOfAreaItemProvider.java @@ -0,0 +1,115 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.core.provider.SetExpressionItemProvider; + +import rba.view.AllInstanceOfArea; + +/** + * This is the item provider adapter for a {@link rba.view.AllInstanceOfArea} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class AllInstanceOfAreaItemProvider extends SetExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AllInstanceOfAreaItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AllInstanceOfArea.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AllInstanceOfArea")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((AllInstanceOfArea) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_AllInstanceOfArea_type") + : getString("_UI_AllInstanceOfArea_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/AllInstanceOfViewContentItemProvider.java b/rba.model.view.edit/src/rba/view/provider/AllInstanceOfViewContentItemProvider.java new file mode 100644 index 0000000..67d4c62 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/AllInstanceOfViewContentItemProvider.java @@ -0,0 +1,116 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.core.provider.SetExpressionItemProvider; + +import rba.view.AllInstanceOfViewContent; + +/** + * This is the item provider adapter for a {@link rba.view.AllInstanceOfViewContent} object. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ +public class AllInstanceOfViewContentItemProvider extends SetExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AllInstanceOfViewContentItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AllInstanceOfViewContent.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AllInstanceOfViewContent")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((AllInstanceOfViewContent) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_AllInstanceOfViewContent_type") + : getString("_UI_AllInstanceOfViewContent_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/AreaItemProvider.java b/rba.model.view.edit/src/rba/view/provider/AreaItemProvider.java new file mode 100644 index 0000000..366c97d --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/AreaItemProvider.java @@ -0,0 +1,404 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import rba.core.RBACoreFactory; +import rba.core.RBACorePackage; +import rba.core.provider.AllocatableItemProvider; +import rba.view.Area; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * This is the item provider adapter for a {@link rba.view.Area} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class AreaItemProvider extends AllocatableItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AreaItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(RBAViewPackage.Literals.AREA__ZORDER); + childrenFeatures.add(RBAViewPackage.Literals.AREA__SIZE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @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. + + return super.getChildFeature(object, child); + } + + /** + * This returns Area.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Area")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Area) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Area_type") + : getString("_UI_Area_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Area.class)) { + case RBAViewPackage.AREA__ZORDER: + case RBAViewPackage.AREA__SIZE: + 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. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createIsDisplayed())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createDisplayingContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createIsHidden())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createIsVisible())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createAllInstanceOfArea())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createAllInstanceOfViewContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createIsDisplayedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createIsChangedDisplay())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createIsTranslatedViewTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBAViewFactory.eINSTANCE.createHideLowerPriority())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBAViewFactory.eINSTANCE.createIsDisplayed())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBAViewFactory.eINSTANCE.createDisplayingContent())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBAViewFactory.eINSTANCE.createIsHidden())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBAViewFactory.eINSTANCE.createIsVisible())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBAViewFactory.eINSTANCE.createAllInstanceOfArea())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBAViewFactory.eINSTANCE.createAllInstanceOfViewContent())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBAViewFactory.eINSTANCE.createIsDisplayedOn())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBAViewFactory.eINSTANCE.createIsChangedDisplay())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBAViewFactory.eINSTANCE.createIsTranslatedViewTo())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBAViewFactory.eINSTANCE.createHideLowerPriority())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createComplexExpression())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBACoreFactory.eINSTANCE.createIsTypeOf())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createObjectReference())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createPreviousModifier())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createGreaterThanOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createMuchGreaterThanOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createLowerThanOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createEqualToOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createComparisonAnd())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createAndOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createOrOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createNotOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIsEqualToOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIsGreaterThanOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIsLowerThanOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIsGreaterThanEqualOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIsLowerThanEqualOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createPlusOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createImpliesOperator())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBACoreFactory.eINSTANCE.createIsActive())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createGetAllocatables())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createHasBeenDisplayed())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createActiveState())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createObjectCompare())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createThatOfOperator())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBACoreFactory.eINSTANCE.createMaxValue())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBACoreFactory.eINSTANCE.createMinValue())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBACoreFactory.eINSTANCE.createNoneValue())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createStandardValue())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIntegerValue())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createLoserTypeExpression())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createArbitrationPolicyExpression())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createSizeOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createExistsOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createForAllOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createMaxOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createMinOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createSelectOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createSetOfOperator())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createLambdaExpression())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIfStatement())); + + newChildDescriptors + .add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBACoreFactory.eINSTANCE.createIsOn())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createAllocatedContent())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createContentValue())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createGetContentsList())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createActiveContents())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createGetProperty())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createStateValue())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createHasComeLaterThan())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createHasComeEarlierThan())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createObjectCompareNot())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIsAllocatedTo())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, RBACoreFactory.eINSTANCE.createIsChanged())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createIsTranslatedTo())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__ZORDER, + RBACoreFactory.eINSTANCE.createNullExpression())); + + newChildDescriptors + .add(createChildParameter(RBAViewPackage.Literals.AREA__SIZE, RBAViewFactory.eINSTANCE.createSize())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.AREA__SIZE, + RBAViewFactory.eINSTANCE.createSizeReference())); + } + + /** + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == RBACorePackage.Literals.ALLOCATABLE__VISIBILITY + || childFeature == RBAViewPackage.Literals.AREA__ZORDER; + + if (qualify) { + return getString("_UI_CreateChild_text2", + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/AreaOperatorItemProvider.java b/rba.model.view.edit/src/rba/view/provider/AreaOperatorItemProvider.java new file mode 100644 index 0000000..f74deaa --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/AreaOperatorItemProvider.java @@ -0,0 +1,136 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +import rba.core.provider.AllocatableOperatorItemProvider; +import rba.view.AreaOperator; +import rba.view.RBAViewFactory; + +/** + * This is the item provider adapter for a {@link rba.view.AreaOperator} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class AreaOperatorItemProvider extends AllocatableOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AreaOperatorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((AreaOperator) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_AreaOperator_type") + : getString("_UI_AreaOperator_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsDisplayed())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createDisplayingContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsHidden())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsVisible())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createAllInstanceOfArea())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createAllInstanceOfViewContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsDisplayedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsChangedDisplay())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsTranslatedViewTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createHideLowerPriority())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/AreaSetItemProvider.java b/rba.model.view.edit/src/rba/view/provider/AreaSetItemProvider.java new file mode 100644 index 0000000..e9ec0e1 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/AreaSetItemProvider.java @@ -0,0 +1,109 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import rba.core.provider.AllocatableSetItemProvider; +import rba.view.AreaSet; + +/** + * This is the item provider adapter for a {@link rba.view.AreaSet} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class AreaSetItemProvider extends AllocatableSetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AreaSetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AreaSet.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AreaSet")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((AreaSet) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_AreaSet_type") + : getString("_UI_AreaSet_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/CompositeAreaItemProvider.java b/rba.model.view.edit/src/rba/view/provider/CompositeAreaItemProvider.java new file mode 100644 index 0000000..35c4ad3 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/CompositeAreaItemProvider.java @@ -0,0 +1,158 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import rba.core.provider.PackagableElementItemProvider; +import rba.view.CompositeArea; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * This is the item provider adapter for a {@link rba.view.CompositeArea} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class CompositeAreaItemProvider extends PackagableElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public CompositeAreaItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(RBAViewPackage.Literals.COMPOSITE_AREA__LAYOUT); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @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. + + return super.getChildFeature(object, child); + } + + /** + * This returns CompositeArea.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CompositeArea")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((CompositeArea) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_CompositeArea_type") + : getString("_UI_CompositeArea_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(CompositeArea.class)) { + case RBAViewPackage.COMPOSITE_AREA__LAYOUT: + 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. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.COMPOSITE_AREA__LAYOUT, + RBAViewFactory.eINSTANCE.createVerticalLayout())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.COMPOSITE_AREA__LAYOUT, + RBAViewFactory.eINSTANCE.createHorizontalLayout())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.COMPOSITE_AREA__LAYOUT, + RBAViewFactory.eINSTANCE.createFixedPositionLayout())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/DisplayItemProvider.java b/rba.model.view.edit/src/rba/view/provider/DisplayItemProvider.java new file mode 100644 index 0000000..0ed76ac --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/DisplayItemProvider.java @@ -0,0 +1,162 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import rba.core.provider.PackagableElementItemProvider; + +import rba.view.Display; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * This is the item provider adapter for a {@link rba.view.Display} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class DisplayItemProvider extends PackagableElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public DisplayItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(RBAViewPackage.Literals.DISPLAY__ROOT); + childrenFeatures.add(RBAViewPackage.Literals.DISPLAY__SIZE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @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. + + return super.getChildFeature(object, child); + } + + /** + * This returns Display.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Display")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Display) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Display_type") + : getString("_UI_Display_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Display.class)) { + case RBAViewPackage.DISPLAY__ROOT: + case RBAViewPackage.DISPLAY__SIZE: + 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. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.DISPLAY__ROOT, + RBAViewFactory.eINSTANCE.createCompositeArea())); + + newChildDescriptors.add( + createChildParameter(RBAViewPackage.Literals.DISPLAY__SIZE, RBAViewFactory.eINSTANCE.createSize())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.DISPLAY__SIZE, + RBAViewFactory.eINSTANCE.createSizeReference())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/DisplayingContentItemProvider.java b/rba.model.view.edit/src/rba/view/provider/DisplayingContentItemProvider.java new file mode 100644 index 0000000..e3a3f0b --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/DisplayingContentItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.view.DisplayingContent; + +/** + * This is the item provider adapter for a {@link rba.view.DisplayingContent} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class DisplayingContentItemProvider extends AreaOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public DisplayingContentItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns DisplayingContent.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/DisplayingContent")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((DisplayingContent) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_DisplayingContent_type") + : getString("_UI_DisplayingContent_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/FixedPositionLayoutItemProvider.java b/rba.model.view.edit/src/rba/view/provider/FixedPositionLayoutItemProvider.java new file mode 100644 index 0000000..d46cf53 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/FixedPositionLayoutItemProvider.java @@ -0,0 +1,139 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import rba.view.FixedPositionLayout; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * This is the item provider adapter for a {@link rba.view.FixedPositionLayout} object. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ +public class FixedPositionLayoutItemProvider extends LayoutManagerItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public FixedPositionLayoutItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(RBAViewPackage.Literals.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @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. + + return super.getChildFeature(object, child); + } + + /** + * This returns FixedPositionLayout.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FixedPositionLayout")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_FixedPositionLayout_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(FixedPositionLayout.class)) { + case RBAViewPackage.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION: + 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. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.FIXED_POSITION_LAYOUT__SUB_AREA_POSITION, + RBAViewFactory.eINSTANCE.createPositionContainer())); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/HideLowerPriorityItemProvider.java b/rba.model.view.edit/src/rba/view/provider/HideLowerPriorityItemProvider.java new file mode 100644 index 0000000..8e587d2 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/HideLowerPriorityItemProvider.java @@ -0,0 +1,147 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +import rba.core.provider.OperatorItemProvider; + +import rba.view.HideLowerPriority; +import rba.view.RBAViewFactory; + +/** + * This is the item provider adapter for a {@link rba.view.HideLowerPriority} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class HideLowerPriorityItemProvider extends OperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public HideLowerPriorityItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns HideLowerPriority.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/HideLowerPriority")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((HideLowerPriority) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_HideLowerPriority_type") + : getString("_UI_HideLowerPriority_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsDisplayed())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createDisplayingContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsHidden())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsVisible())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createAllInstanceOfArea())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createAllInstanceOfViewContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsDisplayedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsChangedDisplay())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsTranslatedViewTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createHideLowerPriority())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/HorizontalLayoutItemProvider.java b/rba.model.view.edit/src/rba/view/provider/HorizontalLayoutItemProvider.java new file mode 100644 index 0000000..370304f --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/HorizontalLayoutItemProvider.java @@ -0,0 +1,100 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.view.BasePoint; +import rba.view.HorizontalLayout; + +/** + * This is the item provider adapter for a {@link rba.view.HorizontalLayout} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class HorizontalLayoutItemProvider extends AlignedLayoutItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public HorizontalLayoutItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns HorizontalLayout.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/HorizontalLayout")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + BasePoint labelValue = ((HorizontalLayout) object).getBasePoint(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_HorizontalLayout_type") + : getString("_UI_HorizontalLayout_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/IsChangedDisplayItemProvider.java b/rba.model.view.edit/src/rba/view/provider/IsChangedDisplayItemProvider.java new file mode 100644 index 0000000..ef9a487 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/IsChangedDisplayItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.view.IsChangedDisplay; + +/** + * This is the item provider adapter for a {@link rba.view.IsChangedDisplay} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class IsChangedDisplayItemProvider extends AreaOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsChangedDisplayItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsChangedDisplay.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsChangedDisplay")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((IsChangedDisplay) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsChangedDisplay_type") + : getString("_UI_IsChangedDisplay_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/IsDisplayedItemProvider.java b/rba.model.view.edit/src/rba/view/provider/IsDisplayedItemProvider.java new file mode 100644 index 0000000..ed8769f --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/IsDisplayedItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.view.IsDisplayed; + +/** + * This is the item provider adapter for a {@link rba.view.IsDisplayed} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsDisplayedItemProvider extends AreaOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsDisplayedItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsDisplayed.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsDisplayed")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((IsDisplayed) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsDisplayed_type") + : getString("_UI_IsDisplayed_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/IsDisplayedOnItemProvider.java b/rba.model.view.edit/src/rba/view/provider/IsDisplayedOnItemProvider.java new file mode 100644 index 0000000..d64db04 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/IsDisplayedOnItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.view.IsDisplayedOn; + +/** + * This is the item provider adapter for a {@link rba.view.IsDisplayedOn} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsDisplayedOnItemProvider extends ViewContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsDisplayedOnItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsDisplayedOn.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsDisplayedOn")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((IsDisplayedOn) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsDisplayedOn_type") + : getString("_UI_IsDisplayedOn_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/IsHiddenItemProvider.java b/rba.model.view.edit/src/rba/view/provider/IsHiddenItemProvider.java new file mode 100644 index 0000000..dc31c21 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/IsHiddenItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.view.IsHidden; + +/** + * This is the item provider adapter for a {@link rba.view.IsHidden} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsHiddenItemProvider extends AreaOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsHiddenItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsHidden.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsHidden")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((IsHidden) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsHidden_type") + : getString("_UI_IsHidden_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/IsTranslatedViewToItemProvider.java b/rba.model.view.edit/src/rba/view/provider/IsTranslatedViewToItemProvider.java new file mode 100644 index 0000000..5a650ed --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/IsTranslatedViewToItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.view.IsTranslatedViewTo; + +/** + * This is the item provider adapter for a {@link rba.view.IsTranslatedViewTo} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class IsTranslatedViewToItemProvider extends AreaOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsTranslatedViewToItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsTranslatedViewTo.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsTranslatedViewTo")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((IsTranslatedViewTo) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsTranslatedViewTo_type") + : getString("_UI_IsTranslatedViewTo_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/IsVisibleItemProvider.java b/rba.model.view.edit/src/rba/view/provider/IsVisibleItemProvider.java new file mode 100644 index 0000000..df20f9a --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/IsVisibleItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; + +import rba.view.IsVisible; + +/** + * This is the item provider adapter for a {@link rba.view.IsVisible} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsVisibleItemProvider extends ViewContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsVisibleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsVisible.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsVisible")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((IsVisible) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsVisible_type") + : getString("_UI_IsVisible_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/LayoutManagerItemProvider.java b/rba.model.view.edit/src/rba/view/provider/LayoutManagerItemProvider.java new file mode 100644 index 0000000..7dc8dd7 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/LayoutManagerItemProvider.java @@ -0,0 +1,103 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +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.ItemProviderAdapter; + +/** + * This is the item provider adapter for a {@link rba.view.LayoutManager} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class LayoutManagerItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LayoutManagerItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_LayoutManager_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/OffsetItemProvider.java b/rba.model.view.edit/src/rba/view/provider/OffsetItemProvider.java new file mode 100644 index 0000000..b5fe55e --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/OffsetItemProvider.java @@ -0,0 +1,190 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import rba.core.provider.PackagableElementItemProvider; + +import rba.view.Offset; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * This is the item provider adapter for a {@link rba.view.Offset} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class OffsetItemProvider extends PackagableElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public OffsetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addXPropertyDescriptor(object); + addYPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the X feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addXPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Offset_x_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Offset_x_feature", "_UI_Offset_type"), + RBAViewPackage.Literals.OFFSET__X, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Y feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addYPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Offset_y_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Offset_y_feature", "_UI_Offset_type"), + RBAViewPackage.Literals.OFFSET__Y, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, 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}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(RBAViewPackage.Literals.OFFSET__SIZE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @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. + + return super.getChildFeature(object, child); + } + + /** + * This returns Offset.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Offset")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Offset) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Offset_type") + : getString("_UI_Offset_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Offset.class)) { + case RBAViewPackage.OFFSET__X: + case RBAViewPackage.OFFSET__Y: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case RBAViewPackage.OFFSET__SIZE: + 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. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.OFFSET__SIZE, + RBAViewFactory.eINSTANCE.createSizeReference())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/PositionContainerItemProvider.java b/rba.model.view.edit/src/rba/view/provider/PositionContainerItemProvider.java new file mode 100644 index 0000000..fea6194 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/PositionContainerItemProvider.java @@ -0,0 +1,228 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.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; +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.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import rba.view.PositionContainer; +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; + +/** + * This is the item provider adapter for a {@link rba.view.PositionContainer} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class PositionContainerItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public PositionContainerItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addXPropertyDescriptor(object); + addYPropertyDescriptor(object); + addBasePointPropertyDescriptor(object); + addAreaPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the X feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addXPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_PositionContainer_x_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PositionContainer_x_feature", + "_UI_PositionContainer_type"), + RBAViewPackage.Literals.POSITION_CONTAINER__X, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Y feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addYPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_PositionContainer_y_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PositionContainer_y_feature", + "_UI_PositionContainer_type"), + RBAViewPackage.Literals.POSITION_CONTAINER__Y, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Base Point feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addBasePointPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_PositionContainer_basePoint_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PositionContainer_basePoint_feature", + "_UI_PositionContainer_type"), + RBAViewPackage.Literals.POSITION_CONTAINER__BASE_POINT, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Area feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addAreaPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_PositionContainer_area_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PositionContainer_area_feature", + "_UI_PositionContainer_type"), + RBAViewPackage.Literals.POSITION_CONTAINER__AREA, true, false, true, 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}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(RBAViewPackage.Literals.POSITION_CONTAINER__OFFSET); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @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. + + return super.getChildFeature(object, child); + } + + /** + * This returns PositionContainer.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/PositionContainer")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + PositionContainer positionContainer = (PositionContainer) object; + return getString("_UI_PositionContainer_type") + " " + positionContainer.getX(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(PositionContainer.class)) { + case RBAViewPackage.POSITION_CONTAINER__X: + case RBAViewPackage.POSITION_CONTAINER__Y: + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + 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. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.POSITION_CONTAINER__OFFSET, + RBAViewFactory.eINSTANCE.createOffset())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/RBAViewItemProviderAdapterFactory.java b/rba.model.view.edit/src/rba/view/provider/RBAViewItemProviderAdapterFactory.java new file mode 100644 index 0000000..c23c07e --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/RBAViewItemProviderAdapterFactory.java @@ -0,0 +1,742 @@ +/** + */ +package rba.view.provider; + +import java.util.ArrayList; +import java.util.Collection; + +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; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import rba.view.util.RBAViewAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ +public class RBAViewItemProviderAdapterFactory extends RBAViewAdapterFactory + implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * <!-- begin-user-doc + * --> <!-- end-user-doc --> + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public RBAViewItemProviderAdapterFactory() { + 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 rba.view.ViewContent} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected ViewContentItemProvider viewContentItemProvider; + + /** + * This creates an adapter for a {@link rba.view.ViewContent}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createViewContentAdapter() { + if (viewContentItemProvider == null) { + viewContentItemProvider = new ViewContentItemProvider(this); + } + + return viewContentItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.ViewContentSet} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected ViewContentSetItemProvider viewContentSetItemProvider; + + /** + * This creates an adapter for a {@link rba.view.ViewContentSet}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createViewContentSetAdapter() { + if (viewContentSetItemProvider == null) { + viewContentSetItemProvider = new ViewContentSetItemProvider(this); + } + + return viewContentSetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.ViewContentState} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ViewContentStateItemProvider viewContentStateItemProvider; + + /** + * This creates an adapter for a {@link rba.view.ViewContentState}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createViewContentStateAdapter() { + if (viewContentStateItemProvider == null) { + viewContentStateItemProvider = new ViewContentStateItemProvider(this); + } + + return viewContentStateItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.VerticalLayout} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected VerticalLayoutItemProvider verticalLayoutItemProvider; + + /** + * This creates an adapter for a {@link rba.view.VerticalLayout}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createVerticalLayoutAdapter() { + if (verticalLayoutItemProvider == null) { + verticalLayoutItemProvider = new VerticalLayoutItemProvider(this); + } + + return verticalLayoutItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.HorizontalLayout} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected HorizontalLayoutItemProvider horizontalLayoutItemProvider; + + /** + * This creates an adapter for a {@link rba.view.HorizontalLayout}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createHorizontalLayoutAdapter() { + if (horizontalLayoutItemProvider == null) { + horizontalLayoutItemProvider = new HorizontalLayoutItemProvider(this); + } + + return horizontalLayoutItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.FixedPositionLayout} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FixedPositionLayoutItemProvider fixedPositionLayoutItemProvider; + + /** + * This creates an adapter for a {@link rba.view.FixedPositionLayout}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createFixedPositionLayoutAdapter() { + if (fixedPositionLayoutItemProvider == null) { + fixedPositionLayoutItemProvider = new FixedPositionLayoutItemProvider(this); + } + + return fixedPositionLayoutItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.PositionContainer} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PositionContainerItemProvider positionContainerItemProvider; + + /** + * This creates an adapter for a {@link rba.view.PositionContainer}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createPositionContainerAdapter() { + if (positionContainerItemProvider == null) { + positionContainerItemProvider = new PositionContainerItemProvider(this); + } + + return positionContainerItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.Display} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected DisplayItemProvider displayItemProvider; + + /** + * This creates an adapter for a {@link rba.view.Display}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createDisplayAdapter() { + if (displayItemProvider == null) { + displayItemProvider = new DisplayItemProvider(this); + } + + return displayItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.CompositeArea} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected CompositeAreaItemProvider compositeAreaItemProvider; + + /** + * This creates an adapter for a {@link rba.view.CompositeArea}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createCompositeAreaAdapter() { + if (compositeAreaItemProvider == null) { + compositeAreaItemProvider = new CompositeAreaItemProvider(this); + } + + return compositeAreaItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.Area} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected AreaItemProvider areaItemProvider; + + /** + * This creates an adapter for a {@link rba.view.Area}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createAreaAdapter() { + if (areaItemProvider == null) { + areaItemProvider = new AreaItemProvider(this); + } + + return areaItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.AreaSet} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected AreaSetItemProvider areaSetItemProvider; + + /** + * This creates an adapter for a {@link rba.view.AreaSet}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createAreaSetAdapter() { + if (areaSetItemProvider == null) { + areaSetItemProvider = new AreaSetItemProvider(this); + } + + return areaSetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.Size} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected SizeItemProvider sizeItemProvider; + + /** + * This creates an adapter for a {@link rba.view.Size}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createSizeAdapter() { + if (sizeItemProvider == null) { + sizeItemProvider = new SizeItemProvider(this); + } + + return sizeItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.SizeReference} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected SizeReferenceItemProvider sizeReferenceItemProvider; + + /** + * This creates an adapter for a {@link rba.view.SizeReference}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createSizeReferenceAdapter() { + if (sizeReferenceItemProvider == null) { + sizeReferenceItemProvider = new SizeReferenceItemProvider(this); + } + + return sizeReferenceItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.Offset} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected OffsetItemProvider offsetItemProvider; + + /** + * This creates an adapter for a {@link rba.view.Offset}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createOffsetAdapter() { + if (offsetItemProvider == null) { + offsetItemProvider = new OffsetItemProvider(this); + } + + return offsetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.IsDisplayed} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsDisplayedItemProvider isDisplayedItemProvider; + + /** + * This creates an adapter for a {@link rba.view.IsDisplayed}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsDisplayedAdapter() { + if (isDisplayedItemProvider == null) { + isDisplayedItemProvider = new IsDisplayedItemProvider(this); + } + + return isDisplayedItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.DisplayingContent} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DisplayingContentItemProvider displayingContentItemProvider; + + /** + * This creates an adapter for a {@link rba.view.DisplayingContent}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createDisplayingContentAdapter() { + if (displayingContentItemProvider == null) { + displayingContentItemProvider = new DisplayingContentItemProvider(this); + } + + return displayingContentItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.IsHidden} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsHiddenItemProvider isHiddenItemProvider; + + /** + * This creates an adapter for a {@link rba.view.IsHidden}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsHiddenAdapter() { + if (isHiddenItemProvider == null) { + isHiddenItemProvider = new IsHiddenItemProvider(this); + } + + return isHiddenItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.IsVisible} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsVisibleItemProvider isVisibleItemProvider; + + /** + * This creates an adapter for a {@link rba.view.IsVisible}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsVisibleAdapter() { + if (isVisibleItemProvider == null) { + isVisibleItemProvider = new IsVisibleItemProvider(this); + } + + return isVisibleItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.AllInstanceOfArea} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AllInstanceOfAreaItemProvider allInstanceOfAreaItemProvider; + + /** + * This creates an adapter for a {@link rba.view.AllInstanceOfArea}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createAllInstanceOfAreaAdapter() { + if (allInstanceOfAreaItemProvider == null) { + allInstanceOfAreaItemProvider = new AllInstanceOfAreaItemProvider(this); + } + + return allInstanceOfAreaItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.AllInstanceOfViewContent} instances. + * <!-- begin-user-doc + * --> <!-- end-user-doc --> + * @generated + */ + protected AllInstanceOfViewContentItemProvider allInstanceOfViewContentItemProvider; + + /** + * This creates an adapter for a {@link rba.view.AllInstanceOfViewContent}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createAllInstanceOfViewContentAdapter() { + if (allInstanceOfViewContentItemProvider == null) { + allInstanceOfViewContentItemProvider = new AllInstanceOfViewContentItemProvider(this); + } + + return allInstanceOfViewContentItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.IsDisplayedOn} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsDisplayedOnItemProvider isDisplayedOnItemProvider; + + /** + * This creates an adapter for a {@link rba.view.IsDisplayedOn}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsDisplayedOnAdapter() { + if (isDisplayedOnItemProvider == null) { + isDisplayedOnItemProvider = new IsDisplayedOnItemProvider(this); + } + + return isDisplayedOnItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.IsChangedDisplay} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IsChangedDisplayItemProvider isChangedDisplayItemProvider; + + /** + * This creates an adapter for a {@link rba.view.IsChangedDisplay}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsChangedDisplayAdapter() { + if (isChangedDisplayItemProvider == null) { + isChangedDisplayItemProvider = new IsChangedDisplayItemProvider(this); + } + + return isChangedDisplayItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.IsTranslatedViewTo} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IsTranslatedViewToItemProvider isTranslatedViewToItemProvider; + + /** + * This creates an adapter for a {@link rba.view.IsTranslatedViewTo}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsTranslatedViewToAdapter() { + if (isTranslatedViewToItemProvider == null) { + isTranslatedViewToItemProvider = new IsTranslatedViewToItemProvider(this); + } + + return isTranslatedViewToItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.view.HideLowerPriority} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected HideLowerPriorityItemProvider hideLowerPriorityItemProvider; + + /** + * This creates an adapter for a {@link rba.view.HideLowerPriority}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createHideLowerPriorityAdapter() { + if (hideLowerPriorityItemProvider == null) { + hideLowerPriorityItemProvider = new HideLowerPriorityItemProvider(this); + } + + return hideLowerPriorityItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @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; + } + + /** + * This adds a listener. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void dispose() { + if (viewContentItemProvider != null) + viewContentItemProvider.dispose(); + if (viewContentSetItemProvider != null) + viewContentSetItemProvider.dispose(); + if (viewContentStateItemProvider != null) + viewContentStateItemProvider.dispose(); + if (verticalLayoutItemProvider != null) + verticalLayoutItemProvider.dispose(); + if (horizontalLayoutItemProvider != null) + horizontalLayoutItemProvider.dispose(); + if (fixedPositionLayoutItemProvider != null) + fixedPositionLayoutItemProvider.dispose(); + if (positionContainerItemProvider != null) + positionContainerItemProvider.dispose(); + if (displayItemProvider != null) + displayItemProvider.dispose(); + if (compositeAreaItemProvider != null) + compositeAreaItemProvider.dispose(); + if (areaItemProvider != null) + areaItemProvider.dispose(); + if (areaSetItemProvider != null) + areaSetItemProvider.dispose(); + if (sizeItemProvider != null) + sizeItemProvider.dispose(); + if (sizeReferenceItemProvider != null) + sizeReferenceItemProvider.dispose(); + if (offsetItemProvider != null) + offsetItemProvider.dispose(); + if (isDisplayedItemProvider != null) + isDisplayedItemProvider.dispose(); + if (displayingContentItemProvider != null) + displayingContentItemProvider.dispose(); + if (isHiddenItemProvider != null) + isHiddenItemProvider.dispose(); + if (isVisibleItemProvider != null) + isVisibleItemProvider.dispose(); + if (allInstanceOfAreaItemProvider != null) + allInstanceOfAreaItemProvider.dispose(); + if (allInstanceOfViewContentItemProvider != null) + allInstanceOfViewContentItemProvider.dispose(); + if (isDisplayedOnItemProvider != null) + isDisplayedOnItemProvider.dispose(); + if (isChangedDisplayItemProvider != null) + isChangedDisplayItemProvider.dispose(); + if (isTranslatedViewToItemProvider != null) + isTranslatedViewToItemProvider.dispose(); + if (hideLowerPriorityItemProvider != null) + hideLowerPriorityItemProvider.dispose(); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/RbaViewEditPlugin.java b/rba.model.view.edit/src/rba/view/provider/RbaViewEditPlugin.java new file mode 100644 index 0000000..cd8be48 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/RbaViewEditPlugin.java @@ -0,0 +1,81 @@ +/** + */ +package rba.view.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +import rba.core.provider.RbaCoreEditPlugin; + +/** + * This is the central singleton for the RbaView edit plugin. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public final class RbaViewEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public static final RbaViewEditPlugin INSTANCE = new RbaViewEditPlugin(); + + /** + * Keep track of the singleton. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public RbaViewEditPlugin() { + super(new ResourceLocator[] { RbaCoreEditPlugin.INSTANCE, }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse <b>Plugin</b>. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/SizeIdentifierItemProvider.java b/rba.model.view.edit/src/rba/view/provider/SizeIdentifierItemProvider.java new file mode 100644 index 0000000..6738220 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/SizeIdentifierItemProvider.java @@ -0,0 +1,103 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +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.ItemProviderAdapter; + +/** + * This is the item provider adapter for a {@link rba.view.SizeIdentifier} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class SizeIdentifierItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SizeIdentifierItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_SizeIdentifier_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/SizeItemProvider.java b/rba.model.view.edit/src/rba/view/provider/SizeItemProvider.java new file mode 100644 index 0000000..b48bf7e --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/SizeItemProvider.java @@ -0,0 +1,153 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import rba.core.provider.PackagableElementItemProvider; + +import rba.view.RBAViewPackage; +import rba.view.Size; + +/** + * This is the item provider adapter for a {@link rba.view.Size} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class SizeItemProvider extends PackagableElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SizeItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addWidthPropertyDescriptor(object); + addHeightPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Width feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addWidthPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Size_width_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Size_width_feature", "_UI_Size_type"), + RBAViewPackage.Literals.SIZE__WIDTH, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Height feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addHeightPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Size_height_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Size_height_feature", "_UI_Size_type"), + RBAViewPackage.Literals.SIZE__HEIGHT, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This returns Size.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Size")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Size) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Size_type") + : getString("_UI_Size_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Size.class)) { + case RBAViewPackage.SIZE__WIDTH: + case RBAViewPackage.SIZE__HEIGHT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/SizeReferenceItemProvider.java b/rba.model.view.edit/src/rba/view/provider/SizeReferenceItemProvider.java new file mode 100644 index 0000000..26de1c8 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/SizeReferenceItemProvider.java @@ -0,0 +1,112 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.view.RBAViewPackage; + +/** + * This is the item provider adapter for a {@link rba.view.SizeReference} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class SizeReferenceItemProvider extends SizeIdentifierItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SizeReferenceItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addSizePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Size feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addSizePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_SizeReference_size_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_SizeReference_size_feature", + "_UI_SizeReference_type"), + RBAViewPackage.Literals.SIZE_REFERENCE__SIZE, true, false, true, null, null, null)); + } + + /** + * This returns SizeReference.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SizeReference")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_SizeReference_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/VerticalLayoutItemProvider.java b/rba.model.view.edit/src/rba/view/provider/VerticalLayoutItemProvider.java new file mode 100644 index 0000000..4a9bdac --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/VerticalLayoutItemProvider.java @@ -0,0 +1,100 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.view.BasePoint; +import rba.view.VerticalLayout; + +/** + * This is the item provider adapter for a {@link rba.view.VerticalLayout} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class VerticalLayoutItemProvider extends AlignedLayoutItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public VerticalLayoutItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns VerticalLayout.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/VerticalLayout")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + BasePoint labelValue = ((VerticalLayout) object).getBasePoint(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_VerticalLayout_type") + : getString("_UI_VerticalLayout_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/ViewContentItemProvider.java b/rba.model.view.edit/src/rba/view/provider/ViewContentItemProvider.java new file mode 100644 index 0000000..99d05bc --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/ViewContentItemProvider.java @@ -0,0 +1,161 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import rba.core.RBACorePackage; + +import rba.core.provider.ContentItemProvider; + +import rba.view.RBAViewFactory; +import rba.view.RBAViewPackage; +import rba.view.ViewContent; + +/** + * This is the item provider adapter for a {@link rba.view.ViewContent} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class ViewContentItemProvider extends ContentItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ViewContentItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(RBAViewPackage.Literals.VIEW_CONTENT__SIZE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @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. + + return super.getChildFeature(object, child); + } + + /** + * This returns ViewContent.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ViewContent")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ViewContent) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ViewContent_type") + : getString("_UI_ViewContent_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ViewContent.class)) { + case RBAViewPackage.VIEW_CONTENT__SIZE: + 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. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT__STATES, + RBAViewFactory.eINSTANCE.createViewContentState())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.VIEW_CONTENT__SIZE, + RBAViewFactory.eINSTANCE.createSize())); + + newChildDescriptors.add(createChildParameter(RBAViewPackage.Literals.VIEW_CONTENT__SIZE, + RBAViewFactory.eINSTANCE.createSizeReference())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/ViewContentOperatorItemProvider.java b/rba.model.view.edit/src/rba/view/provider/ViewContentOperatorItemProvider.java new file mode 100644 index 0000000..6fecd97 --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/ViewContentOperatorItemProvider.java @@ -0,0 +1,138 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +import rba.core.provider.ContentOperatorItemProvider; + +import rba.view.RBAViewFactory; +import rba.view.ViewContentOperator; + +/** + * This is the item provider adapter for a {@link rba.view.ViewContentOperator} object. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ +public class ViewContentOperatorItemProvider extends ContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ViewContentOperatorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + ExpressionType labelValue = ((ViewContentOperator) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_ViewContentOperator_type") + : getString("_UI_ViewContentOperator_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsDisplayed())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createDisplayingContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsHidden())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsVisible())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createAllInstanceOfArea())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createAllInstanceOfViewContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsDisplayedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsChangedDisplay())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createIsTranslatedViewTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBAViewFactory.eINSTANCE.createHideLowerPriority())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/ViewContentSetItemProvider.java b/rba.model.view.edit/src/rba/view/provider/ViewContentSetItemProvider.java new file mode 100644 index 0000000..df1de3a --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/ViewContentSetItemProvider.java @@ -0,0 +1,112 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.provider.ContentSetItemProvider; + +import rba.view.ViewContentSet; + +/** + * This is the item provider adapter for a {@link rba.view.ViewContentSet} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class ViewContentSetItemProvider extends ContentSetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ViewContentSetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns ViewContentSet.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ViewContentSet")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ViewContentSet) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ViewContentSet_type") + : getString("_UI_ViewContentSet_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.view.edit/src/rba/view/provider/ViewContentStateItemProvider.java b/rba.model.view.edit/src/rba/view/provider/ViewContentStateItemProvider.java new file mode 100644 index 0000000..6b4c0de --- /dev/null +++ b/rba.model.view.edit/src/rba/view/provider/ViewContentStateItemProvider.java @@ -0,0 +1,145 @@ +/** + */ +package rba.view.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +import rba.core.RBACorePackage; + +import rba.core.provider.ContentStateItemProvider; + +import rba.view.RBAViewFactory; +import rba.view.ViewContentState; + +/** + * This is the item provider adapter for a {@link rba.view.ViewContentState} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class ViewContentStateItemProvider extends ContentStateItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ViewContentStateItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns ViewContentState.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ViewContentState")); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ViewContentState) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ViewContentState_type") + : getString("_UI_ViewContentState_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createIsDisplayed())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createDisplayingContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createIsHidden())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createIsVisible())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createAllInstanceOfArea())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createAllInstanceOfViewContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createIsDisplayedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createIsChangedDisplay())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createIsTranslatedViewTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBAViewFactory.eINSTANCE.createHideLowerPriority())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaViewEditPlugin.INSTANCE; + } + +} |