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.sound.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.sound.edit')
42 files changed, 3131 insertions, 0 deletions
diff --git a/rba.model.sound.edit/.classpath b/rba.model.sound.edit/.classpath new file mode 100644 index 0000000..22f3064 --- /dev/null +++ b/rba.model.sound.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.sound.edit/.project b/rba.model.sound.edit/.project new file mode 100644 index 0000000..bc4e139 --- /dev/null +++ b/rba.model.sound.edit/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>rba.model.sound.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.sound.edit/META-INF/MANIFEST.MF b/rba.model.sound.edit/META-INF/MANIFEST.MF new file mode 100644 index 0000000..019c2b8 --- /dev/null +++ b/rba.model.sound.edit/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: rba.model.sound.edit;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: rba.sound.provider.RbaSoundEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: rba.sound.provider +Require-Bundle: org.eclipse.core.runtime, + rba.model.sound;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.sound.edit/build.properties b/rba.model.sound.edit/build.properties new file mode 100644 index 0000000..6e3e902 --- /dev/null +++ b/rba.model.sound.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.sound.edit/icons/full/obj16/AllInstanceOfSoundContent.gif b/rba.model.sound.edit/icons/full/obj16/AllInstanceOfSoundContent.gif Binary files differnew file mode 100644 index 0000000..1e5345f --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/AllInstanceOfSoundContent.gif diff --git a/rba.model.sound.edit/icons/full/obj16/AllInstanceOfZone.gif b/rba.model.sound.edit/icons/full/obj16/AllInstanceOfZone.gif Binary files differnew file mode 100644 index 0000000..c4fb30e --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/AllInstanceOfZone.gif diff --git a/rba.model.sound.edit/icons/full/obj16/IsAttenuated.gif b/rba.model.sound.edit/icons/full/obj16/IsAttenuated.gif Binary files differnew file mode 100644 index 0000000..7b7c428 --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/IsAttenuated.gif diff --git a/rba.model.sound.edit/icons/full/obj16/IsChangedOutput.gif b/rba.model.sound.edit/icons/full/obj16/IsChangedOutput.gif Binary files differnew file mode 100644 index 0000000..afb82ea --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/IsChangedOutput.gif diff --git a/rba.model.sound.edit/icons/full/obj16/IsMuted.gif b/rba.model.sound.edit/icons/full/obj16/IsMuted.gif Binary files differnew file mode 100644 index 0000000..cb1755a --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/IsMuted.gif diff --git a/rba.model.sound.edit/icons/full/obj16/IsOutputted.gif b/rba.model.sound.edit/icons/full/obj16/IsOutputted.gif Binary files differnew file mode 100644 index 0000000..33854e9 --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/IsOutputted.gif diff --git a/rba.model.sound.edit/icons/full/obj16/IsOutputtedOn.gif b/rba.model.sound.edit/icons/full/obj16/IsOutputtedOn.gif Binary files differnew file mode 100644 index 0000000..e4bc22d --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/IsOutputtedOn.gif diff --git a/rba.model.sound.edit/icons/full/obj16/IsSounding.gif b/rba.model.sound.edit/icons/full/obj16/IsSounding.gif Binary files differnew file mode 100644 index 0000000..cdd3b76 --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/IsSounding.gif diff --git a/rba.model.sound.edit/icons/full/obj16/IsTranslatedSoundTo.gif b/rba.model.sound.edit/icons/full/obj16/IsTranslatedSoundTo.gif Binary files differnew file mode 100644 index 0000000..53500da --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/IsTranslatedSoundTo.gif diff --git a/rba.model.sound.edit/icons/full/obj16/MuteLowerPriority.gif b/rba.model.sound.edit/icons/full/obj16/MuteLowerPriority.gif Binary files differnew file mode 100644 index 0000000..5a9bc75 --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/MuteLowerPriority.gif diff --git a/rba.model.sound.edit/icons/full/obj16/OutputtingSound.gif b/rba.model.sound.edit/icons/full/obj16/OutputtingSound.gif Binary files differnew file mode 100644 index 0000000..5a9bc75 --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/OutputtingSound.gif diff --git a/rba.model.sound.edit/icons/full/obj16/SoundContent.gif b/rba.model.sound.edit/icons/full/obj16/SoundContent.gif Binary files differnew file mode 100644 index 0000000..2b69256 --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/SoundContent.gif diff --git a/rba.model.sound.edit/icons/full/obj16/SoundContentSet.gif b/rba.model.sound.edit/icons/full/obj16/SoundContentSet.gif Binary files differnew file mode 100644 index 0000000..338fb8d --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/SoundContentSet.gif diff --git a/rba.model.sound.edit/icons/full/obj16/SoundContentState.gif b/rba.model.sound.edit/icons/full/obj16/SoundContentState.gif Binary files differnew file mode 100644 index 0000000..83afb9b --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/SoundContentState.gif diff --git a/rba.model.sound.edit/icons/full/obj16/Zone.gif b/rba.model.sound.edit/icons/full/obj16/Zone.gif Binary files differnew file mode 100644 index 0000000..35ef84e --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/Zone.gif diff --git a/rba.model.sound.edit/icons/full/obj16/ZoneSet.gif b/rba.model.sound.edit/icons/full/obj16/ZoneSet.gif Binary files differnew file mode 100644 index 0000000..9250fec --- /dev/null +++ b/rba.model.sound.edit/icons/full/obj16/ZoneSet.gif diff --git a/rba.model.sound.edit/plugin.properties b/rba.model.sound.edit/plugin.properties new file mode 100644 index 0000000..86d778f --- /dev/null +++ b/rba.model.sound.edit/plugin.properties @@ -0,0 +1,49 @@ +# + +pluginName = RBA Tool RBASound Edit Support +providerName =DENSO CORPORATION + + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_SoundContent_type = Sound Content +_UI_SoundContentSet_type = Sound Content Set +_UI_SoundContentState_type = Sound Content State +_UI_AbstractZone_type = Abstract Zone +_UI_Zone_type = Zone +_UI_ZoneSet_type = Zone Set +_UI_SoundContentOperator_type = Sound Content Operator +_UI_IsSounding_type = Is Sounding +_UI_ZoneOperator_type = Zone Operator +_UI_IsOutputted_type = Is Outputted +_UI_IsMuted_type = Is Muted +_UI_IsAttenauted_type = Is Attenauted +_UI_OutputtingSound_type = Outputting Sound +_UI_AllInstanceOfZone_type = All Instance Of Zone +_UI_AllInstanceOfSoundContent_type = All Instance Of Sound Content +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_AbstractZone_group_feature = Group +_UI_Zone_interrupt_feature = Interrupt +_UI_Zone_arbitrationPolicy_feature = Arbitration Policy +_UI_Zone_visibility_feature = Visibility +_UI_Zone_attenuate_feature = Attenuate +_UI_Zone_attenuateValue_feature = Attenuate Value +_UI_Zone_visibilityValue_feature = Visibility Value +_UI_ZoneSet_target_feature = Target +_UI_Unknown_feature = Unspecified + +_UI_IsAttenuated_type = Is Attenuated +_UI_IsOutputtedOn_type = Is Outputted On +_UI_IsChangedOutput_type = Is Changed Output +_UI_IsTranslatedSoundTo_type = Is Translated Sound To +_UI_MuteLowerPriority_type = Mute Lower Priority diff --git a/rba.model.sound.edit/plugin.xml b/rba.model.sound.edit/plugin.xml new file mode 100644 index 0000000..28593ac --- /dev/null +++ b/rba.model.sound.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 rbasound --> + <factory + uri="http://www.denso.com/ict/rba/sound" + class="rba.sound.provider.RBASoundItemProviderAdapterFactory" + 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.sound.edit/src/rba/sound/provider/AllInstanceOfSoundContentItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/AllInstanceOfSoundContentItemProvider.java new file mode 100644 index 0000000..ff97d3e --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/AllInstanceOfSoundContentItemProvider.java @@ -0,0 +1,116 @@ +/** + */ +package rba.sound.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.sound.AllInstanceOfSoundContent; + +/** + * This is the item provider adapter for a {@link rba.sound.AllInstanceOfSoundContent} object. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ +public class AllInstanceOfSoundContentItemProvider extends SetExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AllInstanceOfSoundContentItemProvider(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 AllInstanceOfSoundContent.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AllInstanceOfSoundContent")); + } + + /** + * <!-- 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 = ((AllInstanceOfSoundContent) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_AllInstanceOfSoundContent_type") + : getString("_UI_AllInstanceOfSoundContent_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 RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/AllInstanceOfZoneItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/AllInstanceOfZoneItemProvider.java new file mode 100644 index 0000000..522563b --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/AllInstanceOfZoneItemProvider.java @@ -0,0 +1,115 @@ +/** + */ +package rba.sound.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.sound.AllInstanceOfZone; + +/** + * This is the item provider adapter for a {@link rba.sound.AllInstanceOfZone} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class AllInstanceOfZoneItemProvider extends SetExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AllInstanceOfZoneItemProvider(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 AllInstanceOfZone.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AllInstanceOfZone")); + } + + /** + * <!-- 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 = ((AllInstanceOfZone) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_AllInstanceOfZone_type") + : getString("_UI_AllInstanceOfZone_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 RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/IsAttenuatedItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/IsAttenuatedItemProvider.java new file mode 100644 index 0000000..147eda2 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/IsAttenuatedItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.sound.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.sound.IsAttenuated; + +/** + * This is the item provider adapter for a {@link rba.sound.IsAttenuated} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsAttenuatedItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsAttenuatedItemProvider(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 IsAttenuated.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsAttenuated")); + } + + /** + * <!-- 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 = ((IsAttenuated) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsAttenuated_type") + : getString("_UI_IsAttenuated_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.sound.edit/src/rba/sound/provider/IsChangedOutputItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/IsChangedOutputItemProvider.java new file mode 100644 index 0000000..d2f90db --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/IsChangedOutputItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.sound.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.sound.IsChangedOutput; + +/** + * This is the item provider adapter for a {@link rba.sound.IsChangedOutput} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class IsChangedOutputItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsChangedOutputItemProvider(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 IsChangedOutput.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsChangedOutput")); + } + + /** + * <!-- 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 = ((IsChangedOutput) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsChangedOutput_type") + : getString("_UI_IsChangedOutput_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.sound.edit/src/rba/sound/provider/IsMutedItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/IsMutedItemProvider.java new file mode 100644 index 0000000..3c99cb9 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/IsMutedItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.sound.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.sound.IsMuted; + +/** + * This is the item provider adapter for a {@link rba.sound.IsMuted} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsMutedItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsMutedItemProvider(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 IsMuted.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsMuted")); + } + + /** + * <!-- 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 = ((IsMuted) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsMuted_type") + : getString("_UI_IsMuted_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.sound.edit/src/rba/sound/provider/IsOutputtedItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/IsOutputtedItemProvider.java new file mode 100644 index 0000000..cd7ebd1 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/IsOutputtedItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.sound.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.sound.IsOutputted; + +/** + * This is the item provider adapter for a {@link rba.sound.IsOutputted} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsOutputtedItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsOutputtedItemProvider(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 IsOutputted.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsOutputted")); + } + + /** + * <!-- 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 = ((IsOutputted) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsOutputted_type") + : getString("_UI_IsOutputted_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.sound.edit/src/rba/sound/provider/IsOutputtedOnItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/IsOutputtedOnItemProvider.java new file mode 100644 index 0000000..ead55ca --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/IsOutputtedOnItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.sound.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.sound.IsOutputtedOn; + +/** + * This is the item provider adapter for a {@link rba.sound.IsOutputtedOn} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsOutputtedOnItemProvider extends SoundContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsOutputtedOnItemProvider(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 IsOutputtedOn.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsOutputtedOn")); + } + + /** + * <!-- 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 = ((IsOutputtedOn) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsOutputtedOn_type") + : getString("_UI_IsOutputtedOn_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.sound.edit/src/rba/sound/provider/IsSoundingItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/IsSoundingItemProvider.java new file mode 100644 index 0000000..7239c8b --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/IsSoundingItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.sound.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.sound.IsSounding; + +/** + * This is the item provider adapter for a {@link rba.sound.IsSounding} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class IsSoundingItemProvider extends SoundContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsSoundingItemProvider(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 IsSounding.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsSounding")); + } + + /** + * <!-- 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 = ((IsSounding) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsSounding_type") + : getString("_UI_IsSounding_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.sound.edit/src/rba/sound/provider/IsTranslatedSoundToItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/IsTranslatedSoundToItemProvider.java new file mode 100644 index 0000000..86e30e4 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/IsTranslatedSoundToItemProvider.java @@ -0,0 +1,102 @@ +/** + */ +package rba.sound.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.sound.IsTranslatedSoundTo; + +/** + * This is the item provider adapter for a {@link rba.sound.IsTranslatedSoundTo} object. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ +public class IsTranslatedSoundToItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsTranslatedSoundToItemProvider(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 IsTranslatedSoundTo.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsTranslatedSoundTo")); + } + + /** + * <!-- 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 = ((IsTranslatedSoundTo) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_IsTranslatedSoundTo_type") + : getString("_UI_IsTranslatedSoundTo_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.sound.edit/src/rba/sound/provider/MuteLowerPriorityItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/MuteLowerPriorityItemProvider.java new file mode 100644 index 0000000..a6299c6 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/MuteLowerPriorityItemProvider.java @@ -0,0 +1,150 @@ +/** + */ +package rba.sound.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.sound.MuteLowerPriority; +import rba.sound.RBASoundFactory; + +/** + * This is the item provider adapter for a {@link rba.sound.MuteLowerPriority} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class MuteLowerPriorityItemProvider extends OperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public MuteLowerPriorityItemProvider(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 MuteLowerPriority.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/MuteLowerPriority")); + } + + /** + * <!-- 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 = ((MuteLowerPriority) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_MuteLowerPriority_type") + : getString("_UI_MuteLowerPriority_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, + RBASoundFactory.eINSTANCE.createIsSounding())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsOutputted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsMuted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsAttenuated())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createOutputtingSound())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createAllInstanceOfZone())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createAllInstanceOfSoundContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsOutputtedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsChangedOutput())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsTranslatedSoundTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createMuteLowerPriority())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/OutputtingSoundItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/OutputtingSoundItemProvider.java new file mode 100644 index 0000000..c452908 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/OutputtingSoundItemProvider.java @@ -0,0 +1,101 @@ +/** + */ +package rba.sound.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.sound.OutputtingSound; + +/** + * This is the item provider adapter for a {@link rba.sound.OutputtingSound} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class OutputtingSoundItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public OutputtingSoundItemProvider(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 OutputtingSound.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/OutputtingSound")); + } + + /** + * <!-- 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 = ((OutputtingSound) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_OutputtingSound_type") + : getString("_UI_OutputtingSound_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.sound.edit/src/rba/sound/provider/RBASoundItemProviderAdapterFactory.java b/rba.model.sound.edit/src/rba/sound/provider/RBASoundItemProviderAdapterFactory.java new file mode 100644 index 0000000..8390846 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/RBASoundItemProviderAdapterFactory.java @@ -0,0 +1,549 @@ +/** + */ +package rba.sound.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.sound.util.RBASoundAdapterFactory; + +/** + * 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 RBASoundItemProviderAdapterFactory extends RBASoundAdapterFactory + 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 RBASoundItemProviderAdapterFactory() { + 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.sound.SoundContent} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected SoundContentItemProvider soundContentItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.SoundContent}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createSoundContentAdapter() { + if (soundContentItemProvider == null) { + soundContentItemProvider = new SoundContentItemProvider(this); + } + + return soundContentItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.SoundContentSet} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SoundContentSetItemProvider soundContentSetItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.SoundContentSet}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createSoundContentSetAdapter() { + if (soundContentSetItemProvider == null) { + soundContentSetItemProvider = new SoundContentSetItemProvider(this); + } + + return soundContentSetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.SoundContentState} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SoundContentStateItemProvider soundContentStateItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.SoundContentState}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createSoundContentStateAdapter() { + if (soundContentStateItemProvider == null) { + soundContentStateItemProvider = new SoundContentStateItemProvider(this); + } + + return soundContentStateItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.Zone} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected ZoneItemProvider zoneItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.Zone}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createZoneAdapter() { + if (zoneItemProvider == null) { + zoneItemProvider = new ZoneItemProvider(this); + } + + return zoneItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.ZoneSet} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected ZoneSetItemProvider zoneSetItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.ZoneSet}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createZoneSetAdapter() { + if (zoneSetItemProvider == null) { + zoneSetItemProvider = new ZoneSetItemProvider(this); + } + + return zoneSetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.IsSounding} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsSoundingItemProvider isSoundingItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsSounding}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsSoundingAdapter() { + if (isSoundingItemProvider == null) { + isSoundingItemProvider = new IsSoundingItemProvider(this); + } + + return isSoundingItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.IsOutputted} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsOutputtedItemProvider isOutputtedItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsOutputted}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsOutputtedAdapter() { + if (isOutputtedItemProvider == null) { + isOutputtedItemProvider = new IsOutputtedItemProvider(this); + } + + return isOutputtedItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.IsMuted} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsMutedItemProvider isMutedItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsMuted}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsMutedAdapter() { + if (isMutedItemProvider == null) { + isMutedItemProvider = new IsMutedItemProvider(this); + } + + return isMutedItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.IsAttenuated} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsAttenuatedItemProvider isAttenuatedItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsAttenuated}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsAttenuatedAdapter() { + if (isAttenuatedItemProvider == null) { + isAttenuatedItemProvider = new IsAttenuatedItemProvider(this); + } + + return isAttenuatedItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.OutputtingSound} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected OutputtingSoundItemProvider outputtingSoundItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.OutputtingSound}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createOutputtingSoundAdapter() { + if (outputtingSoundItemProvider == null) { + outputtingSoundItemProvider = new OutputtingSoundItemProvider(this); + } + + return outputtingSoundItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.AllInstanceOfZone} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AllInstanceOfZoneItemProvider allInstanceOfZoneItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.AllInstanceOfZone}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createAllInstanceOfZoneAdapter() { + if (allInstanceOfZoneItemProvider == null) { + allInstanceOfZoneItemProvider = new AllInstanceOfZoneItemProvider(this); + } + + return allInstanceOfZoneItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.AllInstanceOfSoundContent} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AllInstanceOfSoundContentItemProvider allInstanceOfSoundContentItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.AllInstanceOfSoundContent}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createAllInstanceOfSoundContentAdapter() { + if (allInstanceOfSoundContentItemProvider == null) { + allInstanceOfSoundContentItemProvider = new AllInstanceOfSoundContentItemProvider(this); + } + + return allInstanceOfSoundContentItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.IsOutputtedOn} instances. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected IsOutputtedOnItemProvider isOutputtedOnItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsOutputtedOn}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsOutputtedOnAdapter() { + if (isOutputtedOnItemProvider == null) { + isOutputtedOnItemProvider = new IsOutputtedOnItemProvider(this); + } + + return isOutputtedOnItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.IsChangedOutput} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IsChangedOutputItemProvider isChangedOutputItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsChangedOutput}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsChangedOutputAdapter() { + if (isChangedOutputItemProvider == null) { + isChangedOutputItemProvider = new IsChangedOutputItemProvider(this); + } + + return isChangedOutputItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.IsTranslatedSoundTo} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IsTranslatedSoundToItemProvider isTranslatedSoundToItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsTranslatedSoundTo}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createIsTranslatedSoundToAdapter() { + if (isTranslatedSoundToItemProvider == null) { + isTranslatedSoundToItemProvider = new IsTranslatedSoundToItemProvider(this); + } + + return isTranslatedSoundToItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link rba.sound.MuteLowerPriority} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MuteLowerPriorityItemProvider muteLowerPriorityItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.MuteLowerPriority}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createMuteLowerPriorityAdapter() { + if (muteLowerPriorityItemProvider == null) { + muteLowerPriorityItemProvider = new MuteLowerPriorityItemProvider(this); + } + + return muteLowerPriorityItemProvider; + } + + /** + * 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 (soundContentItemProvider != null) + soundContentItemProvider.dispose(); + if (soundContentSetItemProvider != null) + soundContentSetItemProvider.dispose(); + if (soundContentStateItemProvider != null) + soundContentStateItemProvider.dispose(); + if (zoneItemProvider != null) + zoneItemProvider.dispose(); + if (zoneSetItemProvider != null) + zoneSetItemProvider.dispose(); + if (isSoundingItemProvider != null) + isSoundingItemProvider.dispose(); + if (isOutputtedItemProvider != null) + isOutputtedItemProvider.dispose(); + if (isMutedItemProvider != null) + isMutedItemProvider.dispose(); + if (isAttenuatedItemProvider != null) + isAttenuatedItemProvider.dispose(); + if (outputtingSoundItemProvider != null) + outputtingSoundItemProvider.dispose(); + if (allInstanceOfZoneItemProvider != null) + allInstanceOfZoneItemProvider.dispose(); + if (allInstanceOfSoundContentItemProvider != null) + allInstanceOfSoundContentItemProvider.dispose(); + if (isOutputtedOnItemProvider != null) + isOutputtedOnItemProvider.dispose(); + if (isChangedOutputItemProvider != null) + isChangedOutputItemProvider.dispose(); + if (isTranslatedSoundToItemProvider != null) + isTranslatedSoundToItemProvider.dispose(); + if (muteLowerPriorityItemProvider != null) + muteLowerPriorityItemProvider.dispose(); + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/RbaSoundEditPlugin.java b/rba.model.sound.edit/src/rba/sound/provider/RbaSoundEditPlugin.java new file mode 100644 index 0000000..1b28f2c --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/RbaSoundEditPlugin.java @@ -0,0 +1,81 @@ +/** + */ +package rba.sound.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 RbaSound edit plugin. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public final class RbaSoundEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public static final RbaSoundEditPlugin INSTANCE = new RbaSoundEditPlugin(); + + /** + * 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 RbaSoundEditPlugin() { + 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.sound.edit/src/rba/sound/provider/SoundContentItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/SoundContentItemProvider.java new file mode 100644 index 0000000..7ea448a --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/SoundContentItemProvider.java @@ -0,0 +1,125 @@ +/** + */ +package rba.sound.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.ContentItemProvider; + +import rba.sound.RBASoundFactory; +import rba.sound.SoundContent; + +/** + * This is the item provider adapter for a {@link rba.sound.SoundContent} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class SoundContentItemProvider extends ContentItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SoundContentItemProvider(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 SoundContent.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SoundContent")); + } + + /** + * <!-- 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 = ((SoundContent) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_SoundContent_type") + : getString("_UI_SoundContent_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__STATES, + RBASoundFactory.eINSTANCE.createSoundContentState())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/SoundContentOperatorItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/SoundContentOperatorItemProvider.java new file mode 100644 index 0000000..fac62d9 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/SoundContentOperatorItemProvider.java @@ -0,0 +1,141 @@ +/** + */ +package rba.sound.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.sound.RBASoundFactory; +import rba.sound.SoundContentOperator; + +/** + * This is the item provider adapter for a {@link rba.sound.SoundContentOperator} object. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ +public class SoundContentOperatorItemProvider extends ContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SoundContentOperatorItemProvider(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 = ((SoundContentOperator) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_SoundContentOperator_type") + : getString("_UI_SoundContentOperator_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, + RBASoundFactory.eINSTANCE.createIsSounding())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsOutputted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsMuted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsAttenuated())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createOutputtingSound())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createAllInstanceOfZone())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createAllInstanceOfSoundContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsOutputtedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsChangedOutput())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsTranslatedSoundTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createMuteLowerPriority())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/SoundContentSetItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/SoundContentSetItemProvider.java new file mode 100644 index 0000000..79eeff2 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/SoundContentSetItemProvider.java @@ -0,0 +1,112 @@ +/** + */ +package rba.sound.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.sound.SoundContentSet; + +/** + * This is the item provider adapter for a {@link rba.sound.SoundContentSet} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class SoundContentSetItemProvider extends ContentSetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SoundContentSetItemProvider(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 SoundContentSet.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SoundContentSet")); + } + + /** + * <!-- 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 = ((SoundContentSet) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_SoundContentSet_type") + : getString("_UI_SoundContentSet_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 RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/SoundContentStateItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/SoundContentStateItemProvider.java new file mode 100644 index 0000000..0bced94 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/SoundContentStateItemProvider.java @@ -0,0 +1,148 @@ +/** + */ +package rba.sound.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.sound.RBASoundFactory; +import rba.sound.SoundContentState; + +/** + * This is the item provider adapter for a {@link rba.sound.SoundContentState} object. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @generated + */ +public class SoundContentStateItemProvider extends ContentStateItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SoundContentStateItemProvider(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 SoundContentState.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SoundContentState")); + } + + /** + * <!-- 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 = ((SoundContentState) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_SoundContentState_type") + : getString("_UI_SoundContentState_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, + RBASoundFactory.eINSTANCE.createIsSounding())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createIsOutputted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createIsMuted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createIsAttenuated())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createOutputtingSound())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createAllInstanceOfZone())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createAllInstanceOfSoundContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createIsOutputtedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createIsChangedOutput())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createIsTranslatedSoundTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.CONTENT_STATE__VALUE, + RBASoundFactory.eINSTANCE.createMuteLowerPriority())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/ZoneItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/ZoneItemProvider.java new file mode 100644 index 0000000..a0ea2bc --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/ZoneItemProvider.java @@ -0,0 +1,402 @@ +/** + */ +package rba.sound.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.sound.RBASoundFactory; +import rba.sound.RBASoundPackage; +import rba.sound.Zone; + +/** + * This is the item provider adapter for a {@link rba.sound.Zone} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class ZoneItemProvider extends AllocatableItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ZoneItemProvider(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(RBASoundPackage.Literals.ZONE__ATTENUATE); + } + 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 Zone.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Zone")); + } + + /** + * <!-- 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 = ((Zone) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Zone_type") + : getString("_UI_Zone_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(Zone.class)) { + case RBASoundPackage.ZONE__ATTENUATE: + 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, + RBASoundFactory.eINSTANCE.createIsSounding())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createIsOutputted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createIsMuted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createIsAttenuated())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createOutputtingSound())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createAllInstanceOfZone())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createAllInstanceOfSoundContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createIsOutputtedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createIsChangedOutput())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createIsTranslatedSoundTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.ALLOCATABLE__VISIBILITY, + RBASoundFactory.eINSTANCE.createMuteLowerPriority())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createIsSounding())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createIsOutputted())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createIsMuted())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createIsAttenuated())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createOutputtingSound())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createAllInstanceOfZone())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createAllInstanceOfSoundContent())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createIsOutputtedOn())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createIsChangedOutput())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createIsTranslatedSoundTo())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBASoundFactory.eINSTANCE.createMuteLowerPriority())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createComplexExpression())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsTypeOf())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createObjectReference())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createPreviousModifier())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createGreaterThanOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createMuchGreaterThanOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createLowerThanOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createEqualToOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createComparisonAnd())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createAndOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createOrOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createNotOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsEqualToOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsGreaterThanOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsLowerThanOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsGreaterThanEqualOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsLowerThanEqualOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createPlusOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createImpliesOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsActive())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createGetAllocatables())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createHasBeenDisplayed())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createActiveState())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createObjectCompare())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createThatOfOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createMaxValue())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createMinValue())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createNoneValue())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createStandardValue())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIntegerValue())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createLoserTypeExpression())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createArbitrationPolicyExpression())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createSizeOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createExistsOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createForAllOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createMaxOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createMinOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createSelectOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createSetOfOperator())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createLambdaExpression())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIfStatement())); + + newChildDescriptors.add( + createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, RBACoreFactory.eINSTANCE.createIsOn())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createAllocatedContent())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createContentValue())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createGetContentsList())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createActiveContents())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createGetProperty())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createStateValue())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createHasComeLaterThan())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createHasComeEarlierThan())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createObjectCompareNot())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsAllocatedTo())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsChanged())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createIsTranslatedTo())); + + newChildDescriptors.add(createChildParameter(RBASoundPackage.Literals.ZONE__ATTENUATE, + RBACoreFactory.eINSTANCE.createNullExpression())); + } + + /** + * 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 == RBASoundPackage.Literals.ZONE__ATTENUATE; + + 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 RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/ZoneOperatorItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/ZoneOperatorItemProvider.java new file mode 100644 index 0000000..dcd729d --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/ZoneOperatorItemProvider.java @@ -0,0 +1,140 @@ +/** + */ +package rba.sound.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.sound.RBASoundFactory; +import rba.sound.ZoneOperator; + +/** + * This is the item provider adapter for a {@link rba.sound.ZoneOperator} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class ZoneOperatorItemProvider extends OperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ZoneOperatorItemProvider(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 = ((ZoneOperator) object).getType(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_ZoneOperator_type") + : getString("_UI_ZoneOperator_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, + RBASoundFactory.eINSTANCE.createIsSounding())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsOutputted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsMuted())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsAttenuated())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createOutputtingSound())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createAllInstanceOfZone())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createAllInstanceOfSoundContent())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsOutputtedOn())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsChangedOutput())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createIsTranslatedSoundTo())); + + newChildDescriptors.add(createChildParameter(RBACorePackage.Literals.OPERATOR__OPERAND, + RBASoundFactory.eINSTANCE.createMuteLowerPriority())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaSoundEditPlugin.INSTANCE; + } + +} diff --git a/rba.model.sound.edit/src/rba/sound/provider/ZoneSetItemProvider.java b/rba.model.sound.edit/src/rba/sound/provider/ZoneSetItemProvider.java new file mode 100644 index 0000000..8ee0b57 --- /dev/null +++ b/rba.model.sound.edit/src/rba/sound/provider/ZoneSetItemProvider.java @@ -0,0 +1,110 @@ +/** + */ +package rba.sound.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.sound.ZoneSet; + +/** + * This is the item provider adapter for a {@link rba.sound.ZoneSet} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ +public class ZoneSetItemProvider extends AllocatableSetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ZoneSetItemProvider(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 ZoneSet.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ZoneSet")); + } + + /** + * <!-- 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 = ((ZoneSet) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ZoneSet_type") + : getString("_UI_ZoneSet_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 RbaSoundEditPlugin.INSTANCE; + } + +} |