Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorradvorak2006-04-13 15:41:17 +0000
committerradvorak2006-04-13 15:41:17 +0000
commitda0d6e32839d3c93ccd6afe551a3063251390087 (patch)
treefbf52cf9cd34d6a23fdf993c89633b274e9b2cdd /plugins/org.eclipse.gmf.codegen.edit
parent52125d1e0c125f737a5be9a4359daa4deadbc9f6 (diff)
downloadorg.eclipse.gmf-tooling-da0d6e32839d3c93ccd6afe551a3063251390087.tar.gz
org.eclipse.gmf-tooling-da0d6e32839d3c93ccd6afe551a3063251390087.tar.xz
org.eclipse.gmf-tooling-da0d6e32839d3c93ccd6afe551a3063251390087.zip
[#134511] common access to expressions of different languages
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen.edit')
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenEditorGenerator_expressionProviders_GenExpressionProviderContainer.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenExpressionProviderContainer_providers_GenExpressionInterpreter.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenExpressionProviderContainer_providers_GenJavaExpressionProvider.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionInterpreter.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionProviderBase.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionProviderContainer.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenJavaExpressionProvider.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/plugin.properties16
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java69
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenEditorGeneratorItemProvider.java7
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionInterpreterItemProvider.java197
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionProviderBaseItemProvider.java142
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionProviderContainerItemProvider.java206
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenJavaExpressionProviderItemProvider.java117
14 files changed, 753 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenEditorGenerator_expressionProviders_GenExpressionProviderContainer.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenEditorGenerator_expressionProviders_GenExpressionProviderContainer.gif
new file mode 100644
index 000000000..468d5f998
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenEditorGenerator_expressionProviders_GenExpressionProviderContainer.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenExpressionProviderContainer_providers_GenExpressionInterpreter.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenExpressionProviderContainer_providers_GenExpressionInterpreter.gif
new file mode 100644
index 000000000..7936184f7
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenExpressionProviderContainer_providers_GenExpressionInterpreter.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenExpressionProviderContainer_providers_GenJavaExpressionProvider.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenExpressionProviderContainer_providers_GenJavaExpressionProvider.gif
new file mode 100644
index 000000000..e47a63a30
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenExpressionProviderContainer_providers_GenJavaExpressionProvider.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionInterpreter.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionInterpreter.gif
new file mode 100644
index 000000000..7b7c428c7
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionInterpreter.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionProviderBase.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionProviderBase.gif
new file mode 100644
index 000000000..c673a5200
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionProviderBase.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionProviderContainer.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionProviderContainer.gif
new file mode 100644
index 000000000..c00aedf41
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenExpressionProviderContainer.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenJavaExpressionProvider.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenJavaExpressionProvider.gif
new file mode 100644
index 000000000..2b6925602
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenJavaExpressionProvider.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/plugin.properties b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
index 48987570b..c5524e408 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
+++ b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
@@ -535,4 +535,18 @@ _UI_NotationType_type = Notation Type
_UI_SpecializationType_semanticHint_feature = Semantic Hint
_UI_NotationType_semanticHint_feature = Semantic Hint
_UI_Wizard_category = Example EMF Model Creation Wizards
-
+
+_UI_GenExpressionProviderContainer_type = Gen Expression Provider Container
+_UI_GenExpressionProviderBase_type = Gen Expression Provider Base
+_UI_GenJavaExpressionProvider_type = Gen Java Expression Provider
+_UI_GenExpressionInterpreter_type = Gen Expression Interpreter
+_UI_GenEditorGenerator_expressionProviders_feature = Expression Providers
+_UI_GenExpressionProviderContainer_expressionsPackageName_feature = Expressions Package Name
+_UI_GenExpressionProviderContainer_abstractExpressionClassName_feature = Abstract Expression Class Name
+_UI_GenExpressionProviderContainer_providers_feature = Providers
+_UI_GenExpressionProviderContainer_editorGen_feature = Editor Gen
+_UI_GenExpressionProviderBase_expressions_feature = Expressions
+_UI_GenExpressionProviderBase_container_feature = Container
+_UI_GenExpressionInterpreter_language_feature = Language
+_UI_GenExpressionInterpreter_className_feature = Class Name
+_UI_GenExpressionInterpreter_requiredPluginIDs_feature = Required Plugin IDs
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java
index cf8aea518..5ad007947 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java
@@ -998,6 +998,72 @@ public class GMFGenItemProviderAdapterFactory extends GMFGenAdapterFactory imple
}
/**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenExpressionProviderContainer} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenExpressionProviderContainerItemProvider genExpressionProviderContainerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenExpressionProviderContainer}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenExpressionProviderContainerAdapter() {
+ if (genExpressionProviderContainerItemProvider == null) {
+ genExpressionProviderContainerItemProvider = new GenExpressionProviderContainerItemProvider(this);
+ }
+
+ return genExpressionProviderContainerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenJavaExpressionProvider} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenJavaExpressionProviderItemProvider genJavaExpressionProviderItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenJavaExpressionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenJavaExpressionProviderAdapter() {
+ if (genJavaExpressionProviderItemProvider == null) {
+ genJavaExpressionProviderItemProvider = new GenJavaExpressionProviderItemProvider(this);
+ }
+
+ return genJavaExpressionProviderItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenExpressionInterpreter} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenExpressionInterpreterItemProvider genExpressionInterpreterItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenExpressionInterpreter}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenExpressionInterpreterAdapter() {
+ if (genExpressionInterpreterItemProvider == null) {
+ genExpressionInterpreterItemProvider = new GenExpressionInterpreterItemProvider(this);
+ }
+
+ return genExpressionInterpreterItemProvider;
+ }
+
+ /**
* This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.ValueExpression} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1181,6 +1247,9 @@ public class GMFGenItemProviderAdapterFactory extends GMFGenAdapterFactory imple
if (genMetricContainerItemProvider != null) genMetricContainerItemProvider.dispose();
if (genMetricRuleItemProvider != null) genMetricRuleItemProvider.dispose();
if (genAuditedMetricTargetItemProvider != null) genAuditedMetricTargetItemProvider.dispose();
+ if (genExpressionProviderContainerItemProvider != null) genExpressionProviderContainerItemProvider.dispose();
+ if (genJavaExpressionProviderItemProvider != null) genJavaExpressionProviderItemProvider.dispose();
+ if (genExpressionInterpreterItemProvider != null) genExpressionInterpreterItemProvider.dispose();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenEditorGeneratorItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenEditorGeneratorItemProvider.java
index dbd5e0b13..121ff667b 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenEditorGeneratorItemProvider.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenEditorGeneratorItemProvider.java
@@ -276,6 +276,7 @@ public class GenEditorGeneratorItemProvider
childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenEditorGenerator_Diagram());
childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenEditorGenerator_Plugin());
childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenEditorGenerator_Editor());
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenEditorGenerator_ExpressionProviders());
}
return childrenFeatures;
}
@@ -341,6 +342,7 @@ public class GenEditorGeneratorItemProvider
case GMFGenPackage.GEN_EDITOR_GENERATOR__DIAGRAM:
case GMFGenPackage.GEN_EDITOR_GENERATOR__PLUGIN:
case GMFGenPackage.GEN_EDITOR_GENERATOR__EDITOR:
+ case GMFGenPackage.GEN_EDITOR_GENERATOR__EXPRESSION_PROVIDERS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -381,6 +383,11 @@ public class GenEditorGeneratorItemProvider
(createChildParameter
(GMFGenPackage.eINSTANCE.getGenEditorGenerator_Editor(),
GMFGenFactory.eINSTANCE.createGenEditorView()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenEditorGenerator_ExpressionProviders(),
+ GMFGenFactory.eINSTANCE.createGenExpressionProviderContainer()));
}
/**
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionInterpreterItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionInterpreterItemProvider.java
new file mode 100644
index 000000000..88f7798fc
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionInterpreterItemProvider.java
@@ -0,0 +1,197 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: GenExpressionInterpreterItemProvider.java,v 1.1 2006/04/13 15:41:28 radvorak Exp $
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenExpressionInterpreter;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenExpressionInterpreter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenExpressionInterpreterItemProvider
+ extends GenExpressionProviderBaseItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenExpressionInterpreterItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addLanguagePropertyDescriptor(object);
+ addClassNamePropertyDescriptor(object);
+ addRequiredPluginIDsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenExpressionInterpreter_className_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenExpressionInterpreter_className_feature", "_UI_GenExpressionInterpreter_type"),
+ GMFGenPackage.eINSTANCE.getGenExpressionInterpreter_ClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Required Plugin IDs feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addRequiredPluginIDsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenExpressionInterpreter_requiredPluginIDs_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenExpressionInterpreter_requiredPluginIDs_feature", "_UI_GenExpressionInterpreter_type"),
+ GMFGenPackage.eINSTANCE.getGenExpressionInterpreter_RequiredPluginIDs(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Language feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLanguagePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenExpressionInterpreter_language_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenExpressionInterpreter_language_feature", "_UI_GenExpressionInterpreter_type"),
+ GMFGenPackage.eINSTANCE.getGenExpressionInterpreter_Language(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns GenExpressionInterpreter.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/GenExpressionInterpreter"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenExpressionInterpreter)object).getClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenExpressionInterpreter_type") :
+ getString("_UI_GenExpressionInterpreter_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenExpressionInterpreter.class)) {
+ case GMFGenPackage.GEN_EXPRESSION_INTERPRETER__LANGUAGE:
+ case GMFGenPackage.GEN_EXPRESSION_INTERPRETER__CLASS_NAME:
+ case GMFGenPackage.GEN_EXPRESSION_INTERPRETER__REQUIRED_PLUGIN_IDS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionProviderBaseItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionProviderBaseItemProvider.java
new file mode 100644
index 000000000..c6203884a
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionProviderBaseItemProvider.java
@@ -0,0 +1,142 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: GenExpressionProviderBaseItemProvider.java,v 1.1 2006/04/13 15:41:28 radvorak Exp $
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenExpressionProviderBase} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenExpressionProviderBaseItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenExpressionProviderBaseItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addExpressionsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Expressions feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExpressionsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenExpressionProviderBase_expressions_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenExpressionProviderBase_expressions_feature", "_UI_GenExpressionProviderBase_type"),
+ GMFGenPackage.eINSTANCE.getGenExpressionProviderBase_Expressions(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns GenExpressionProviderBase.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/GenExpressionProviderBase"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ return getString("_UI_GenExpressionProviderBase_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionProviderContainerItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionProviderContainerItemProvider.java
new file mode 100644
index 000000000..0b9db7f81
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenExpressionProviderContainerItemProvider.java
@@ -0,0 +1,206 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: GenExpressionProviderContainerItemProvider.java,v 1.1 2006/04/13 15:41:28 radvorak Exp $
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenExpressionProviderContainer;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenExpressionProviderContainer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenExpressionProviderContainerItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenExpressionProviderContainerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addExpressionsPackageNamePropertyDescriptor(object);
+ addAbstractExpressionClassNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Expressions Package Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExpressionsPackageNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenExpressionProviderContainer_expressionsPackageName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenExpressionProviderContainer_expressionsPackageName_feature", "_UI_GenExpressionProviderContainer_type"),
+ GMFGenPackage.eINSTANCE.getGenExpressionProviderContainer_ExpressionsPackageName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Abstract Expression Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAbstractExpressionClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenExpressionProviderContainer_abstractExpressionClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenExpressionProviderContainer_abstractExpressionClassName_feature", "_UI_GenExpressionProviderContainer_type"),
+ GMFGenPackage.eINSTANCE.getGenExpressionProviderContainer_AbstractExpressionClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenExpressionProviderContainer_Providers());
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * This returns GenExpressionProviderContainer.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/GenExpressionProviderContainer"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenExpressionProviderContainer)object).getExpressionsPackageName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenExpressionProviderContainer_type") :
+ getString("_UI_GenExpressionProviderContainer_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenExpressionProviderContainer.class)) {
+ case GMFGenPackage.GEN_EXPRESSION_PROVIDER_CONTAINER__EXPRESSIONS_PACKAGE_NAME:
+ case GMFGenPackage.GEN_EXPRESSION_PROVIDER_CONTAINER__ABSTRACT_EXPRESSION_CLASS_NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case GMFGenPackage.GEN_EXPRESSION_PROVIDER_CONTAINER__PROVIDERS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenExpressionProviderContainer_Providers(),
+ GMFGenFactory.eINSTANCE.createGenJavaExpressionProvider()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenExpressionProviderContainer_Providers(),
+ GMFGenFactory.eINSTANCE.createGenExpressionInterpreter()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenJavaExpressionProviderItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenJavaExpressionProviderItemProvider.java
new file mode 100644
index 000000000..f4c9891cb
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenJavaExpressionProviderItemProvider.java
@@ -0,0 +1,117 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: GenJavaExpressionProviderItemProvider.java,v 1.1 2006/04/13 15:41:28 radvorak Exp $
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenJavaExpressionProvider} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenJavaExpressionProviderItemProvider
+ extends GenExpressionProviderBaseItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenJavaExpressionProviderItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns GenJavaExpressionProvider.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/GenJavaExpressionProvider"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ return getString("_UI_GenJavaExpressionProvider_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}

Back to the top