From be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 Mon Sep 17 00:00:00 2001 From: Kenji Hosokawa Date: Tue, 3 Aug 2021 18:42:39 +0900 Subject: Initial commit Bug-AGL: SPEC-4033 Signed-off-by: Kenji Hosokawa --- rba.model.sound.edit/.classpath | 7 + rba.model.sound.edit/.project | 28 ++ rba.model.sound.edit/META-INF/MANIFEST.MF | 17 + rba.model.sound.edit/build.properties | 10 + .../icons/full/obj16/AllInstanceOfSoundContent.gif | Bin 0 -> 129 bytes .../icons/full/obj16/AllInstanceOfZone.gif | Bin 0 -> 129 bytes .../icons/full/obj16/IsAttenuated.gif | Bin 0 -> 129 bytes .../icons/full/obj16/IsChangedOutput.gif | Bin 0 -> 129 bytes rba.model.sound.edit/icons/full/obj16/IsMuted.gif | Bin 0 -> 129 bytes .../icons/full/obj16/IsOutputted.gif | Bin 0 -> 129 bytes .../icons/full/obj16/IsOutputtedOn.gif | Bin 0 -> 129 bytes .../icons/full/obj16/IsSounding.gif | Bin 0 -> 129 bytes .../icons/full/obj16/IsTranslatedSoundTo.gif | Bin 0 -> 129 bytes .../icons/full/obj16/MuteLowerPriority.gif | Bin 0 -> 129 bytes .../icons/full/obj16/OutputtingSound.gif | Bin 0 -> 129 bytes .../icons/full/obj16/SoundContent.gif | Bin 0 -> 129 bytes .../icons/full/obj16/SoundContentSet.gif | Bin 0 -> 129 bytes .../icons/full/obj16/SoundContentState.gif | Bin 0 -> 129 bytes rba.model.sound.edit/icons/full/obj16/Zone.gif | Bin 0 -> 129 bytes rba.model.sound.edit/icons/full/obj16/ZoneSet.gif | Bin 0 -> 129 bytes rba.model.sound.edit/plugin.properties | 49 ++ rba.model.sound.edit/plugin.xml | 22 + .../AllInstanceOfSoundContentItemProvider.java | 116 +++++ .../provider/AllInstanceOfZoneItemProvider.java | 115 +++++ .../sound/provider/IsAttenuatedItemProvider.java | 101 ++++ .../provider/IsChangedOutputItemProvider.java | 101 ++++ .../rba/sound/provider/IsMutedItemProvider.java | 101 ++++ .../sound/provider/IsOutputtedItemProvider.java | 101 ++++ .../sound/provider/IsOutputtedOnItemProvider.java | 101 ++++ .../rba/sound/provider/IsSoundingItemProvider.java | 101 ++++ .../provider/IsTranslatedSoundToItemProvider.java | 102 ++++ .../provider/MuteLowerPriorityItemProvider.java | 150 ++++++ .../provider/OutputtingSoundItemProvider.java | 101 ++++ .../RBASoundItemProviderAdapterFactory.java | 549 +++++++++++++++++++++ .../src/rba/sound/provider/RbaSoundEditPlugin.java | 81 +++ .../sound/provider/SoundContentItemProvider.java | 125 +++++ .../provider/SoundContentOperatorItemProvider.java | 141 ++++++ .../provider/SoundContentSetItemProvider.java | 112 +++++ .../provider/SoundContentStateItemProvider.java | 148 ++++++ .../src/rba/sound/provider/ZoneItemProvider.java | 402 +++++++++++++++ .../sound/provider/ZoneOperatorItemProvider.java | 140 ++++++ .../rba/sound/provider/ZoneSetItemProvider.java | 110 +++++ 42 files changed, 3131 insertions(+) create mode 100644 rba.model.sound.edit/.classpath create mode 100644 rba.model.sound.edit/.project create mode 100644 rba.model.sound.edit/META-INF/MANIFEST.MF create mode 100644 rba.model.sound.edit/build.properties create mode 100644 rba.model.sound.edit/icons/full/obj16/AllInstanceOfSoundContent.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/AllInstanceOfZone.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/IsAttenuated.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/IsChangedOutput.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/IsMuted.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/IsOutputted.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/IsOutputtedOn.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/IsSounding.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/IsTranslatedSoundTo.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/MuteLowerPriority.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/OutputtingSound.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/SoundContent.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/SoundContentSet.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/SoundContentState.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/Zone.gif create mode 100644 rba.model.sound.edit/icons/full/obj16/ZoneSet.gif create mode 100644 rba.model.sound.edit/plugin.properties create mode 100644 rba.model.sound.edit/plugin.xml create mode 100644 rba.model.sound.edit/src/rba/sound/provider/AllInstanceOfSoundContentItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/AllInstanceOfZoneItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/IsAttenuatedItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/IsChangedOutputItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/IsMutedItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/IsOutputtedItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/IsOutputtedOnItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/IsSoundingItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/IsTranslatedSoundToItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/MuteLowerPriorityItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/OutputtingSoundItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/RBASoundItemProviderAdapterFactory.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/RbaSoundEditPlugin.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/SoundContentItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/SoundContentOperatorItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/SoundContentSetItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/SoundContentStateItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/ZoneItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/ZoneOperatorItemProvider.java create mode 100644 rba.model.sound.edit/src/rba/sound/provider/ZoneSetItemProvider.java (limited to 'rba.model.sound.edit') 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 @@ + + + + + + + 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 @@ + + + rba.model.sound.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + 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 new file mode 100644 index 0000000..1e5345f Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/AllInstanceOfSoundContent.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/AllInstanceOfZone.gif b/rba.model.sound.edit/icons/full/obj16/AllInstanceOfZone.gif new file mode 100644 index 0000000..c4fb30e Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/AllInstanceOfZone.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/IsAttenuated.gif b/rba.model.sound.edit/icons/full/obj16/IsAttenuated.gif new file mode 100644 index 0000000..7b7c428 Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/IsAttenuated.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/IsChangedOutput.gif b/rba.model.sound.edit/icons/full/obj16/IsChangedOutput.gif new file mode 100644 index 0000000..afb82ea Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/IsChangedOutput.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/IsMuted.gif b/rba.model.sound.edit/icons/full/obj16/IsMuted.gif new file mode 100644 index 0000000..cb1755a Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/IsMuted.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/IsOutputted.gif b/rba.model.sound.edit/icons/full/obj16/IsOutputted.gif new file mode 100644 index 0000000..33854e9 Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/IsOutputted.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/IsOutputtedOn.gif b/rba.model.sound.edit/icons/full/obj16/IsOutputtedOn.gif new file mode 100644 index 0000000..e4bc22d Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/IsOutputtedOn.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/IsSounding.gif b/rba.model.sound.edit/icons/full/obj16/IsSounding.gif new file mode 100644 index 0000000..cdd3b76 Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/IsSounding.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/IsTranslatedSoundTo.gif b/rba.model.sound.edit/icons/full/obj16/IsTranslatedSoundTo.gif new file mode 100644 index 0000000..53500da Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/IsTranslatedSoundTo.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/MuteLowerPriority.gif b/rba.model.sound.edit/icons/full/obj16/MuteLowerPriority.gif new file mode 100644 index 0000000..5a9bc75 Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/MuteLowerPriority.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/OutputtingSound.gif b/rba.model.sound.edit/icons/full/obj16/OutputtingSound.gif new file mode 100644 index 0000000..5a9bc75 Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/OutputtingSound.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/SoundContent.gif b/rba.model.sound.edit/icons/full/obj16/SoundContent.gif new file mode 100644 index 0000000..2b69256 Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/SoundContent.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/SoundContentSet.gif b/rba.model.sound.edit/icons/full/obj16/SoundContentSet.gif new file mode 100644 index 0000000..338fb8d Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/SoundContentSet.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/SoundContentState.gif b/rba.model.sound.edit/icons/full/obj16/SoundContentState.gif new file mode 100644 index 0000000..83afb9b Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/SoundContentState.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/Zone.gif b/rba.model.sound.edit/icons/full/obj16/Zone.gif new file mode 100644 index 0000000..35ef84e Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/Zone.gif differ diff --git a/rba.model.sound.edit/icons/full/obj16/ZoneSet.gif b/rba.model.sound.edit/icons/full/obj16/ZoneSet.gif new file mode 100644 index 0000000..9250fec Binary files /dev/null and b/rba.model.sound.edit/icons/full/obj16/ZoneSet.gif differ 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 @@ + + + + + + + + + + + + + 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. + * + * @generated + */ +public class AllInstanceOfSoundContentItemProvider extends SetExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public AllInstanceOfSoundContentItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AllInstanceOfSoundContent.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AllInstanceOfSoundContent")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * @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. + * @generated + */ +public class AllInstanceOfZoneItemProvider extends SetExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public AllInstanceOfZoneItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AllInstanceOfZone.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AllInstanceOfZone")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * @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. + * + * @generated + */ +public class IsAttenuatedItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public IsAttenuatedItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsAttenuated.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsAttenuated")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * @generated + */ +public class IsChangedOutputItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public IsChangedOutputItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsChangedOutput.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsChangedOutput")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @generated + */ +public class IsMutedItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public IsMutedItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsMuted.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsMuted")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @generated + */ +public class IsOutputtedItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public IsOutputtedItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsOutputted.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsOutputted")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @generated + */ +public class IsOutputtedOnItemProvider extends SoundContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public IsOutputtedOnItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsOutputtedOn.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsOutputtedOn")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @generated + */ +public class IsSoundingItemProvider extends SoundContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public IsSoundingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsSounding.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsSounding")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @generated + */ +public class IsTranslatedSoundToItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public IsTranslatedSoundToItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IsTranslatedSoundTo.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IsTranslatedSoundTo")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * @generated + */ +public class MuteLowerPriorityItemProvider extends OperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public MuteLowerPriorityItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns MuteLowerPriority.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/MuteLowerPriority")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @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. + * @generated + */ +public class OutputtingSoundItemProvider extends ZoneOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public OutputtingSoundItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns OutputtingSound.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/OutputtingSound")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @generated + */ +public class RBASoundItemProviderAdapterFactory extends RBASoundAdapterFactory + implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * @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. + * + * @generated + */ + protected SoundContentItemProvider soundContentItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.SoundContent}. + * + * @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. + * + * + * @generated + */ + protected SoundContentSetItemProvider soundContentSetItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.SoundContentSet}. + * + * @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. + * + * + * @generated + */ + protected SoundContentStateItemProvider soundContentStateItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.SoundContentState}. + * + * @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. + * + * @generated + */ + protected ZoneItemProvider zoneItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.Zone}. + * + * @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. + * + * @generated + */ + protected ZoneSetItemProvider zoneSetItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.ZoneSet}. + * + * @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. + * + * @generated + */ + protected IsSoundingItemProvider isSoundingItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsSounding}. + * + * @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. + * + * @generated + */ + protected IsOutputtedItemProvider isOutputtedItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsOutputted}. + * + * @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. + * + * @generated + */ + protected IsMutedItemProvider isMutedItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsMuted}. + * + * @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. + * + * @generated + */ + protected IsAttenuatedItemProvider isAttenuatedItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsAttenuated}. + * + * @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. + * + * + * @generated + */ + protected OutputtingSoundItemProvider outputtingSoundItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.OutputtingSound}. + * + * @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. + * + * + * @generated + */ + protected AllInstanceOfZoneItemProvider allInstanceOfZoneItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.AllInstanceOfZone}. + * + * @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. + * @generated + */ + protected AllInstanceOfSoundContentItemProvider allInstanceOfSoundContentItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.AllInstanceOfSoundContent}. + * + * @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. + * + * @generated + */ + protected IsOutputtedOnItemProvider isOutputtedOnItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsOutputtedOn}. + * + * @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. + * + * + * @generated + */ + protected IsChangedOutputItemProvider isChangedOutputItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsChangedOutput}. + * + * @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. + * + * + * @generated + */ + protected IsTranslatedSoundToItemProvider isTranslatedSoundToItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.IsTranslatedSoundTo}. + * + * @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. + * + * + * @generated + */ + protected MuteLowerPriorityItemProvider muteLowerPriorityItemProvider; + + /** + * This creates an adapter for a {@link rba.sound.MuteLowerPriority}. + * + * @generated + */ + @Override + public Adapter createMuteLowerPriorityAdapter() { + if (muteLowerPriorityItemProvider == null) { + muteLowerPriorityItemProvider = new MuteLowerPriorityItemProvider(this); + } + + return muteLowerPriorityItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * @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. + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * @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. + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * @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. + * + * @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. + * + * @generated + */ +public final class RbaSoundEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * @generated + */ + public static final RbaSoundEditPlugin INSTANCE = new RbaSoundEditPlugin(); + + /** + * Keep track of the singleton. + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * @generated + */ + public RbaSoundEditPlugin() { + super(new ResourceLocator[] { RbaCoreEditPlugin.INSTANCE, }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * @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. + * + * + * @generated + */ +public class SoundContentItemProvider extends ContentItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public SoundContentItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns SoundContent.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SoundContent")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * + * @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}. + * + * + * @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. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * + * @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. + * + * @generated + */ +public class SoundContentOperatorItemProvider extends ContentOperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public SoundContentOperatorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @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. + * @generated + */ +public class SoundContentSetItemProvider extends ContentSetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public SoundContentSetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns SoundContentSet.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SoundContentSet")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * @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. + * @generated + */ +public class SoundContentStateItemProvider extends ContentStateItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public SoundContentStateItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns SoundContentState.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SoundContentState")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @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. + * + * @generated + */ +public class ZoneItemProvider extends AllocatableItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public ZoneItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List 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}. + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(RBASoundPackage.Literals.ZONE__ATTENUATE); + } + return childrenFeatures; + } + + /** + * + * @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. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Zone")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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}. + * + * @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. + * + * @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. + * + * @generated + */ +public class ZoneOperatorItemProvider extends OperatorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public ZoneOperatorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection 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. + * + * @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. + * + * @generated + */ +public class ZoneSetItemProvider extends AllocatableSetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public ZoneSetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns ZoneSet.gif. + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ZoneSet")); + } + + /** + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @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}. + * + * @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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return RbaSoundEditPlugin.INSTANCE; + } + +} -- cgit 1.2.3-korg