Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorradvorak2006-04-25 19:15:39 +0000
committerradvorak2006-04-25 19:15:39 +0000
commit5b032bd29e48842aa0f34f0a95c049631fdf2a01 (patch)
tree83bcf179e4bc36320e19d8781080655627a02751 /plugins/org.eclipse.gmf.codegen.edit
parent4469149b9bb4a9d88c6dc2e33054a6f50b74d9b9 (diff)
downloadorg.eclipse.gmf-tooling-5b032bd29e48842aa0f34f0a95c049631fdf2a01.tar.gz
org.eclipse.gmf-tooling-5b032bd29e48842aa0f34f0a95c049631fdf2a01.tar.xz
org.eclipse.gmf-tooling-5b032bd29e48842aa0f34f0a95c049631fdf2a01.zip
#138464 Support EAttribute based target in AuditRule element
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen.edit')
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenAuditRule_target_GenDomainAttributeTarget.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenDomainAttributeTarget.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/plugin.properties6
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java23
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenAuditRuleItemProvider.java5
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenDomainAttributeTargetItemProvider.java174
6 files changed, 208 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenAuditRule_target_GenDomainAttributeTarget.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenAuditRule_target_GenDomainAttributeTarget.gif
new file mode 100644
index 000000000..2a7113645
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenAuditRule_target_GenDomainAttributeTarget.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenDomainAttributeTarget.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenDomainAttributeTarget.gif
new file mode 100644
index 000000000..be22463d2
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenDomainAttributeTarget.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 87d6f7bca..c7524bfda 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
+++ b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
@@ -557,3 +557,9 @@ _UI_GMFGenEditorFilenameExtension = gmfgen
_UI_LabelOffsetAttributes_type = Label Offset Attributes
_UI_LabelOffsetAttributes_x_feature = X
_UI_LabelOffsetAttributes_y_feature = Y
+_UI_GenDomainAttributeTarget_type = Gen Domain Attribute Target
+_UI_GenDomainAttributeTarget_feature_feature = Feature
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_GenDomainAttributeTarget_nullAsError_feature = Null As Error
+_UI_GenDomainAttributeTarget_attribute_feature = Attribute
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 93cc17216..6b33b22e9 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
@@ -932,6 +932,28 @@ public class GMFGenItemProviderAdapterFactory extends GMFGenAdapterFactory imple
}
/**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenDomainAttributeTargetItemProvider genDomainAttributeTargetItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenDomainAttributeTargetAdapter() {
+ if (genDomainAttributeTargetItemProvider == null) {
+ genDomainAttributeTargetItemProvider = new GenDomainAttributeTargetItemProvider(this);
+ }
+
+ return genDomainAttributeTargetItemProvider;
+ }
+
+ /**
* This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenNotationElementTarget} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1266,6 +1288,7 @@ public class GMFGenItemProviderAdapterFactory extends GMFGenAdapterFactory imple
if (genAuditRuleItemProvider != null) genAuditRuleItemProvider.dispose();
if (genDomainElementTargetItemProvider != null) genDomainElementTargetItemProvider.dispose();
if (genDiagramElementTargetItemProvider != null) genDiagramElementTargetItemProvider.dispose();
+ if (genDomainAttributeTargetItemProvider != null) genDomainAttributeTargetItemProvider.dispose();
if (genNotationElementTargetItemProvider != null) genNotationElementTargetItemProvider.dispose();
if (genMetricContainerItemProvider != null) genMetricContainerItemProvider.dispose();
if (genMetricRuleItemProvider != null) genMetricRuleItemProvider.dispose();
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenAuditRuleItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenAuditRuleItemProvider.java
index a9c79c696..e7ab5082f 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenAuditRuleItemProvider.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenAuditRuleItemProvider.java
@@ -259,6 +259,11 @@ public class GenAuditRuleItemProvider
newChildDescriptors.add
(createChildParameter
(GMFGenPackage.eINSTANCE.getGenAuditRule_Target(),
+ GMFGenFactory.eINSTANCE.createGenDomainAttributeTarget()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenAuditRule_Target(),
GMFGenFactory.eINSTANCE.createGenNotationElementTarget()));
newChildDescriptors.add
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenDomainAttributeTargetItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenDomainAttributeTargetItemProvider.java
new file mode 100644
index 000000000..37e6b9631
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenDomainAttributeTargetItemProvider.java
@@ -0,0 +1,174 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: GenDomainAttributeTargetItemProvider.java,v 1.1 2006/04/25 19:15:54 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.GenDomainAttributeTarget;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenDomainAttributeTargetItemProvider
+ extends GenAuditableItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenDomainAttributeTargetItemProvider(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);
+
+ addAttributePropertyDescriptor(object);
+ addNullAsErrorPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAttributePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDomainAttributeTarget_attribute_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDomainAttributeTarget_attribute_feature", "_UI_GenDomainAttributeTarget_type"),
+ GMFGenPackage.eINSTANCE.getGenDomainAttributeTarget_Attribute(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Null As Error feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNullAsErrorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDomainAttributeTarget_nullAsError_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDomainAttributeTarget_nullAsError_feature", "_UI_GenDomainAttributeTarget_type"),
+ GMFGenPackage.eINSTANCE.getGenDomainAttributeTarget_NullAsError(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns GenDomainAttributeTarget.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/GenDomainAttributeTarget"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ GenDomainAttributeTarget genDomainAttributeTarget = (GenDomainAttributeTarget)object;
+ return getString("_UI_GenDomainAttributeTarget_type") + " " + genDomainAttributeTarget.isNullAsError();
+ }
+
+ /**
+ * 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(GenDomainAttributeTarget.class)) {
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ 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;
+ }
+
+}

Back to the top