Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2012-04-03 08:05:59 +0000
committerMickael Istria2012-04-03 08:05:59 +0000
commit683e54cb8739a7f7b100558064de60505853efc0 (patch)
tree09444a12db9cdc0c768814522c1c580824f09ee3
parent2ead3ac1a4eb548bde77bb9970d6a7f2f20ae58c (diff)
downloadorg.eclipse.gmf-tooling-683e54cb8739a7f7b100558064de60505853efc0.tar.gz
org.eclipse.gmf-tooling-683e54cb8739a7f7b100558064de60505853efc0.tar.xz
org.eclipse.gmf-tooling-683e54cb8739a7f7b100558064de60505853efc0.zip
Revert "Bug 317241"
Will apply on branch first This reverts commit 2ead3ac1a4eb548bde77bb9970d6a7f2f20ae58c.
-rw-r--r--plugins/org.eclipse.gmf.codegen/plugin.xml13
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.nativestubs/gmf/GenPackageUtils.qvto17
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.qvtlib/org/eclipse/gmf/internal/codegen/util/GenPackageUtils.java29
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/MetaModel.qvto7
4 files changed, 3 insertions, 63 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/plugin.xml b/plugins/org.eclipse.gmf.codegen/plugin.xml
index 5ec278413..284f066cf 100644
--- a/plugins/org.eclipse.gmf.codegen/plugin.xml
+++ b/plugins/org.eclipse.gmf.codegen/plugin.xml
@@ -155,18 +155,5 @@
namespace="xpt">
<library class="org.eclipse.gmf.internal.codegen.util.XpandFacadeAccess"/>
</unit>
- <unit
- name="GenPackageUtils"
- namespace="gmf">
- <library
- class="org.eclipse.gmf.internal.codegen.util.GenPackageUtils">
- <metamodel
- nsURI="http://www.eclipse.org/emf/2002/GenModel">
- </metamodel>
- <metamodel
- nsURI="http://www.eclipse.org/emf/2002/Ecore">
- </metamodel>
- </library>
- </unit>
</extension>
</plugin>
diff --git a/plugins/org.eclipse.gmf.codegen/templates.nativestubs/gmf/GenPackageUtils.qvto b/plugins/org.eclipse.gmf.codegen/templates.nativestubs/gmf/GenPackageUtils.qvto
deleted file mode 100644
index 4dfdf3344..000000000
--- a/plugins/org.eclipse.gmf.codegen/templates.nativestubs/gmf/GenPackageUtils.qvto
+++ /dev/null
@@ -1,17 +0,0 @@
-
-modeltype genModel uses "http://www.eclipse.org/emf/2002/GenModel";
-modeltype ecore uses "http://www.eclipse.org/emf/2002/Ecore";
-
-library GenPackageUtils;
-
-helper getGenPackageQualifiedPackageInterfaceName(genPackage : genmodel::GenPackage) : String {
- return null;
-}
-
-helper getGenPackageQualifiedFactoryInterfaceName(genPackage : genmodel::GenPackage) : String {
- return null;
-}
-
-helper getGenPackageQualifiedInterfaceName(genClass : genmodel::GenClass) : String {
- return null;
-}
diff --git a/plugins/org.eclipse.gmf.codegen/templates.qvtlib/org/eclipse/gmf/internal/codegen/util/GenPackageUtils.java b/plugins/org.eclipse.gmf.codegen/templates.qvtlib/org/eclipse/gmf/internal/codegen/util/GenPackageUtils.java
deleted file mode 100644
index 9c06de850..000000000
--- a/plugins/org.eclipse.gmf.codegen/templates.qvtlib/org/eclipse/gmf/internal/codegen/util/GenPackageUtils.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.gmf.internal.codegen.util;
-
-import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
-import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
-import org.eclipse.m2m.qvt.oml.blackbox.java.Operation;
-import org.eclipse.m2m.qvt.oml.blackbox.java.Operation.Kind;
-
-public class GenPackageUtils {
-
- @Operation(contextual = false, kind = Kind.HELPER)
- public static String getGenPackageQualifiedPackageInterfaceName(GenPackage genPackage)
- {
- return genPackage.getQualifiedPackageInterfaceName();
- }
-
- @Operation(contextual = false, kind = Kind.HELPER)
- public String getGenPackageQualifiedFactoryInterfaceName(GenPackage genPackage)
- {
- return genPackage.getQualifiedFactoryInterfaceName();
- }
-
- @Operation(contextual = false, kind = Kind.HELPER)
- public static String getGenPackageQualifiedInterfaceName(GenClass genClass)
- {
- return genClass.getQualifiedInterfaceName();
- }
-
-
-}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/MetaModel.qvto b/plugins/org.eclipse.gmf.codegen/templates/MetaModel.qvto
index 2a522884f..001bde02d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/MetaModel.qvto
+++ b/plugins/org.eclipse.gmf.codegen/templates/MetaModel.qvto
@@ -12,7 +12,6 @@
import xpt.StringOperations;
import xpt.GenModelUtils;
import gmf.CodeGenerationUtils;
-import gmf.GenPackageUtils;
modeltype genmodel uses "http://www.eclipse.org/emf/2002/GenModel";
modeltype ecore uses "http://www.eclipse.org/emf/2002/Ecore";
@@ -31,14 +30,14 @@ library MetaModel;
-- GenPackageImpl#getQualifiedPackageInterfaceName()
--
helper getQualifiedPackageInterfaceName(gp : genmodel::GenPackage) : String {
- return getGenPackageQualifiedPackageInterfaceName(gp)
+ return (if gp.genModel.suppressEMFMetaData then getQualifiedPackageClassName(gp) else getReflectionPackageName(gp) + '.' + getPackageInterfaceName(gp) endif)
}
--
-- GenPackageImpl#getQualifiedFactoryInterfaceName()
--
helper getQualifiedFactoryInterfaceName(gp : genmodel::GenPackage) : String {
- return getGenPackageQualifiedFactoryInterfaceName(gp)
+ return getReflectionPackageName(gp) + '.' + getPrefixedName(gp, 'Factory')
}
--
@@ -67,7 +66,7 @@ helper getItemProviderAdapterFactoryClassName(gp : genmodel::GenPackage) : Strin
-- GenClass#getQualifiedInterfaceName
--
helper getQualifiedInterfaceName(gc : genmodel::GenClass) : String {
- return getGenPackageQualifiedInterfaceName(gc)
+ return (if null <> gc.ecoreClass.instanceClassName then gc.ecoreClass.instanceClassName.xpandReplaceAll('\\$', '\\.') else getInterfacePackageName(gc.genPackage) + '.' + gc.ecoreClass.name endif)
}
--

Back to the top