summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Efftinge2011-08-05 08:38:07 (EDT)
committerEd Merks2011-08-05 08:38:07 (EDT)
commit4170dd836c05811675844da7f3d978620048ed19 (patch)
tree30d4d9ee00195c0651982ca76bb4ac14d6b172f8
parent361522ced69a552df117f498bd20ca0e0cea7c34 (diff)
downloadorg.eclipse.emf-4170dd836c05811675844da7f3d978620048ed19.zip
org.eclipse.emf-4170dd836c05811675844da7f3d978620048ed19.tar.gz
org.eclipse.emf-4170dd836c05811675844da7f3d978620048ed19.tar.bz2
some minor changes to the generator
-rw-r--r--org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreImportedNamespaceAwareScopeProvider.java8
-rw-r--r--org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.xtend4
-rw-r--r--org.eclipse.emf.ecore.xcore/xtend-gen/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.java11
3 files changed, 21 insertions, 2 deletions
diff --git a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreImportedNamespaceAwareScopeProvider.java b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreImportedNamespaceAwareScopeProvider.java
index cb60654..3d427b5 100644
--- a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreImportedNamespaceAwareScopeProvider.java
+++ b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreImportedNamespaceAwareScopeProvider.java
@@ -64,14 +64,18 @@ public class XcoreImportedNamespaceAwareScopeProvider extends ImportedNamespaceA
protected static final EDataType [] IMPLICIT_ALIASES =
new EDataType[]
{
- EcorePackage.Literals.ESTRING
+ EcorePackage.Literals.ESTRING,
+ EcorePackage.Literals.EINT,
+ EcorePackage.Literals.EINTEGER_OBJECT,
+ EcorePackage.Literals.EBOOLEAN,
+ EcorePackage.Literals.EBOOLEAN_OBJECT,
};
@Override
protected IScope getGlobalScope(Resource context, EReference reference, Predicate<IEObjectDescription> filter)
{
final IScope globalScope = super.getGlobalScope(context, reference, filter);
- if (false && reference == XcorePackage.Literals.XGENERIC_TYPE__TYPE)
+ if (reference == XcorePackage.Literals.XGENERIC_TYPE__TYPE)
{
return
new AbstractScope(globalScope, false)
diff --git a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.xtend b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.xtend
index 43c5bd9..f019c25 100644
--- a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.xtend
+++ b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.xtend
@@ -26,6 +26,10 @@ class XcoreGenmodelBuilder {
genModel.initialize(Collections::singleton(ePackage));
pack.eResource.getContents().add(1, genModel);
genModel.initialize();
+ genModel.updateClasspath = false
+ // set to src-gen
+ if (!genModel.modelDirectory.endsWith('-gen'))
+ genModel.modelDirectory = genModel.modelDirectory + "-gen"
for (genElement : genModel.allContentsIterable)
{
switch genElement {
diff --git a/org.eclipse.emf.ecore.xcore/xtend-gen/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.java b/org.eclipse.emf.ecore.xcore/xtend-gen/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.java
index a2eb0a5..e62d6ec 100644
--- a/org.eclipse.emf.ecore.xcore/xtend-gen/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.java
+++ b/org.eclipse.emf.ecore.xcore/xtend-gen/org/eclipse/emf/ecore/xcore/util/XcoreGenmodelBuilder.java
@@ -31,6 +31,8 @@ import org.eclipse.emf.ecore.xcore.mappings.XFeatureMapping;
import org.eclipse.emf.ecore.xcore.mappings.XOperationMapping;
import org.eclipse.emf.ecore.xcore.mappings.XPackageMapping;
import org.eclipse.emf.ecore.xcore.mappings.XcoreMapper;
+import org.eclipse.xtext.xbase.lib.BooleanExtensions;
+import org.eclipse.xtext.xbase.lib.StringExtensions;
import org.eclipse.xtext.xtend2.lib.EObjectExtensions;
@SuppressWarnings("all")
@@ -52,6 +54,15 @@ public class XcoreGenmodelBuilder {
EList<EObject> _contents = _eResource.getContents();
_contents.add(1, genModel);
genModel.initialize();
+ genModel.setUpdateClasspath(false);
+ String _modelDirectory = genModel.getModelDirectory();
+ boolean _endsWith = _modelDirectory.endsWith("-gen");
+ boolean _operator_not = BooleanExtensions.operator_not(_endsWith);
+ if (_operator_not) {
+ String _modelDirectory_1 = genModel.getModelDirectory();
+ String _operator_plus = StringExtensions.operator_plus(_modelDirectory_1, "-gen");
+ genModel.setModelDirectory(_operator_plus);
+ }
Iterable<EObject> _allContentsIterable = EObjectExtensions.allContentsIterable(genModel);
for (EObject genElement : _allContentsIterable) {
final EObject genElement_1 = genElement;