Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java10
-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
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore22
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel5
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/PluginXML.java4
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ValidationProviderGenerator.java89
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java9
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java95
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenAuditable.java13
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDomainAttributeTarget.java81
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenFactoryImpl.java11
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java63
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditContainerImpl.java5
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditRuleImpl.java10
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditableImpl.java16
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenDomainAttributeTargetImpl.java246
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenAdapterFactory.java19
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenSwitch.java25
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/ConstraintProviders.jetinc4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/providers/ValidationProvider.javajet19
-rw-r--r--plugins/org.eclipse.gmf.map.edit/icons/full/ctool16/CreateAuditRule_target_DomainAttributeTarget.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.map.edit/icons/full/obj16/DomainAttributeTarget.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.map.edit/plugin.properties5
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/presentation/GMFMapEditor.java35
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/AuditRuleItemProvider.java5
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/DomainAttributeTargetItemProvider.java171
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java23
-rw-r--r--plugins/org.eclipse.gmf.map/models/gmfmap.ecore20
-rw-r--r--plugins/org.eclipse.gmf.map/models/gmfmap.genmodel4
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/DomainAttributeTarget.java83
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java9
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java85
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditContainerImpl.java16
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditRuleImpl.java16
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/ChildReferenceImpl.java16
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/DomainAttributeTargetImpl.java223
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureSeqInitializerImpl.java16
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureValueSpecImpl.java16
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java11
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java55
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/MetricRuleImpl.java16
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java17
-rw-r--r--plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java22
48 files changed, 1726 insertions, 92 deletions
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java
index 48833238e..ac8057dfb 100644
--- a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java
@@ -41,6 +41,7 @@ import org.eclipse.gmf.codegen.gmfgen.GenCompartment;
import org.eclipse.gmf.codegen.gmfgen.GenConstraint;
import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
import org.eclipse.gmf.codegen.gmfgen.GenDiagramElementTarget;
+import org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget;
import org.eclipse.gmf.codegen.gmfgen.GenDomainElementTarget;
import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator;
import org.eclipse.gmf.codegen.gmfgen.GenElementInitializer;
@@ -90,6 +91,7 @@ import org.eclipse.gmf.mappings.ChildReference;
import org.eclipse.gmf.mappings.CompartmentMapping;
import org.eclipse.gmf.mappings.Constraint;
import org.eclipse.gmf.mappings.DiagramElementTarget;
+import org.eclipse.gmf.mappings.DomainAttributeTarget;
import org.eclipse.gmf.mappings.DomainElementTarget;
import org.eclipse.gmf.mappings.ElementInitializer;
import org.eclipse.gmf.mappings.FeatureSeqInitializer;
@@ -764,6 +766,14 @@ public class DiagramGenModelTransformer extends MappingTransformer {
GenAuditedMetricTarget genMetricTarget = GMFGenFactory.eINSTANCE.createGenAuditedMetricTarget();
// TODO - no metrics logged in History return not initialized entity
return genMetricTarget;
+ } else if(ruleTarget instanceof DomainAttributeTarget) {
+ DomainAttributeTarget attrTarget = (DomainAttributeTarget) ruleTarget;
+ GenDomainAttributeTarget genAttrTarget = GMFGenFactory.eINSTANCE.createGenDomainAttributeTarget();
+ if(attrTarget.getAttribute() != null) {
+ genAttrTarget.setAttribute(findGenFeature(attrTarget.getAttribute()));
+ }
+ genAttrTarget.setNullAsError(attrTarget.isNullAsError());
+ return genAttrTarget;
} else {
assert false : "Uknown rule target type"; //$NON-NLS-1$
}
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;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore b/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
index 7c1c0f6e0..5d2d97a92 100644
--- a/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
@@ -1205,6 +1205,23 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenDomainAttributeTarget" eSuperTypes="#//GenAuditable">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Represents value based target, useful for audit rules expression not capable of ecore meta-model access"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="attribute" lowerBound="1"
+ eType="ecore:EClass ../../../plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore#//GenFeature">
+ <eAnnotations source="http://www.eclipse.org/gmf/2005/constraints">
+ <details key="ocl" value="attribute.ecoreFeature.oclIsKindOf(ecore::EAttribute)"/>
+ <details key="description" value="EAttribute element required for auditable domain attribute"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="nullAsError" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Indicates whether null value of the attribute is reported as audit failure or success"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GenNotationElementTarget" eSuperTypes="#//GenAuditable #//GenMeasurable">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Target for rules applied on diagram notation model elements"/>
@@ -1287,6 +1304,11 @@
<details key="documentation" value="Gets identifier of the validation client context for this target. It's guaranteed as a valid java identifier."/>
</eAnnotations>
</eOperations>
+ <eOperations name="getTargetClass" eType="ecore:EClass ../../../plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore#//GenClass">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Gets the validation target class in terms of EMFT validation framework."/>
+ </eAnnotations>
+ </eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GenMeasurable" interface="true" eSuperTypes="#//GenRuleTarget">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel b/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
index 5b0880931..995d5396e 100644
--- a/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
@@ -457,6 +457,10 @@
<genClasses ecoreClass="gmfgen.ecore#//GenDiagramElementTarget">
<genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenDiagramElementTarget/element"/>
</genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//GenDomainAttributeTarget">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenDomainAttributeTarget/attribute"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDomainAttributeTarget/nullAsError"/>
+ </genClasses>
<genClasses ecoreClass="gmfgen.ecore#//GenNotationElementTarget">
<genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenNotationElementTarget/element"/>
</genClasses>
@@ -476,6 +480,7 @@
</genClasses>
<genClasses ecoreClass="gmfgen.ecore#//GenAuditable">
<genOperations ecoreOperation="gmfgen.ecore#//GenAuditable/getClientContextID"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenAuditable/getTargetClass"/>
</genClasses>
<genClasses ecoreClass="gmfgen.ecore#//GenMeasurable"/>
<genClasses ecoreClass="gmfgen.ecore#//GenExpressionProviderContainer">
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/PluginXML.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/PluginXML.java
index 69bf5267a..ace99b5f4 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/PluginXML.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/PluginXML.java
@@ -642,8 +642,8 @@ if (rootContainer != null && genDiagram.getDomainDiagramElement() != null) {
GenAuditContainer category = (GenAuditContainer)catIt.next();
for(java.util.Iterator it = category.getAudits().iterator(); it.hasNext(); rulePos++) {
GenAuditRule audit = (GenAuditRule)it.next();
- if(audit.getTarget() == null || !(audit.getTarget().getContext() instanceof GenClass)) continue;
- GenClass targetClass = (GenClass)audit.getTarget().getContext();
+ if(audit.getTarget() == null || (audit.getTarget().getTargetClass() == null)) continue;
+ GenClass targetClass = audit.getTarget().getTargetClass();
String targetClassName = (targetClass != null) ? targetClass.getGenPackage().getNSName() + "." + targetClass.getInterfaceName() : "null";
String modeAttr = audit.isUseInLiveMode() ? "" : "mode=\"Batch\"";
String name = audit.getName() != null ? audit.getName() : audit.getId();
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ValidationProviderGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ValidationProviderGenerator.java
index 1140cd330..9ade0430f 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ValidationProviderGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ValidationProviderGenerator.java
@@ -87,22 +87,29 @@ public class ValidationProviderGenerator
protected final String TEXT_69 = ", ";
protected final String TEXT_70 = ");" + NL + "\t}" + NL + "}";
protected final String TEXT_71 = NL + ";" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic IStatus validate(";
- protected final String TEXT_72 = " ctx) {" + NL + "\t\t\tObject result = expression.evaluate(ctx.getTarget());" + NL + "\t\t\tif(result instanceof Boolean && ((Boolean)result).booleanValue()) {" + NL + "\t\t\t\treturn ";
- protected final String TEXT_73 = ".OK_STATUS;" + NL + "\t\t\t}" + NL + "\t\t\treturn ctx.createFailureStatus(new Object[] { EMFCoreUtil.getQualifiedName(ctx.getTarget(), true) }); " + NL + "\t\t}" + NL + "\t}";
- protected final String TEXT_74 = NL + "/**" + NL + " * @generated" + NL + " */" + NL + "static class ";
- protected final String TEXT_75 = " {";
- protected final String TEXT_76 = NL;
- protected final String TEXT_77 = NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private static ";
- protected final String TEXT_78 = " ";
- protected final String TEXT_79 = "(";
- protected final String TEXT_80 = " self";
- protected final String TEXT_81 = ", ";
- protected final String TEXT_82 = " ";
- protected final String TEXT_83 = ") {" + NL + "\t// TODO: implement this method" + NL + "\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t" + NL + "\tthrow new UnsupportedOperationException(\"No user implementation provided in '";
- protected final String TEXT_84 = "' operation\"); //$NON-NLS-1$" + NL + "}";
- protected final String TEXT_85 = NL + "} //";
- protected final String TEXT_86 = NL + "} //";
- protected final String TEXT_87 = NL;
+ protected final String TEXT_72 = " ctx) {" + NL + "\t\t\tObject evalCtx = ctx.getTarget();";
+ protected final String TEXT_73 = NL + "\t\t\tif(evalCtx instanceof EObject) evalCtx = ((EObject)evalCtx).eGet(";
+ protected final String TEXT_74 = "());" + NL + "\t\t\tif(evalCtx == null) {";
+ protected final String TEXT_75 = NL + "\t\t\t\treturn ctx.createFailureStatus(new Object[] { EMFCoreUtil.getQualifiedName(ctx.getTarget(), true) });";
+ protected final String TEXT_76 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_77 = ".OK_STATUS;";
+ protected final String TEXT_78 = NL + "\t\t\t}\t\t\t";
+ protected final String TEXT_79 = "\t\t" + NL + "\t\t\tObject result = expression.evaluate(evalCtx);" + NL + "\t\t\tif(result instanceof Boolean && ((Boolean)result).booleanValue()) {" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_80 = ".OK_STATUS;" + NL + "\t\t\t}" + NL + "\t\t\treturn ctx.createFailureStatus(new Object[] { EMFCoreUtil.getQualifiedName(ctx.getTarget(), true) }); " + NL + "\t\t}" + NL + "\t}";
+ protected final String TEXT_81 = NL + "/**" + NL + " * @generated" + NL + " */" + NL + "static class ";
+ protected final String TEXT_82 = " {";
+ protected final String TEXT_83 = NL;
+ protected final String TEXT_84 = NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private static ";
+ protected final String TEXT_85 = " ";
+ protected final String TEXT_86 = "(";
+ protected final String TEXT_87 = " self";
+ protected final String TEXT_88 = ", ";
+ protected final String TEXT_89 = " ";
+ protected final String TEXT_90 = ") {" + NL + "\t// TODO: implement this method" + NL + "\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t" + NL + "\tthrow new UnsupportedOperationException(\"No user implementation provided in '";
+ protected final String TEXT_91 = "' operation\"); //$NON-NLS-1$" + NL + "}";
+ protected final String TEXT_92 = NL + "} //";
+ protected final String TEXT_93 = NL + "} //";
+ protected final String TEXT_94 = NL;
public String generate(Object argument)
{
@@ -391,8 +398,28 @@ String __javaOperationContainer;
stringBuffer.append(TEXT_71);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.validation.IValidationContext"));
stringBuffer.append(TEXT_72);
- stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.Status"));
+ if(nextAudit.getTarget() instanceof GenDomainAttributeTarget) {
+ GenDomainAttributeTarget attrTarget = (GenDomainAttributeTarget) nextAudit.getTarget();
+ if(attrTarget.getAttribute() != null) {
+ String fGetter = (attrTarget.getAttribute() != null) ? importManager.getImportedName(attrTarget.getAttribute().getGenPackage().getQualifiedPackageInterfaceName()) + ".eINSTANCE.get" + attrTarget.getAttribute().getFeatureAccessorName() : ""; //$NON-NLS-1$ //$NON-NLS-2$
+
stringBuffer.append(TEXT_73);
+ stringBuffer.append(fGetter);
+ stringBuffer.append(TEXT_74);
+ if(attrTarget.isNullAsError()) {
+ stringBuffer.append(TEXT_75);
+ } else {
+ stringBuffer.append(TEXT_76);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.Status"));
+ stringBuffer.append(TEXT_77);
+ }
+ stringBuffer.append(TEXT_78);
+ }
+ }
+
+ stringBuffer.append(TEXT_79);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.Status"));
+ stringBuffer.append(TEXT_80);
}
} /*end of Adapters iteration*/
@@ -400,9 +427,9 @@ String __javaOperationContainer;
final java.util.List javaExpressions = (audits != null) ? audits.getAllJavaLangAudits() : java.util.Collections.EMPTY_LIST;
if(!javaExpressions.isEmpty()) {
- stringBuffer.append(TEXT_74);
+ stringBuffer.append(TEXT_81);
stringBuffer.append(__javaOperationContainer);
- stringBuffer.append(TEXT_75);
+ stringBuffer.append(TEXT_82);
for (java.util.Iterator it = javaExpressions.iterator(); it.hasNext();) {
GenAuditRule nextJavaRule = (GenAuditRule) it.next();
@@ -410,7 +437,7 @@ if(!javaExpressions.isEmpty()) {
ValueExpression __genValueExpression = nextJavaRule.getRule();
String __genExprResultType = "java.lang.Boolean"; //$NON-NLS-1$
- stringBuffer.append(TEXT_76);
+ stringBuffer.append(TEXT_83);
/*
ValueExpression __genValueExpression
@@ -432,13 +459,13 @@ if(__genExprProvider instanceof org.eclipse.gmf.codegen.gmfgen.GenJavaExpression
__exprResultTypeQualifiedName = ((org.eclipse.emf.codegen.ecore.genmodel.GenClassifier)__genExprResultTypeObj).getEcoreClassifier().getInstanceClassName();
String __exprJavaOperName = ((org.eclipse.gmf.codegen.gmfgen.GenJavaExpressionProvider)__genExprProvider).getOperationName(__genValueExpression);
- stringBuffer.append(TEXT_77);
+ stringBuffer.append(TEXT_84);
stringBuffer.append(importManager.getImportedName(__exprResultTypeQualifiedName));
- stringBuffer.append(TEXT_78);
+ stringBuffer.append(TEXT_85);
stringBuffer.append(__exprJavaOperName);
- stringBuffer.append(TEXT_79);
+ stringBuffer.append(TEXT_86);
stringBuffer.append(importManager.getImportedName(evalCtxQualifiedName));
- stringBuffer.append(TEXT_80);
+ stringBuffer.append(TEXT_87);
for(java.util.Iterator envVarIt = __exprEnvVariables.keySet().iterator(); envVarIt.hasNext();) {
String __nextVarName = (String)envVarIt.next();
@@ -446,30 +473,30 @@ if(__genExprProvider instanceof org.eclipse.gmf.codegen.gmfgen.GenJavaExpression
String qualifiedTypeName = (nextVariableType instanceof org.eclipse.emf.codegen.ecore.genmodel.GenClass) ? ((org.eclipse.emf.codegen.ecore.genmodel.GenClass)nextVariableType).getQualifiedInterfaceName() : nextVariableType.getEcoreClassifier().getInstanceClassName();
- stringBuffer.append(TEXT_81);
+ stringBuffer.append(TEXT_88);
stringBuffer.append(importManager.getImportedName(qualifiedTypeName));
- stringBuffer.append(TEXT_82);
+ stringBuffer.append(TEXT_89);
stringBuffer.append(__nextVarName);
}
- stringBuffer.append(TEXT_83);
+ stringBuffer.append(TEXT_90);
stringBuffer.append(__exprJavaOperName);
- stringBuffer.append(TEXT_84);
+ stringBuffer.append(TEXT_91);
}
}
- stringBuffer.append(TEXT_85);
+ stringBuffer.append(TEXT_92);
stringBuffer.append(__javaOperationContainer);
} /* end of Java expression methods */
- stringBuffer.append(TEXT_86);
+ stringBuffer.append(TEXT_93);
stringBuffer.append(genDiagram.getValidationProviderClassName());
importManager.emitSortedImports();
- stringBuffer.append(TEXT_87);
+ stringBuffer.append(TEXT_94);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java
index 956432d00..06f81c8bd 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java
@@ -377,6 +377,15 @@ public interface GMFGenFactory extends EFactory {
GenDiagramElementTarget createGenDiagramElementTarget();
/**
+ * Returns a new object of class '<em>Gen Domain Attribute Target</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen Domain Attribute Target</em>'.
+ * @generated
+ */
+ GenDomainAttributeTarget createGenDomainAttributeTarget();
+
+ /**
* Returns a new object of class '<em>Gen Notation Element Target</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java
index 6d78167b2..568adfa33 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java
@@ -5102,7 +5102,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenAuditable()
* @generated
*/
- int GEN_AUDITABLE = 70;
+ int GEN_AUDITABLE = 71;
/**
* The number of structural features of the '<em>Gen Auditable</em>' class.
@@ -5170,6 +5170,43 @@ public interface GMFGenPackage extends EPackage {
int GEN_DIAGRAM_ELEMENT_TARGET_FEATURE_COUNT = GEN_AUDITABLE_FEATURE_COUNT + 1;
/**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenDomainAttributeTargetImpl <em>Gen Domain Attribute Target</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenDomainAttributeTargetImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenDomainAttributeTarget()
+ * @generated
+ */
+ int GEN_DOMAIN_ATTRIBUTE_TARGET = 66;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE = GEN_AUDITABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Null As Error</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR = GEN_AUDITABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Gen Domain Attribute Target</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DOMAIN_ATTRIBUTE_TARGET_FEATURE_COUNT = GEN_AUDITABLE_FEATURE_COUNT + 2;
+
+ /**
* The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenNotationElementTargetImpl <em>Gen Notation Element Target</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -5177,7 +5214,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenNotationElementTarget()
* @generated
*/
- int GEN_NOTATION_ELEMENT_TARGET = 66;
+ int GEN_NOTATION_ELEMENT_TARGET = 67;
/**
* The feature id for the '<em><b>Element</b></em>' reference.
@@ -5205,7 +5242,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenMetricContainer()
* @generated
*/
- int GEN_METRIC_CONTAINER = 67;
+ int GEN_METRIC_CONTAINER = 68;
/**
* The feature id for the '<em><b>Editor</b></em>' reference.
@@ -5242,7 +5279,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenMetricRule()
* @generated
*/
- int GEN_METRIC_RULE = 68;
+ int GEN_METRIC_RULE = 69;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@@ -5333,7 +5370,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenAuditedMetricTarget()
* @generated
*/
- int GEN_AUDITED_METRIC_TARGET = 69;
+ int GEN_AUDITED_METRIC_TARGET = 70;
/**
* The feature id for the '<em><b>Metric</b></em>' reference.
@@ -5361,7 +5398,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenMeasurable()
* @generated
*/
- int GEN_MEASURABLE = 71;
+ int GEN_MEASURABLE = 72;
/**
* The number of structural features of the '<em>Gen Measurable</em>' class.
@@ -5380,7 +5417,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenExpressionProviderContainer()
* @generated
*/
- int GEN_EXPRESSION_PROVIDER_CONTAINER = 72;
+ int GEN_EXPRESSION_PROVIDER_CONTAINER = 73;
/**
* The feature id for the '<em><b>Expressions Package Name</b></em>' attribute.
@@ -5435,7 +5472,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenExpressionProviderBase()
* @generated
*/
- int GEN_EXPRESSION_PROVIDER_BASE = 73;
+ int GEN_EXPRESSION_PROVIDER_BASE = 74;
/**
* The feature id for the '<em><b>Expressions</b></em>' reference list.
@@ -5472,7 +5509,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenJavaExpressionProvider()
* @generated
*/
- int GEN_JAVA_EXPRESSION_PROVIDER = 74;
+ int GEN_JAVA_EXPRESSION_PROVIDER = 75;
/**
* The feature id for the '<em><b>Expressions</b></em>' reference list.
@@ -5509,7 +5546,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenExpressionInterpreter()
* @generated
*/
- int GEN_EXPRESSION_INTERPRETER = 75;
+ int GEN_EXPRESSION_INTERPRETER = 76;
/**
* The feature id for the '<em><b>Expressions</b></em>' reference list.
@@ -5573,7 +5610,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getProviderPriority()
* @generated
*/
- int PROVIDER_PRIORITY = 76;
+ int PROVIDER_PRIORITY = 77;
/**
* The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.LinkLabelAlignment <em>Link Label Alignment</em>}' enum.
@@ -5583,7 +5620,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getLinkLabelAlignment()
* @generated
*/
- int LINK_LABEL_ALIGNMENT = 77;
+ int LINK_LABEL_ALIGNMENT = 78;
/**
* The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.GenSeverity <em>Gen Severity</em>}' enum.
@@ -5593,7 +5630,7 @@ public interface GMFGenPackage extends EPackage {
* @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenSeverity()
* @generated
*/
- int GEN_SEVERITY = 78;
+ int GEN_SEVERITY = 79;
/**
* Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator <em>Gen Editor Generator</em>}'.
@@ -8555,6 +8592,38 @@ public interface GMFGenPackage extends EPackage {
EReference getGenDiagramElementTarget_Element();
/**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget <em>Gen Domain Attribute Target</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Domain Attribute Target</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget
+ * @generated
+ */
+ EClass getGenDomainAttributeTarget();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget#getAttribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Attribute</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget#getAttribute()
+ * @see #getGenDomainAttributeTarget()
+ * @generated
+ */
+ EReference getGenDomainAttributeTarget_Attribute();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget#isNullAsError <em>Null As Error</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Null As Error</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget#isNullAsError()
+ * @see #getGenDomainAttributeTarget()
+ * @generated
+ */
+ EAttribute getGenDomainAttributeTarget_NullAsError();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenNotationElementTarget <em>Gen Notation Element Target</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenAuditable.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenAuditable.java
index 18fe3e81e..8cca5c260 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenAuditable.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenAuditable.java
@@ -6,6 +6,8 @@
*/
package org.eclipse.gmf.codegen.gmfgen;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+
/**
* <!-- begin-user-doc -->
@@ -33,4 +35,15 @@ public interface GenAuditable extends GenRuleTarget {
*/
String getClientContextID();
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Gets the validation target class in terms of EMFT validation framework.
+ * <!-- end-model-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ GenClass getTargetClass();
+
} // GenAuditable
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDomainAttributeTarget.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDomainAttributeTarget.java
new file mode 100644
index 000000000..7785d131e
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDomainAttributeTarget.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: GenDomainAttributeTarget.java,v 1.1 2006/04/25 19:16:05 radvorak Exp $
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenFeature;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Gen Domain Attribute Target</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget#isNullAsError <em>Null As Error</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDomainAttributeTarget()
+ * @model
+ * @generated
+ */
+public interface GenDomainAttributeTarget extends GenAuditable {
+ /**
+ * Returns the value of the '<em><b>Attribute</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attribute</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Attribute</em>' reference.
+ * @see #setAttribute(GenFeature)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDomainAttributeTarget_Attribute()
+ * @model required="true"
+ * annotation="http://www.eclipse.org/gmf/2005/constraints ocl='attribute.ecoreFeature.oclIsKindOf(ecore::EAttribute)' description='EAttribute element required for auditable domain attribute'"
+ * @generated
+ */
+ GenFeature getAttribute();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget#getAttribute <em>Attribute</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute</em>' reference.
+ * @see #getAttribute()
+ * @generated
+ */
+ void setAttribute(GenFeature value);
+
+ /**
+ * Returns the value of the '<em><b>Null As Error</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Indicates whether null value of the attribute is reported as audit failure or success
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Null As Error</em>' attribute.
+ * @see #setNullAsError(boolean)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDomainAttributeTarget_NullAsError()
+ * @model
+ * @generated
+ */
+ boolean isNullAsError();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget#isNullAsError <em>Null As Error</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Null As Error</em>' attribute.
+ * @see #isNullAsError()
+ * @generated
+ */
+ void setNullAsError(boolean value);
+
+} // GenDomainAttributeTarget \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenFactoryImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenFactoryImpl.java
index ba3f8b15b..46605ec51 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenFactoryImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenFactoryImpl.java
@@ -152,6 +152,7 @@ public class GMFGenFactoryImpl extends EFactoryImpl implements GMFGenFactory {
case GMFGenPackage.GEN_AUDIT_RULE: return createGenAuditRule();
case GMFGenPackage.GEN_DOMAIN_ELEMENT_TARGET: return createGenDomainElementTarget();
case GMFGenPackage.GEN_DIAGRAM_ELEMENT_TARGET: return createGenDiagramElementTarget();
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET: return createGenDomainAttributeTarget();
case GMFGenPackage.GEN_NOTATION_ELEMENT_TARGET: return createGenNotationElementTarget();
case GMFGenPackage.GEN_METRIC_CONTAINER: return createGenMetricContainer();
case GMFGenPackage.GEN_METRIC_RULE: return createGenMetricRule();
@@ -615,6 +616,16 @@ public class GMFGenFactoryImpl extends EFactoryImpl implements GMFGenFactory {
* <!-- end-user-doc -->
* @generated
*/
+ public GenDomainAttributeTarget createGenDomainAttributeTarget() {
+ GenDomainAttributeTargetImpl genDomainAttributeTarget = new GenDomainAttributeTargetImpl();
+ return genDomainAttributeTarget;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public GenNotationElementTarget createGenNotationElementTarget() {
GenNotationElementTargetImpl genNotationElementTarget = new GenNotationElementTargetImpl();
return genNotationElementTarget;
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
index c02ac8d7b..b650fc370 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
@@ -43,6 +43,7 @@ import org.eclipse.gmf.codegen.gmfgen.GenConstraint;
import org.eclipse.gmf.codegen.gmfgen.GenContainerBase;
import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
import org.eclipse.gmf.codegen.gmfgen.GenDiagramElementTarget;
+import org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget;
import org.eclipse.gmf.codegen.gmfgen.GenDomainElementTarget;
import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator;
import org.eclipse.gmf.codegen.gmfgen.GenEditorView;
@@ -571,6 +572,13 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
* <!-- end-user-doc -->
* @generated
*/
+ private EClass genDomainAttributeTargetEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EClass genNotationElementTargetEClass = null;
/**
@@ -3209,6 +3217,33 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getGenDomainAttributeTarget() {
+ return genDomainAttributeTargetEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGenDomainAttributeTarget_Attribute() {
+ return (EReference)genDomainAttributeTargetEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGenDomainAttributeTarget_NullAsError() {
+ return (EAttribute)genDomainAttributeTargetEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getGenNotationElementTarget() {
return genNotationElementTargetEClass;
}
@@ -3852,6 +3887,10 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
genDiagramElementTargetEClass = createEClass(GEN_DIAGRAM_ELEMENT_TARGET);
createEReference(genDiagramElementTargetEClass, GEN_DIAGRAM_ELEMENT_TARGET__ELEMENT);
+ genDomainAttributeTargetEClass = createEClass(GEN_DOMAIN_ATTRIBUTE_TARGET);
+ createEReference(genDomainAttributeTargetEClass, GEN_DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE);
+ createEAttribute(genDomainAttributeTargetEClass, GEN_DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR);
+
genNotationElementTargetEClass = createEClass(GEN_NOTATION_ELEMENT_TARGET);
createEReference(genNotationElementTargetEClass, GEN_NOTATION_ELEMENT_TARGET__ELEMENT);
@@ -3980,6 +4019,7 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
genDomainElementTargetEClass.getESuperTypes().add(this.getGenMeasurable());
genDiagramElementTargetEClass.getESuperTypes().add(this.getGenAuditable());
genDiagramElementTargetEClass.getESuperTypes().add(this.getGenMeasurable());
+ genDomainAttributeTargetEClass.getESuperTypes().add(this.getGenAuditable());
genNotationElementTargetEClass.getESuperTypes().add(this.getGenAuditable());
genNotationElementTargetEClass.getESuperTypes().add(this.getGenMeasurable());
genMetricContainerEClass.getESuperTypes().add(this.getGenRuleContainerBase());
@@ -4524,6 +4564,10 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
initEClass(genDiagramElementTargetEClass, GenDiagramElementTarget.class, "GenDiagramElementTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getGenDiagramElementTarget_Element(), this.getGenCommonBase(), null, "element", null, 1, 1, GenDiagramElementTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(genDomainAttributeTargetEClass, GenDomainAttributeTarget.class, "GenDomainAttributeTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getGenDomainAttributeTarget_Attribute(), theGenModelPackage.getGenFeature(), null, "attribute", null, 1, 1, GenDomainAttributeTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGenDomainAttributeTarget_NullAsError(), ecorePackage.getEBoolean(), "nullAsError", null, 0, 1, GenDomainAttributeTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
initEClass(genNotationElementTargetEClass, GenNotationElementTarget.class, "GenNotationElementTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getGenNotationElementTarget_Element(), theGenModelPackage.getGenClass(), null, "element", null, 1, 1, GenNotationElementTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -4545,6 +4589,8 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
addEOperation(genAuditableEClass, ecorePackage.getEString(), "getClientContextID", 1, 1);
+ addEOperation(genAuditableEClass, theGenModelPackage.getGenClass(), "getTargetClass", 0, 1);
+
initEClass(genMeasurableEClass, GenMeasurable.class, "GenMeasurable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(genExpressionProviderContainerEClass, GenExpressionProviderContainer.class, "GenExpressionProviderContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -4626,7 +4672,7 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
"constraints", "http://www.eclipse.org/gmf/2005/constraints",
"meta", "http://www.eclipse.org/gmf/2005/constraints/meta",
"deprecated", "http://www.eclipse.org/gmf/2006/deprecated"
- });
+ });
}
/**
@@ -4782,7 +4828,14 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
new String[] {
"ocl", "not id.oclIsUndefined() implies container.audits->one(i | i.id = self.id)",
"description", "Audit rule with the same ID already exists"
- });
+ });
+ addAnnotation
+ (getGenDomainAttributeTarget_Attribute(),
+ source,
+ new String[] {
+ "ocl", "attribute.ecoreFeature.oclIsKindOf(ecore::EAttribute)",
+ "description", "EAttribute element required for auditable domain attribute"
+ });
addAnnotation
(getGenNotationElementTarget_Element(),
source,
@@ -4803,7 +4856,7 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
new String[] {
"ocl", "not key.oclIsUndefined() implies container.metrics->one(i | i.key = self.key)",
"description", "Metric rule with the same \'key\' already exists"
- });
+ });
}
/**
@@ -4901,7 +4954,7 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
new String[] {
"def", "context",
"ocl", "target.getContext()"
- });
+ });
addAnnotation
(getGenMetricRule_Rule(),
source,
@@ -4915,7 +4968,7 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
new String[] {
"def", "type",
"ocl", "\'ecore::EDoubleObject\'"
- });
+ });
}
} //GMFGenPackageImpl
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditContainerImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditContainerImpl.java
index 8424e5923..2f65f29b8 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditContainerImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditContainerImpl.java
@@ -29,7 +29,6 @@ import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
import org.eclipse.gmf.codegen.gmfgen.GenAuditContainer;
import org.eclipse.gmf.codegen.gmfgen.GenAuditRule;
import org.eclipse.gmf.codegen.gmfgen.GenDiagramElementTarget;
-import org.eclipse.gmf.codegen.gmfgen.GenExpressionProviderBase;
import org.eclipse.gmf.codegen.gmfgen.GenExpressionProviderContainer;
import org.eclipse.gmf.codegen.gmfgen.GenJavaExpressionProvider;
import org.eclipse.gmf.codegen.gmfgen.GenNotationElementTarget;
@@ -426,8 +425,8 @@ public class GenAuditContainerImpl extends GenRuleContainerBaseImpl implements G
GenExpressionProviderContainer exprProviders = getEditor().getExpressionProviders();
for (Iterator it = getAllAuditRules().iterator(); it.hasNext();) {
GenAuditRule nextAudit = (GenAuditRule) it.next();
- GenExpressionProviderBase provider = exprProviders.getProvider(nextAudit.getRule());
- if(nextAudit.getRule() != null && provider instanceof GenJavaExpressionProvider) {
+ if(nextAudit.getRule() != null &&
+ exprProviders.getProvider(nextAudit.getRule()) instanceof GenJavaExpressionProvider) {
audits.add(nextAudit);
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditRuleImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditRuleImpl.java
index 1e715f407..b00a27556 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditRuleImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditRuleImpl.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.codegen.gmfgen.GenAuditRule;
import org.eclipse.gmf.codegen.gmfgen.GenAuditable;
import org.eclipse.gmf.codegen.gmfgen.GenConstraint;
import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
+import org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget;
import org.eclipse.gmf.codegen.gmfgen.GenSeverity;
/**
@@ -464,7 +465,14 @@ public class GenAuditRuleImpl extends GenRuleBaseImpl implements GenAuditRule {
* @generated NOT
*/
public boolean requiresConstraintAdapter() {
- return getRule() != null && !getRule().isOCLExpression();
+ if(getRule() != null) {
+ if(!getRule().isOCLExpression() || getTarget() instanceof GenDomainAttributeTarget) {
+ return true;
+ } else if(getTarget() != null && getTarget().getContext() != null) {
+ return getTarget().getContext() != getTarget().getTargetClass();
+ }
+ }
+ return false;
}
/**
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditableImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditableImpl.java
index 25cdaefd0..7fecb41d6 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditableImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenAuditableImpl.java
@@ -6,12 +6,10 @@
*/
package org.eclipse.gmf.codegen.gmfgen.impl;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
import org.eclipse.emf.codegen.ecore.genmodel.GenClassifier;
-
import org.eclipse.emf.ecore.EClass;
-
import org.eclipse.emf.ecore.impl.EObjectImpl;
-
import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
import org.eclipse.gmf.codegen.gmfgen.GenAuditable;
@@ -49,6 +47,18 @@ public abstract class GenAuditableImpl extends EObjectImpl implements GenAuditab
* @generated NOT
*/
public abstract GenClassifier getContext();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public GenClass getTargetClass() {
+ if(getContext() instanceof GenClass) {
+ return (GenClass)getContext();
+ }
+ return null;
+ }
/**
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenDomainAttributeTargetImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenDomainAttributeTargetImpl.java
new file mode 100644
index 000000000..593192518
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenDomainAttributeTargetImpl.java
@@ -0,0 +1,246 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: GenDomainAttributeTargetImpl.java,v 1.1 2006/04/25 19:16:05 radvorak Exp $
+ */
+package org.eclipse.gmf.codegen.gmfgen.impl;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClassifier;
+import org.eclipse.emf.codegen.ecore.genmodel.GenFeature;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Gen Domain Attribute Target</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.GenDomainAttributeTargetImpl#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.GenDomainAttributeTargetImpl#isNullAsError <em>Null As Error</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GenDomainAttributeTargetImpl extends GenAuditableImpl implements GenDomainAttributeTarget {
+ /**
+ * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttribute()
+ * @generated
+ * @ordered
+ */
+ protected GenFeature attribute = null;
+
+ /**
+ * The default value of the '{@link #isNullAsError() <em>Null As Error</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isNullAsError()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean NULL_AS_ERROR_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isNullAsError() <em>Null As Error</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isNullAsError()
+ * @generated
+ * @ordered
+ */
+ protected boolean nullAsError = NULL_AS_ERROR_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenDomainAttributeTargetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return GMFGenPackage.eINSTANCE.getGenDomainAttributeTarget();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenFeature getAttribute() {
+ if (attribute != null && attribute.eIsProxy()) {
+ InternalEObject oldAttribute = (InternalEObject)attribute;
+ attribute = (GenFeature)eResolveProxy(oldAttribute);
+ if (attribute != oldAttribute) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE, oldAttribute, attribute));
+ }
+ }
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenFeature basicGetAttribute() {
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttribute(GenFeature newAttribute) {
+ GenFeature oldAttribute = attribute;
+ attribute = newAttribute;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE, oldAttribute, attribute));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public GenClassifier getContext() {
+ if(getAttribute() == null) {
+ return null;
+ }
+ return getAttribute().getTypeGenClassifier();
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public GenClass getTargetClass() {
+ if(getAttribute() == null) {
+ return null;
+ }
+ return getAttribute().getGenClass();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isNullAsError() {
+ return nullAsError;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNullAsError(boolean newNullAsError) {
+ boolean oldNullAsError = nullAsError;
+ nullAsError = newNullAsError;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR, oldNullAsError, nullAsError));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE:
+ if (resolve) return getAttribute();
+ return basicGetAttribute();
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ return isNullAsError() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE:
+ setAttribute((GenFeature)newValue);
+ return;
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ setNullAsError(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE:
+ setAttribute((GenFeature)null);
+ return;
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ setNullAsError(NULL_AS_ERROR_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE:
+ return attribute != null;
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ return nullAsError != NULL_AS_ERROR_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (nullAsError: ");
+ result.append(nullAsError);
+ result.append(')');
+ return result.toString();
+ }
+
+} //GenDomainAttributeTargetImpl \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenAdapterFactory.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenAdapterFactory.java
index aa7334c5d..e6660d6ac 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenAdapterFactory.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenAdapterFactory.java
@@ -10,6 +10,8 @@ import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.codegen.gmfgen.*;
+
import org.eclipse.gmf.codegen.gmfgen.Attributes;
import org.eclipse.gmf.codegen.gmfgen.BatchValidation;
import org.eclipse.gmf.codegen.gmfgen.ColorAttributes;
@@ -341,6 +343,9 @@ public class GMFGenAdapterFactory extends AdapterFactoryImpl {
public Object caseGenDiagramElementTarget(GenDiagramElementTarget object) {
return createGenDiagramElementTargetAdapter();
}
+ public Object caseGenDomainAttributeTarget(GenDomainAttributeTarget object) {
+ return createGenDomainAttributeTargetAdapter();
+ }
public Object caseGenNotationElementTarget(GenNotationElementTarget object) {
return createGenNotationElementTargetAdapter();
}
@@ -1272,6 +1277,20 @@ public class GMFGenAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget <em>Gen Domain Attribute Target</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDomainAttributeTarget
+ * @generated
+ */
+ public Adapter createGenDomainAttributeTargetAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.GenNotationElementTarget <em>Gen Notation Element Target</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenSwitch.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenSwitch.java
index 3907d4422..33301c8f9 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenSwitch.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenSwitch.java
@@ -10,6 +10,8 @@ import java.util.List;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.codegen.gmfgen.*;
+
import org.eclipse.gmf.codegen.gmfgen.Attributes;
import org.eclipse.gmf.codegen.gmfgen.BatchValidation;
import org.eclipse.gmf.codegen.gmfgen.ColorAttributes;
@@ -637,6 +639,14 @@ public class GMFGenSwitch {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case GMFGenPackage.GEN_DOMAIN_ATTRIBUTE_TARGET: {
+ GenDomainAttributeTarget genDomainAttributeTarget = (GenDomainAttributeTarget)theEObject;
+ Object result = caseGenDomainAttributeTarget(genDomainAttributeTarget);
+ if (result == null) result = caseGenAuditable(genDomainAttributeTarget);
+ if (result == null) result = caseGenRuleTarget(genDomainAttributeTarget);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
case GMFGenPackage.GEN_NOTATION_ELEMENT_TARGET: {
GenNotationElementTarget genNotationElementTarget = (GenNotationElementTarget)theEObject;
Object result = caseGenNotationElementTarget(genNotationElementTarget);
@@ -1658,6 +1668,21 @@ public class GMFGenSwitch {
}
/**
+ * Returns the result of interpretting the object as an instance of '<em>Gen Domain Attribute Target</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Gen Domain Attribute Target</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseGenDomainAttributeTarget(GenDomainAttributeTarget object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpretting the object as an instance of '<em>Gen Notation Element Target</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/plugins/org.eclipse.gmf.codegen/templates/editor/ConstraintProviders.jetinc b/plugins/org.eclipse.gmf.codegen/templates/editor/ConstraintProviders.jetinc
index e3ee6133b..7c5292552 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/editor/ConstraintProviders.jetinc
+++ b/plugins/org.eclipse.gmf.codegen/templates/editor/ConstraintProviders.jetinc
@@ -43,8 +43,8 @@ if (rootContainer != null && genDiagram.getDomainDiagramElement() != null) {
GenAuditContainer category = (GenAuditContainer)catIt.next();
for(java.util.Iterator it = category.getAudits().iterator(); it.hasNext(); rulePos++) {
GenAuditRule audit = (GenAuditRule)it.next();
- if(audit.getTarget() == null || !(audit.getTarget().getContext() instanceof GenClass)) continue;
- GenClass targetClass = (GenClass)audit.getTarget().getContext();
+ if(audit.getTarget() == null || (audit.getTarget().getTargetClass() == null)) continue;
+ GenClass targetClass = audit.getTarget().getTargetClass();
String targetClassName = (targetClass != null) ? targetClass.getGenPackage().getNSName() + "." + targetClass.getInterfaceName() : "null";
String modeAttr = audit.isUseInLiveMode() ? "" : "mode=\"Batch\"";
String name = audit.getName() != null ? audit.getName() : audit.getId();
diff --git a/plugins/org.eclipse.gmf.codegen/templates/providers/ValidationProvider.javajet b/plugins/org.eclipse.gmf.codegen/templates/providers/ValidationProvider.javajet
index 57a40d5c4..7d66dc2ed 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/providers/ValidationProvider.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/providers/ValidationProvider.javajet
@@ -498,7 +498,24 @@ for(java.util.Iterator it = allAudits.iterator(); it.hasNext();) {
* @generated
*/
public IStatus validate(<%=importManager.getImportedName("org.eclipse.emf.validation.IValidationContext")%> ctx) {
- Object result = expression.evaluate(ctx.getTarget());
+ Object evalCtx = ctx.getTarget();
+<% if(nextAudit.getTarget() instanceof GenDomainAttributeTarget) {
+ GenDomainAttributeTarget attrTarget = (GenDomainAttributeTarget) nextAudit.getTarget();
+ if(attrTarget.getAttribute() != null) {
+ String fGetter = (attrTarget.getAttribute() != null) ? importManager.getImportedName(attrTarget.getAttribute().getGenPackage().getQualifiedPackageInterfaceName()) + ".eINSTANCE.get" + attrTarget.getAttribute().getFeatureAccessorName() : ""; //$NON-NLS-1$ //$NON-NLS-2$
+%>
+ if(evalCtx instanceof EObject) evalCtx = ((EObject)evalCtx).eGet(<%=fGetter%>());
+ if(evalCtx == null) {
+<% if(attrTarget.isNullAsError()) { %>
+ return ctx.createFailureStatus(new Object[] { EMFCoreUtil.getQualifiedName(ctx.getTarget(), true) });
+<% } else {%>
+ return <%=importManager.getImportedName("org.eclipse.core.runtime.Status")%>.OK_STATUS;
+<% } %>
+ }
+<% }
+ }
+%>
+ Object result = expression.evaluate(evalCtx);
if(result instanceof Boolean && ((Boolean)result).booleanValue()) {
return <%=importManager.getImportedName("org.eclipse.core.runtime.Status")%>.OK_STATUS;
}
diff --git a/plugins/org.eclipse.gmf.map.edit/icons/full/ctool16/CreateAuditRule_target_DomainAttributeTarget.gif b/plugins/org.eclipse.gmf.map.edit/icons/full/ctool16/CreateAuditRule_target_DomainAttributeTarget.gif
new file mode 100644
index 000000000..5b7808087
--- /dev/null
+++ b/plugins/org.eclipse.gmf.map.edit/icons/full/ctool16/CreateAuditRule_target_DomainAttributeTarget.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.map.edit/icons/full/obj16/DomainAttributeTarget.gif b/plugins/org.eclipse.gmf.map.edit/icons/full/obj16/DomainAttributeTarget.gif
new file mode 100644
index 000000000..1e5345fb3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.map.edit/icons/full/obj16/DomainAttributeTarget.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.map.edit/plugin.properties b/plugins/org.eclipse.gmf.map.edit/plugin.properties
index 4e000c4f2..08ff658ae 100644
--- a/plugins/org.eclipse.gmf.map.edit/plugin.properties
+++ b/plugins/org.eclipse.gmf.map.edit/plugin.properties
@@ -214,6 +214,9 @@ _UI_MetricRule_container_feature = Container
_UI_AuditedMetricTarget_metric_feature = Metric
_UI_NodeReference_child_feature = Child
_UI_Wizard_category = Example EMF Model Creation Wizards
-
+
_UI_MetricRule_lowLimit_feature = Low Limit
_UI_MetricRule_highLimit_feature = High Limit
+_UI_DomainAttributeTarget_type = Domain Attribute Target
+_UI_DomainAttributeTarget_attribute_feature = Attribute
+_UI_DomainAttributeTarget_nullAsError_feature = Null As Error
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/presentation/GMFMapEditor.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/presentation/GMFMapEditor.java
index 9166cbca0..88c1c568e 100644
--- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/presentation/GMFMapEditor.java
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/presentation/GMFMapEditor.java
@@ -8,6 +8,8 @@ package org.eclipse.gmf.mappings.presentation;
import java.io.IOException;
+import java.io.InputStream;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -344,7 +346,7 @@ public class GMFMapEditor
if ((delta.getKind() & IResourceDelta.REMOVED) != 0) {
removedResources.add(resource);
}
- else {
+ else if (!savedResources.remove(resource)) {
changedResources.add(resource);
}
}
@@ -381,6 +383,14 @@ public class GMFMapEditor
if (!visitor.getChangedResources().isEmpty()) {
changedResources.addAll(visitor.getChangedResources());
+ if (getSite().getPage().getActiveEditor() == GMFMapEditor.this) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ handleActivate();
+ }
+ });
+ }
}
}
catch (CoreException exception) {
@@ -1133,7 +1143,7 @@ public class GMFMapEditor
boolean first = true;
for (Iterator i = editingDomain.getResourceSet().getResources().iterator(); i.hasNext(); ) {
Resource resource = (Resource)i.next();
- if ((first || !resource.getContents().isEmpty()) && !editingDomain.isReadOnly(resource)) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
savedResources.add(resource);
resource.save(Collections.EMPTY_MAP);
}
@@ -1164,6 +1174,27 @@ public class GMFMapEditor
}
/**
+ * This returns wether something has been persisted to the URI of the specified resource.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean isPersisted(Resource resource) {
+ boolean result = false;
+ try {
+ InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ }
+ catch (IOException e) { }
+
+ return result;
+ }
+
+ /**
* This always returns true because it is not currently supported.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/AuditRuleItemProvider.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/AuditRuleItemProvider.java
index d67efd892..a8d020ab8 100644
--- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/AuditRuleItemProvider.java
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/AuditRuleItemProvider.java
@@ -294,6 +294,11 @@ public class AuditRuleItemProvider
newChildDescriptors.add
(createChildParameter
(GMFMapPackage.eINSTANCE.getAuditRule_Target(),
+ GMFMapFactory.eINSTANCE.createDomainAttributeTarget()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFMapPackage.eINSTANCE.getAuditRule_Target(),
GMFMapFactory.eINSTANCE.createDiagramElementTarget()));
newChildDescriptors.add
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/DomainAttributeTargetItemProvider.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/DomainAttributeTargetItemProvider.java
new file mode 100644
index 000000000..cb03c2cbe
--- /dev/null
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/DomainAttributeTargetItemProvider.java
@@ -0,0 +1,171 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DomainAttributeTargetItemProvider.java,v 1.1 2006/04/25 19:15:42 radvorak Exp $
+ */
+package org.eclipse.gmf.mappings.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.mappings.DomainAttributeTarget;
+import org.eclipse.gmf.mappings.GMFMapPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.mappings.DomainAttributeTarget} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DomainAttributeTargetItemProvider
+ 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 DomainAttributeTargetItemProvider(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_DomainAttributeTarget_attribute_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DomainAttributeTarget_attribute_feature", "_UI_DomainAttributeTarget_type"),
+ GMFMapPackage.eINSTANCE.getDomainAttributeTarget_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_DomainAttributeTarget_nullAsError_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DomainAttributeTarget_nullAsError_feature", "_UI_DomainAttributeTarget_type"),
+ GMFMapPackage.eINSTANCE.getDomainAttributeTarget_NullAsError(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns DomainAttributeTarget.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DomainAttributeTarget"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ DomainAttributeTarget domainAttributeTarget = (DomainAttributeTarget)object;
+ return getString("_UI_DomainAttributeTarget_type") + " " + domainAttributeTarget.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(DomainAttributeTarget.class)) {
+ case GMFMapPackage.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 GMFMapEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java
index 57df6f410..65ca76708 100644
--- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java
@@ -426,6 +426,28 @@ public class GMFMapItemProviderAdapterFactory extends GMFMapAdapterFactory imple
}
/**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.mappings.DomainAttributeTarget} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainAttributeTargetItemProvider domainAttributeTargetItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.mappings.DomainAttributeTarget}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createDomainAttributeTargetAdapter() {
+ if (domainAttributeTargetItemProvider == null) {
+ domainAttributeTargetItemProvider = new DomainAttributeTargetItemProvider(this);
+ }
+
+ return domainAttributeTargetItemProvider;
+ }
+
+ /**
* This keeps track of the one adapter used for all {@link org.eclipse.gmf.mappings.DiagramElementTarget} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -647,6 +669,7 @@ public class GMFMapItemProviderAdapterFactory extends GMFMapAdapterFactory imple
if (auditContainerItemProvider != null) auditContainerItemProvider.dispose();
if (auditRuleItemProvider != null) auditRuleItemProvider.dispose();
if (domainElementTargetItemProvider != null) domainElementTargetItemProvider.dispose();
+ if (domainAttributeTargetItemProvider != null) domainAttributeTargetItemProvider.dispose();
if (diagramElementTargetItemProvider != null) diagramElementTargetItemProvider.dispose();
if (notationElementTargetItemProvider != null) notationElementTargetItemProvider.dispose();
if (metricContainerItemProvider != null) metricContainerItemProvider.dispose();
diff --git a/plugins/org.eclipse.gmf.map/models/gmfmap.ecore b/plugins/org.eclipse.gmf.map/models/gmfmap.ecore
index bd0dc9f61..34b1ad08e 100644
--- a/plugins/org.eclipse.gmf.map/models/gmfmap.ecore
+++ b/plugins/org.eclipse.gmf.map/models/gmfmap.ecore
@@ -460,6 +460,26 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DomainAttributeTarget" eSuperTypes="#//Auditable">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Represents value based target, useful for audit rules expression not capable of ecore meta-model access"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/gmf/2005/constraints/meta">
+ <details key="def" value="context"/>
+ <details key="ocl" value="attribute.eType"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="attribute" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EAttribute">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The attribute the value of which is used as context in audit rule defining this target"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="nullAsError" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Indicates whether null value of the attribute is reported as audit failure or success"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DiagramElementTarget" eSuperTypes="#//Auditable #//Measurable">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Target for rules applied on diagram notation model selectively, for specific visualized element"/>
diff --git a/plugins/org.eclipse.gmf.map/models/gmfmap.genmodel b/plugins/org.eclipse.gmf.map/models/gmfmap.genmodel
index d8baa6de6..e27fdab68 100644
--- a/plugins/org.eclipse.gmf.map/models/gmfmap.genmodel
+++ b/plugins/org.eclipse.gmf.map/models/gmfmap.genmodel
@@ -144,6 +144,10 @@
<genClasses ecoreClass="gmfmap.ecore#//DomainElementTarget">
<genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfmap.ecore#//DomainElementTarget/element"/>
</genClasses>
+ <genClasses ecoreClass="gmfmap.ecore#//DomainAttributeTarget">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfmap.ecore#//DomainAttributeTarget/attribute"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfmap.ecore#//DomainAttributeTarget/nullAsError"/>
+ </genClasses>
<genClasses ecoreClass="gmfmap.ecore#//DiagramElementTarget">
<genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfmap.ecore#//DiagramElementTarget/element"/>
</genClasses>
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/DomainAttributeTarget.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/DomainAttributeTarget.java
new file mode 100644
index 000000000..3581107c1
--- /dev/null
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/DomainAttributeTarget.java
@@ -0,0 +1,83 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DomainAttributeTarget.java,v 1.1 2006/04/25 19:15:49 radvorak Exp $
+ */
+package org.eclipse.gmf.mappings;
+
+import org.eclipse.emf.ecore.EAttribute;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Domain Attribute Target</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Represents value based target, useful for audit rules expression not capable of ecore meta-model access
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.mappings.DomainAttributeTarget#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.eclipse.gmf.mappings.DomainAttributeTarget#isNullAsError <em>Null As Error</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.mappings.GMFMapPackage#getDomainAttributeTarget()
+ * @model annotation="http://www.eclipse.org/gmf/2005/constraints/meta def='context' ocl='attribute.eType'"
+ * @generated
+ */
+public interface DomainAttributeTarget extends Auditable {
+ /**
+ * Returns the value of the '<em><b>Attribute</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The attribute the value of which is used as context in audit rule defining this target
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Attribute</em>' reference.
+ * @see #setAttribute(EAttribute)
+ * @see org.eclipse.gmf.mappings.GMFMapPackage#getDomainAttributeTarget_Attribute()
+ * @model required="true"
+ * @generated
+ */
+ EAttribute getAttribute();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.mappings.DomainAttributeTarget#getAttribute <em>Attribute</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute</em>' reference.
+ * @see #getAttribute()
+ * @generated
+ */
+ void setAttribute(EAttribute value);
+
+ /**
+ * Returns the value of the '<em><b>Null As Error</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Indicates whether null value of the attribute is reported as audit failure or success
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Null As Error</em>' attribute.
+ * @see #setNullAsError(boolean)
+ * @see org.eclipse.gmf.mappings.GMFMapPackage#getDomainAttributeTarget_NullAsError()
+ * @model
+ * @generated
+ */
+ boolean isNullAsError();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.mappings.DomainAttributeTarget#isNullAsError <em>Null As Error</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Null As Error</em>' attribute.
+ * @see #isNullAsError()
+ * @generated
+ */
+ void setNullAsError(boolean value);
+
+} // DomainAttributeTarget \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java
index b145eabe7..168410cad 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java
@@ -170,6 +170,15 @@ public interface GMFMapFactory extends EFactory {
DomainElementTarget createDomainElementTarget();
/**
+ * Returns a new object of class '<em>Domain Attribute Target</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Domain Attribute Target</em>'.
+ * @generated
+ */
+ DomainAttributeTarget createDomainAttributeTarget();
+
+ /**
* Returns a new object of class '<em>Diagram Element Target</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java
index d0f5873bc..9c5c38373 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java
@@ -1374,7 +1374,7 @@ public interface GMFMapPackage extends EPackage {
* @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getAuditable()
* @generated
*/
- int AUDITABLE = 29;
+ int AUDITABLE = 30;
/**
* The number of structural features of the '<em>Auditable</em>' class.
@@ -1414,6 +1414,43 @@ public interface GMFMapPackage extends EPackage {
int DOMAIN_ELEMENT_TARGET_FEATURE_COUNT = AUDITABLE_FEATURE_COUNT + 1;
/**
+ * The meta object id for the '{@link org.eclipse.gmf.mappings.impl.DomainAttributeTargetImpl <em>Domain Attribute Target</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.mappings.impl.DomainAttributeTargetImpl
+ * @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getDomainAttributeTarget()
+ * @generated
+ */
+ int DOMAIN_ATTRIBUTE_TARGET = 24;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE = AUDITABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Null As Error</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR = AUDITABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Domain Attribute Target</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_ATTRIBUTE_TARGET_FEATURE_COUNT = AUDITABLE_FEATURE_COUNT + 2;
+
+ /**
* The meta object id for the '{@link org.eclipse.gmf.mappings.impl.DiagramElementTargetImpl <em>Diagram Element Target</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1421,7 +1458,7 @@ public interface GMFMapPackage extends EPackage {
* @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getDiagramElementTarget()
* @generated
*/
- int DIAGRAM_ELEMENT_TARGET = 24;
+ int DIAGRAM_ELEMENT_TARGET = 25;
/**
* The feature id for the '<em><b>Element</b></em>' reference.
@@ -1449,7 +1486,7 @@ public interface GMFMapPackage extends EPackage {
* @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getNotationElementTarget()
* @generated
*/
- int NOTATION_ELEMENT_TARGET = 25;
+ int NOTATION_ELEMENT_TARGET = 26;
/**
* The feature id for the '<em><b>Element</b></em>' reference.
@@ -1477,7 +1514,7 @@ public interface GMFMapPackage extends EPackage {
* @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getMetricContainer()
* @generated
*/
- int METRIC_CONTAINER = 26;
+ int METRIC_CONTAINER = 27;
/**
* The feature id for the '<em><b>Metrics</b></em>' containment reference list.
@@ -1505,7 +1542,7 @@ public interface GMFMapPackage extends EPackage {
* @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getMetricRule()
* @generated
*/
- int METRIC_RULE = 27;
+ int METRIC_RULE = 28;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@@ -1596,7 +1633,7 @@ public interface GMFMapPackage extends EPackage {
* @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getAuditedMetricTarget()
* @generated
*/
- int AUDITED_METRIC_TARGET = 28;
+ int AUDITED_METRIC_TARGET = 29;
/**
* The feature id for the '<em><b>Metric</b></em>' reference.
@@ -1624,7 +1661,7 @@ public interface GMFMapPackage extends EPackage {
* @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getMeasurable()
* @generated
*/
- int MEASURABLE = 30;
+ int MEASURABLE = 31;
/**
* The number of structural features of the '<em>Measurable</em>' class.
@@ -1643,7 +1680,7 @@ public interface GMFMapPackage extends EPackage {
* @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getSeverity()
* @generated
*/
- int SEVERITY = 31;
+ int SEVERITY = 32;
/**
@@ -2635,6 +2672,38 @@ public interface GMFMapPackage extends EPackage {
EReference getDomainElementTarget_Element();
/**
+ * Returns the meta object for class '{@link org.eclipse.gmf.mappings.DomainAttributeTarget <em>Domain Attribute Target</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Domain Attribute Target</em>'.
+ * @see org.eclipse.gmf.mappings.DomainAttributeTarget
+ * @generated
+ */
+ EClass getDomainAttributeTarget();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.mappings.DomainAttributeTarget#getAttribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Attribute</em>'.
+ * @see org.eclipse.gmf.mappings.DomainAttributeTarget#getAttribute()
+ * @see #getDomainAttributeTarget()
+ * @generated
+ */
+ EReference getDomainAttributeTarget_Attribute();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.mappings.DomainAttributeTarget#isNullAsError <em>Null As Error</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Null As Error</em>'.
+ * @see org.eclipse.gmf.mappings.DomainAttributeTarget#isNullAsError()
+ * @see #getDomainAttributeTarget()
+ * @generated
+ */
+ EAttribute getDomainAttributeTarget_NullAsError();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.gmf.mappings.DiagramElementTarget <em>Diagram Element Target</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditContainerImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditContainerImpl.java
index 0b472420c..63acd5685 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditContainerImpl.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditContainerImpl.java
@@ -217,6 +217,16 @@ public class AuditContainerImpl extends EObjectImpl implements AuditContainer {
* <!-- end-user-doc -->
* @generated
*/
+ public NotificationChain basicSetParentContainer(AuditContainer newParentContainer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newParentContainer, GMFMapPackage.AUDIT_CONTAINER__PARENT_CONTAINER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public void setParentContainer(AuditContainer newParentContainer) {
if (newParentContainer != eInternalContainer() || (eContainerFeatureID != GMFMapPackage.AUDIT_CONTAINER__PARENT_CONTAINER && newParentContainer != null)) {
if (EcoreUtil.isAncestor(this, newParentContainer))
@@ -226,7 +236,7 @@ public class AuditContainerImpl extends EObjectImpl implements AuditContainer {
msgs = eBasicRemoveFromContainer(msgs);
if (newParentContainer != null)
msgs = ((InternalEObject)newParentContainer).eInverseAdd(this, GMFMapPackage.AUDIT_CONTAINER__CHILD_CONTAINERS, AuditContainer.class, msgs);
- msgs = eBasicSetContainer((InternalEObject)newParentContainer, GMFMapPackage.AUDIT_CONTAINER__PARENT_CONTAINER, msgs);
+ msgs = basicSetParentContainer(newParentContainer, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
@@ -267,7 +277,7 @@ public class AuditContainerImpl extends EObjectImpl implements AuditContainer {
case GMFMapPackage.AUDIT_CONTAINER__PARENT_CONTAINER:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, GMFMapPackage.AUDIT_CONTAINER__PARENT_CONTAINER, msgs);
+ return basicSetParentContainer((AuditContainer)otherEnd, msgs);
case GMFMapPackage.AUDIT_CONTAINER__AUDITS:
return ((InternalEList)getAudits()).basicAdd(otherEnd, msgs);
case GMFMapPackage.AUDIT_CONTAINER__CHILD_CONTAINERS:
@@ -284,7 +294,7 @@ public class AuditContainerImpl extends EObjectImpl implements AuditContainer {
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case GMFMapPackage.AUDIT_CONTAINER__PARENT_CONTAINER:
- return eBasicSetContainer(null, GMFMapPackage.AUDIT_CONTAINER__PARENT_CONTAINER, msgs);
+ return basicSetParentContainer(null, msgs);
case GMFMapPackage.AUDIT_CONTAINER__AUDITS:
return ((InternalEList)getAudits()).basicRemove(otherEnd, msgs);
case GMFMapPackage.AUDIT_CONTAINER__CHILD_CONTAINERS:
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditRuleImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditRuleImpl.java
index 26d738c74..db8b662b9 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditRuleImpl.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/AuditRuleImpl.java
@@ -427,6 +427,16 @@ public class AuditRuleImpl extends EObjectImpl implements AuditRule {
* <!-- end-user-doc -->
* @generated
*/
+ public NotificationChain basicSetContainer(AuditContainer newContainer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newContainer, GMFMapPackage.AUDIT_RULE__CONTAINER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public void setContainer(AuditContainer newContainer) {
if (newContainer != eInternalContainer() || (eContainerFeatureID != GMFMapPackage.AUDIT_RULE__CONTAINER && newContainer != null)) {
if (EcoreUtil.isAncestor(this, newContainer))
@@ -436,7 +446,7 @@ public class AuditRuleImpl extends EObjectImpl implements AuditRule {
msgs = eBasicRemoveFromContainer(msgs);
if (newContainer != null)
msgs = ((InternalEObject)newContainer).eInverseAdd(this, GMFMapPackage.AUDIT_CONTAINER__AUDITS, AuditContainer.class, msgs);
- msgs = eBasicSetContainer((InternalEObject)newContainer, GMFMapPackage.AUDIT_RULE__CONTAINER, msgs);
+ msgs = basicSetContainer(newContainer, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
@@ -453,7 +463,7 @@ public class AuditRuleImpl extends EObjectImpl implements AuditRule {
case GMFMapPackage.AUDIT_RULE__CONTAINER:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, GMFMapPackage.AUDIT_RULE__CONTAINER, msgs);
+ return basicSetContainer((AuditContainer)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
@@ -470,7 +480,7 @@ public class AuditRuleImpl extends EObjectImpl implements AuditRule {
case GMFMapPackage.AUDIT_RULE__TARGET:
return basicSetTarget(null, msgs);
case GMFMapPackage.AUDIT_RULE__CONTAINER:
- return eBasicSetContainer(null, GMFMapPackage.AUDIT_RULE__CONTAINER, msgs);
+ return basicSetContainer(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/ChildReferenceImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/ChildReferenceImpl.java
index 0c04addd2..61c56b319 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/ChildReferenceImpl.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/ChildReferenceImpl.java
@@ -101,6 +101,16 @@ public class ChildReferenceImpl extends NodeReferenceImpl implements ChildRefere
* <!-- end-user-doc -->
* @generated
*/
+ public NotificationChain basicSetParentNode(NodeMapping newParentNode, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newParentNode, GMFMapPackage.CHILD_REFERENCE__PARENT_NODE, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public void setParentNode(NodeMapping newParentNode) {
if (newParentNode != eInternalContainer() || (eContainerFeatureID != GMFMapPackage.CHILD_REFERENCE__PARENT_NODE && newParentNode != null)) {
if (EcoreUtil.isAncestor(this, newParentNode))
@@ -110,7 +120,7 @@ public class ChildReferenceImpl extends NodeReferenceImpl implements ChildRefere
msgs = eBasicRemoveFromContainer(msgs);
if (newParentNode != null)
msgs = ((InternalEObject)newParentNode).eInverseAdd(this, GMFMapPackage.NODE_MAPPING__CHILDREN, NodeMapping.class, msgs);
- msgs = eBasicSetContainer((InternalEObject)newParentNode, GMFMapPackage.CHILD_REFERENCE__PARENT_NODE, msgs);
+ msgs = basicSetParentNode(newParentNode, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
@@ -268,7 +278,7 @@ public class ChildReferenceImpl extends NodeReferenceImpl implements ChildRefere
case GMFMapPackage.CHILD_REFERENCE__PARENT_NODE:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, GMFMapPackage.CHILD_REFERENCE__PARENT_NODE, msgs);
+ return basicSetParentNode((NodeMapping)otherEnd, msgs);
case GMFMapPackage.CHILD_REFERENCE__COMPARTMENT:
if (compartment != null)
msgs = ((InternalEObject)compartment).eInverseRemove(this, GMFMapPackage.COMPARTMENT_MAPPING__CHILDREN, CompartmentMapping.class, msgs);
@@ -285,7 +295,7 @@ public class ChildReferenceImpl extends NodeReferenceImpl implements ChildRefere
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case GMFMapPackage.CHILD_REFERENCE__PARENT_NODE:
- return eBasicSetContainer(null, GMFMapPackage.CHILD_REFERENCE__PARENT_NODE, msgs);
+ return basicSetParentNode(null, msgs);
case GMFMapPackage.CHILD_REFERENCE__COMPARTMENT:
return basicSetCompartment(null, msgs);
case GMFMapPackage.CHILD_REFERENCE__OWNED_CHILD:
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/DomainAttributeTargetImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/DomainAttributeTargetImpl.java
new file mode 100644
index 000000000..71c0b9007
--- /dev/null
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/DomainAttributeTargetImpl.java
@@ -0,0 +1,223 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DomainAttributeTargetImpl.java,v 1.1 2006/04/25 19:15:49 radvorak Exp $
+ */
+package org.eclipse.gmf.mappings.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.gmf.mappings.DomainAttributeTarget;
+import org.eclipse.gmf.mappings.GMFMapPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Domain Attribute Target</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.mappings.impl.DomainAttributeTargetImpl#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.eclipse.gmf.mappings.impl.DomainAttributeTargetImpl#isNullAsError <em>Null As Error</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DomainAttributeTargetImpl extends EObjectImpl implements DomainAttributeTarget {
+ /**
+ * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttribute()
+ * @generated
+ * @ordered
+ */
+ protected EAttribute attribute = null;
+
+ /**
+ * The default value of the '{@link #isNullAsError() <em>Null As Error</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isNullAsError()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean NULL_AS_ERROR_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isNullAsError() <em>Null As Error</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isNullAsError()
+ * @generated
+ * @ordered
+ */
+ protected boolean nullAsError = NULL_AS_ERROR_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainAttributeTargetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return GMFMapPackage.eINSTANCE.getDomainAttributeTarget();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAttribute() {
+ if (attribute != null && attribute.eIsProxy()) {
+ InternalEObject oldAttribute = (InternalEObject)attribute;
+ attribute = (EAttribute)eResolveProxy(oldAttribute);
+ if (attribute != oldAttribute) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE, oldAttribute, attribute));
+ }
+ }
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute basicGetAttribute() {
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttribute(EAttribute newAttribute) {
+ EAttribute oldAttribute = attribute;
+ attribute = newAttribute;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE, oldAttribute, attribute));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isNullAsError() {
+ return nullAsError;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNullAsError(boolean newNullAsError) {
+ boolean oldNullAsError = nullAsError;
+ nullAsError = newNullAsError;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR, oldNullAsError, nullAsError));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE:
+ if (resolve) return getAttribute();
+ return basicGetAttribute();
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ return isNullAsError() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE:
+ setAttribute((EAttribute)newValue);
+ return;
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ setNullAsError(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE:
+ setAttribute((EAttribute)null);
+ return;
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ setNullAsError(NULL_AS_ERROR_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE:
+ return attribute != null;
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR:
+ return nullAsError != NULL_AS_ERROR_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (nullAsError: ");
+ result.append(nullAsError);
+ result.append(')');
+ return result.toString();
+ }
+
+} //DomainAttributeTargetImpl \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureSeqInitializerImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureSeqInitializerImpl.java
index a37d094af..2e3c45339 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureSeqInitializerImpl.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureSeqInitializerImpl.java
@@ -81,6 +81,16 @@ public class FeatureSeqInitializerImpl extends EObjectImpl implements FeatureSeq
* <!-- end-user-doc -->
* @generated
*/
+ public NotificationChain basicSetMappingEntry(MappingEntry newMappingEntry, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newMappingEntry, GMFMapPackage.FEATURE_SEQ_INITIALIZER__MAPPING_ENTRY, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public void setMappingEntry(MappingEntry newMappingEntry) {
if (newMappingEntry != eInternalContainer() || (eContainerFeatureID != GMFMapPackage.FEATURE_SEQ_INITIALIZER__MAPPING_ENTRY && newMappingEntry != null)) {
if (EcoreUtil.isAncestor(this, newMappingEntry))
@@ -90,7 +100,7 @@ public class FeatureSeqInitializerImpl extends EObjectImpl implements FeatureSeq
msgs = eBasicRemoveFromContainer(msgs);
if (newMappingEntry != null)
msgs = ((InternalEObject)newMappingEntry).eInverseAdd(this, GMFMapPackage.MAPPING_ENTRY__DOMAIN_INITIALIZER, MappingEntry.class, msgs);
- msgs = eBasicSetContainer((InternalEObject)newMappingEntry, GMFMapPackage.FEATURE_SEQ_INITIALIZER__MAPPING_ENTRY, msgs);
+ msgs = basicSetMappingEntry(newMappingEntry, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
@@ -119,7 +129,7 @@ public class FeatureSeqInitializerImpl extends EObjectImpl implements FeatureSeq
case GMFMapPackage.FEATURE_SEQ_INITIALIZER__MAPPING_ENTRY:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, GMFMapPackage.FEATURE_SEQ_INITIALIZER__MAPPING_ENTRY, msgs);
+ return basicSetMappingEntry((MappingEntry)otherEnd, msgs);
case GMFMapPackage.FEATURE_SEQ_INITIALIZER__INITIALIZERS:
return ((InternalEList)getInitializers()).basicAdd(otherEnd, msgs);
}
@@ -134,7 +144,7 @@ public class FeatureSeqInitializerImpl extends EObjectImpl implements FeatureSeq
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case GMFMapPackage.FEATURE_SEQ_INITIALIZER__MAPPING_ENTRY:
- return eBasicSetContainer(null, GMFMapPackage.FEATURE_SEQ_INITIALIZER__MAPPING_ENTRY, msgs);
+ return basicSetMappingEntry(null, msgs);
case GMFMapPackage.FEATURE_SEQ_INITIALIZER__INITIALIZERS:
return ((InternalEList)getInitializers()).basicRemove(otherEnd, msgs);
}
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureValueSpecImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureValueSpecImpl.java
index d793f0724..8f7355d7f 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureValueSpecImpl.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/FeatureValueSpecImpl.java
@@ -113,6 +113,16 @@ public class FeatureValueSpecImpl extends ValueExpressionImpl implements Feature
* <!-- end-user-doc -->
* @generated
*/
+ public NotificationChain basicSetFeatureSeqInitializer(FeatureSeqInitializer newFeatureSeqInitializer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newFeatureSeqInitializer, GMFMapPackage.FEATURE_VALUE_SPEC__FEATURE_SEQ_INITIALIZER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public void setFeatureSeqInitializer(FeatureSeqInitializer newFeatureSeqInitializer) {
if (newFeatureSeqInitializer != eInternalContainer() || (eContainerFeatureID != GMFMapPackage.FEATURE_VALUE_SPEC__FEATURE_SEQ_INITIALIZER && newFeatureSeqInitializer != null)) {
if (EcoreUtil.isAncestor(this, newFeatureSeqInitializer))
@@ -122,7 +132,7 @@ public class FeatureValueSpecImpl extends ValueExpressionImpl implements Feature
msgs = eBasicRemoveFromContainer(msgs);
if (newFeatureSeqInitializer != null)
msgs = ((InternalEObject)newFeatureSeqInitializer).eInverseAdd(this, GMFMapPackage.FEATURE_SEQ_INITIALIZER__INITIALIZERS, FeatureSeqInitializer.class, msgs);
- msgs = eBasicSetContainer((InternalEObject)newFeatureSeqInitializer, GMFMapPackage.FEATURE_VALUE_SPEC__FEATURE_SEQ_INITIALIZER, msgs);
+ msgs = basicSetFeatureSeqInitializer(newFeatureSeqInitializer, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
@@ -139,7 +149,7 @@ public class FeatureValueSpecImpl extends ValueExpressionImpl implements Feature
case GMFMapPackage.FEATURE_VALUE_SPEC__FEATURE_SEQ_INITIALIZER:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, GMFMapPackage.FEATURE_VALUE_SPEC__FEATURE_SEQ_INITIALIZER, msgs);
+ return basicSetFeatureSeqInitializer((FeatureSeqInitializer)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
@@ -152,7 +162,7 @@ public class FeatureValueSpecImpl extends ValueExpressionImpl implements Feature
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case GMFMapPackage.FEATURE_VALUE_SPEC__FEATURE_SEQ_INITIALIZER:
- return eBasicSetContainer(null, GMFMapPackage.FEATURE_VALUE_SPEC__FEATURE_SEQ_INITIALIZER, msgs);
+ return basicSetFeatureSeqInitializer(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java
index aa24bd286..8ab27accc 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java
@@ -92,6 +92,7 @@ public class GMFMapFactoryImpl extends EFactoryImpl implements GMFMapFactory {
case GMFMapPackage.AUDIT_CONTAINER: return createAuditContainer();
case GMFMapPackage.AUDIT_RULE: return createAuditRule();
case GMFMapPackage.DOMAIN_ELEMENT_TARGET: return createDomainElementTarget();
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET: return createDomainAttributeTarget();
case GMFMapPackage.DIAGRAM_ELEMENT_TARGET: return createDiagramElementTarget();
case GMFMapPackage.NOTATION_ELEMENT_TARGET: return createNotationElementTarget();
case GMFMapPackage.METRIC_CONTAINER: return createMetricContainer();
@@ -295,6 +296,16 @@ public class GMFMapFactoryImpl extends EFactoryImpl implements GMFMapFactory {
* <!-- end-user-doc -->
* @generated
*/
+ public DomainAttributeTarget createDomainAttributeTarget() {
+ DomainAttributeTargetImpl domainAttributeTarget = new DomainAttributeTargetImpl();
+ return domainAttributeTarget;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public DiagramElementTarget createDiagramElementTarget() {
DiagramElementTargetImpl diagramElementTarget = new DiagramElementTargetImpl();
return diagramElementTarget;
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java
index 85728c77b..e37e2d88f 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.mappings.ChildReference;
import org.eclipse.gmf.mappings.CompartmentMapping;
import org.eclipse.gmf.mappings.Constraint;
import org.eclipse.gmf.mappings.DiagramElementTarget;
+import org.eclipse.gmf.mappings.DomainAttributeTarget;
import org.eclipse.gmf.mappings.DomainElementTarget;
import org.eclipse.gmf.mappings.ElementInitializer;
import org.eclipse.gmf.mappings.FeatureSeqInitializer;
@@ -229,6 +230,13 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage {
* <!-- end-user-doc -->
* @generated
*/
+ private EClass domainAttributeTargetEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EClass diagramElementTargetEClass = null;
/**
@@ -1185,6 +1193,33 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getDomainAttributeTarget() {
+ return domainAttributeTargetEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDomainAttributeTarget_Attribute() {
+ return (EReference)domainAttributeTargetEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDomainAttributeTarget_NullAsError() {
+ return (EAttribute)domainAttributeTargetEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getDiagramElementTarget() {
return diagramElementTargetEClass;
}
@@ -1486,6 +1521,10 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage {
domainElementTargetEClass = createEClass(DOMAIN_ELEMENT_TARGET);
createEReference(domainElementTargetEClass, DOMAIN_ELEMENT_TARGET__ELEMENT);
+ domainAttributeTargetEClass = createEClass(DOMAIN_ATTRIBUTE_TARGET);
+ createEReference(domainAttributeTargetEClass, DOMAIN_ATTRIBUTE_TARGET__ATTRIBUTE);
+ createEAttribute(domainAttributeTargetEClass, DOMAIN_ATTRIBUTE_TARGET__NULL_AS_ERROR);
+
diagramElementTargetEClass = createEClass(DIAGRAM_ELEMENT_TARGET);
createEReference(diagramElementTargetEClass, DIAGRAM_ELEMENT_TARGET__ELEMENT);
@@ -1560,6 +1599,7 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage {
auditRuleEClass.getESuperTypes().add(this.getRuleBase());
domainElementTargetEClass.getESuperTypes().add(this.getAuditable());
domainElementTargetEClass.getESuperTypes().add(this.getMeasurable());
+ domainAttributeTargetEClass.getESuperTypes().add(this.getAuditable());
diagramElementTargetEClass.getESuperTypes().add(this.getAuditable());
diagramElementTargetEClass.getESuperTypes().add(this.getMeasurable());
notationElementTargetEClass.getESuperTypes().add(this.getAuditable());
@@ -1686,6 +1726,10 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage {
initEClass(domainElementTargetEClass, DomainElementTarget.class, "DomainElementTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getDomainElementTarget_Element(), ecorePackage.getEClass(), null, "element", null, 1, 1, DomainElementTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(domainAttributeTargetEClass, DomainAttributeTarget.class, "DomainAttributeTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getDomainAttributeTarget_Attribute(), ecorePackage.getEAttribute(), null, "attribute", null, 1, 1, DomainAttributeTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDomainAttributeTarget_NullAsError(), ecorePackage.getEBoolean(), "nullAsError", null, 0, 1, DomainAttributeTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
initEClass(diagramElementTargetEClass, DiagramElementTarget.class, "DiagramElementTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getDiagramElementTarget_Element(), this.getMappingEntry(), null, "element", null, 1, 1, DiagramElementTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -1742,7 +1786,7 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage {
new String[] {
"constraints", "http://www.eclipse.org/gmf/2005/constraints",
"constraintsMeta", "http://www.eclipse.org/gmf/2005/constraints/meta"
- });
+ });
}
/**
@@ -1848,6 +1892,13 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage {
"ocl", "element"
});
addAnnotation
+ (domainAttributeTargetEClass,
+ source,
+ new String[] {
+ "def", "context",
+ "ocl", "attribute.eType"
+ });
+ addAnnotation
(diagramElementTargetEClass,
source,
new String[] {
@@ -2037,7 +2088,7 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage {
new String[] {
"ocl", "not id.oclIsUndefined() implies container.audits->one(i | i.id = self.id)",
"description", "Audit rule with the same ID already exists"
- });
+ });
addAnnotation
(getNotationElementTarget_Element(),
source,
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/MetricRuleImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/MetricRuleImpl.java
index 87c446339..dd4b5c232 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/MetricRuleImpl.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/MetricRuleImpl.java
@@ -388,6 +388,16 @@ public class MetricRuleImpl extends EObjectImpl implements MetricRule {
* <!-- end-user-doc -->
* @generated
*/
+ public NotificationChain basicSetContainer(MetricContainer newContainer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newContainer, GMFMapPackage.METRIC_RULE__CONTAINER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public void setContainer(MetricContainer newContainer) {
if (newContainer != eInternalContainer() || (eContainerFeatureID != GMFMapPackage.METRIC_RULE__CONTAINER && newContainer != null)) {
if (EcoreUtil.isAncestor(this, newContainer))
@@ -397,7 +407,7 @@ public class MetricRuleImpl extends EObjectImpl implements MetricRule {
msgs = eBasicRemoveFromContainer(msgs);
if (newContainer != null)
msgs = ((InternalEObject)newContainer).eInverseAdd(this, GMFMapPackage.METRIC_CONTAINER__METRICS, MetricContainer.class, msgs);
- msgs = eBasicSetContainer((InternalEObject)newContainer, GMFMapPackage.METRIC_RULE__CONTAINER, msgs);
+ msgs = basicSetContainer(newContainer, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
@@ -414,7 +424,7 @@ public class MetricRuleImpl extends EObjectImpl implements MetricRule {
case GMFMapPackage.METRIC_RULE__CONTAINER:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, GMFMapPackage.METRIC_RULE__CONTAINER, msgs);
+ return basicSetContainer((MetricContainer)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
@@ -431,7 +441,7 @@ public class MetricRuleImpl extends EObjectImpl implements MetricRule {
case GMFMapPackage.METRIC_RULE__TARGET:
return basicSetTarget(null, msgs);
case GMFMapPackage.METRIC_RULE__CONTAINER:
- return eBasicSetContainer(null, GMFMapPackage.METRIC_RULE__CONTAINER, msgs);
+ return basicSetContainer(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java
index f54939caf..ba0f9286b 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java
@@ -163,6 +163,9 @@ public class GMFMapAdapterFactory extends AdapterFactoryImpl {
public Object caseDomainElementTarget(DomainElementTarget object) {
return createDomainElementTargetAdapter();
}
+ public Object caseDomainAttributeTarget(DomainAttributeTarget object) {
+ return createDomainAttributeTargetAdapter();
+ }
public Object caseDiagramElementTarget(DiagramElementTarget object) {
return createDiagramElementTargetAdapter();
}
@@ -539,6 +542,20 @@ public class GMFMapAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.mappings.DomainAttributeTarget <em>Domain Attribute Target</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.mappings.DomainAttributeTarget
+ * @generated
+ */
+ public Adapter createDomainAttributeTargetAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.gmf.mappings.DiagramElementTarget <em>Diagram Element Target</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java
index 5fb3ab1ad..1a4789e18 100644
--- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java
+++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java
@@ -274,6 +274,13 @@ public class GMFMapSwitch {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case GMFMapPackage.DOMAIN_ATTRIBUTE_TARGET: {
+ DomainAttributeTarget domainAttributeTarget = (DomainAttributeTarget)theEObject;
+ Object result = caseDomainAttributeTarget(domainAttributeTarget);
+ if (result == null) result = caseAuditable(domainAttributeTarget);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
case GMFMapPackage.DIAGRAM_ELEMENT_TARGET: {
DiagramElementTarget diagramElementTarget = (DiagramElementTarget)theEObject;
Object result = caseDiagramElementTarget(diagramElementTarget);
@@ -687,6 +694,21 @@ public class GMFMapSwitch {
}
/**
+ * Returns the result of interpretting the object as an instance of '<em>Domain Attribute Target</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Domain Attribute Target</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseDomainAttributeTarget(DomainAttributeTarget object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpretting the object as an instance of '<em>Diagram Element Target</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;

Back to the top