[381967] fixed enumerations support
diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.compiler/src/org/eclipse/mylyn/docs/intent/client/compiler/generator/modelgeneration/NativeValueForStructuralFeatureGenerator.java b/plugins/org.eclipse.mylyn.docs.intent.client.compiler/src/org/eclipse/mylyn/docs/intent/client/compiler/generator/modelgeneration/NativeValueForStructuralFeatureGenerator.java
index c983894..17fdbc9 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.client.compiler/src/org/eclipse/mylyn/docs/intent/client/compiler/generator/modelgeneration/NativeValueForStructuralFeatureGenerator.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.client.compiler/src/org/eclipse/mylyn/docs/intent/client/compiler/generator/modelgeneration/NativeValueForStructuralFeatureGenerator.java
@@ -112,8 +112,8 @@
 			if (type instanceof EEnum) {
 				EEnum typeAsEnum = (EEnum)type;
 				// Then we call the specific methods of this EEnum to get the correct literal.
-				generatedValue = typeAsEnum
-						.getEEnumLiteralByLiteral(removeQuotes(valueInstruction.getValue()));
+				generatedValue = typeAsEnum.getEEnumLiteralByLiteral(
+						removeQuotes(valueInstruction.getValue())).getInstance();
 			} else if (type instanceof EDataType) {
 				EDataType typeAsDataType = (EDataType)type;
 				if (typeAsDataType.getInstanceClass().equals(Integer.class)) {
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/META-INF/MANIFEST.MF b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/META-INF/MANIFEST.MF
index c8e7530..e84e6cd 100644
--- a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/META-INF/MANIFEST.MF
@@ -12,4 +12,5 @@
  org.eclipse.mylyn.docs.intent.parser;bundle-version="0.7.0",
  org.eclipse.mylyn.docs.intent.core;bundle-version="0.7.0",
  org.eclipse.emf.compare.diff;bundle-version="1.3.1",
- org.eclipse.emf.compare.match;bundle-version="1.3.1"
+ org.eclipse.emf.compare.match;bundle-version="1.3.1",
+ org.eclipse.emf.codegen.ecore;bundle-version="2.8.0"
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/dataTests/resources/enumerations.intent b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/dataTests/resources/enumerations.intent
new file mode 100644
index 0000000..056f7b2
--- /dev/null
+++ b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/dataTests/resources/enumerations.intent
@@ -0,0 +1,40 @@
+@M
+Resource TestGenModel {
+	URI = "platform:/resource/enumerations/TestGenModel.genmodel";
+	content += testGenModel;
+}
+new GenModel testGenModel {
+	featureDelegation = "Virtual";
+}
+Resource TestMetamodel {
+	URI = "platform:/resource/enumerations/TestMetamodel.ecore";
+	content += testMetamodel;
+}
+new EPackage testMetamodel {
+	nsURI = "testMetamodel";
+	nsPrefix = "testMetamodel";
+	eClassifiers += new EClass TestType {
+		eStructuralFeatures += new EAttribute {
+			name = "visibility";
+			eType = TestTypeVisibility;
+			changeable = "true";
+			ordered = "true";
+		};
+	};
+	eClassifiers += new EEnum TestTypeVisibility {
+		eLiterals += new EEnumLiteral public {};
+		eLiterals += new EEnumLiteral private {};
+	};
+}
+Resource TestModel {
+	URI = "platform:/resource/enumerations/TestModel.xmi";
+	content += testTypeInstanceByReference;
+	content += testTypeInstance;
+}
+new TestType testTypeInstanceByReference {
+	visibility = private;
+}
+new TestType testTypeInstance {
+	visibility = "public";
+}
+M@
\ No newline at end of file
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestGenModel.xmi b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestGenModel.xmi
new file mode 100644
index 0000000..a94dc95
--- /dev/null
+++ b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestGenModel.xmi
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ASCII"?>

+<ecore:EObject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"/>

diff --git a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestMetamodel.xmi b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestMetamodel.xmi
new file mode 100644
index 0000000..3238b47
--- /dev/null
+++ b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestMetamodel.xmi
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>

+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="testMetamodel" nsURI="testMetamodel" nsPrefix="testMetamodel">

+  <eClassifiers xsi:type="ecore:EClass" name="TestType">

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="visibility" eType="//TestTypeVisibility"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EEnum" name="TestTypeVisibility">

+    <eLiterals name="public"/>

+    <eLiterals name="private"/>

+  </eClassifiers>

+</ecore:EPackage>

diff --git a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestModel.xmi b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestModel.xmi
new file mode 100644
index 0000000..d5d2077
--- /dev/null
+++ b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/expectedResults/resources/enumerations.intent.TestModel.xmi
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ASCII"?>

+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:testMetamodel="testMetamodel">

+  <testMetamodel:TestType visibility="private"/>

+  <testMetamodel:TestType/>

+</xmi:XMI>

diff --git a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/src/org/eclipse/mylyn/docs/intent/client/compiler/test/unit/GeneratedResourcesTest.java b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/src/org/eclipse/mylyn/docs/intent/client/compiler/test/unit/GeneratedResourcesTest.java
index 91353ff..c31d55d 100644
--- a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/src/org/eclipse/mylyn/docs/intent/client/compiler/test/unit/GeneratedResourcesTest.java
+++ b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/src/org/eclipse/mylyn/docs/intent/client/compiler/test/unit/GeneratedResourcesTest.java
@@ -52,6 +52,11 @@
 	}

 

 	@Test

+	public void testEnumerations() {

+		compile("dataTests/resources/enumerations.intent");

+	}

+

+	@Test

 	@Ignore

 	public void testReference() {

 		compile("dataTests/resources/reference.intent");

diff --git a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/src/org/eclipse/mylyn/docs/intent/client/compiler/test/util/AbstractIntentCompilerTest.java b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/src/org/eclipse/mylyn/docs/intent/client/compiler/test/util/AbstractIntentCompilerTest.java
index 5523d05..09ff0d2 100644
--- a/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/src/org/eclipse/mylyn/docs/intent/client/compiler/test/util/AbstractIntentCompilerTest.java
+++ b/tests/org.eclipse.mylyn.docs.intent.client.compiler.test/src/org/eclipse/mylyn/docs/intent/client/compiler/test/util/AbstractIntentCompilerTest.java
@@ -23,6 +23,7 @@
 import org.eclipse.core.runtime.ILogListener;

 import org.eclipse.core.runtime.IStatus;

 import org.eclipse.core.runtime.NullProgressMonitor;

+import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;

 import org.eclipse.emf.common.util.BasicMonitor;

 import org.eclipse.emf.common.util.URI;

 import org.eclipse.emf.compare.diff.metamodel.DiffModel;

@@ -83,6 +84,7 @@
 		resourceSet.getPackageRegistry().put(ModelingUnitPackage.eNS_PREFIX, ModelingUnitPackage.eINSTANCE);

 		resourceSet.getPackageRegistry().put(GenericUnitPackage.eNS_PREFIX, GenericUnitPackage.eINSTANCE);

 		resourceSet.getPackageRegistry().put(IntentDocumentPackage.eNS_PREFIX, GenericUnitPackage.eINSTANCE);

+		resourceSet.getPackageRegistry().put(GenModelPackage.eNS_PREFIX, GenModelPackage.eINSTANCE);

 	}

 

 	/**