Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2008-07-10 12:29:50 +0000
committerashatalin2008-07-10 12:29:50 +0000
commit5fb1408ca755ad6ebec27465592ec7e50aa2b696 (patch)
tree0d5908a65fcb9913824604f9e1670bee4e403d32 /plugins
parentdc8a063d026ef37810b9635605dd16007cf8af65 (diff)
downloadorg.eclipse.gmf-tooling-5fb1408ca755ad6ebec27465592ec7e50aa2b696.tar.gz
org.eclipse.gmf-tooling-5fb1408ca755ad6ebec27465592ec7e50aa2b696.tar.xz
org.eclipse.gmf-tooling-5fb1408ca755ad6ebec27465592ec7e50aa2b696.zip
[217307] - "Add extension model" action: impossible use for additing nondeployed models
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.codegen.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/CreateSpecificDiagramRunTimeModelAction.java5
-rw-r--r--plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/GMFGenExtensionModelWizard.java3
3 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.gmf.codegen.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmf.codegen.ui/META-INF/MANIFEST.MF
index 4d0f4352d..d663192cf 100644
--- a/plugins/org.eclipse.gmf.codegen.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.gmf.codegen.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.gmf.codegen.ui; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
Bundle-Activator: org.eclipse.gmf.internal.codegen.CodeGenUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.3.0,4.0.0)",
diff --git a/plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/CreateSpecificDiagramRunTimeModelAction.java b/plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/CreateSpecificDiagramRunTimeModelAction.java
index d640a4004..70d6c1588 100644
--- a/plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/CreateSpecificDiagramRunTimeModelAction.java
+++ b/plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/CreateSpecificDiagramRunTimeModelAction.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.ContentHandler;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.gmf.internal.bridge.genmodel.DiagramRunTimeModelTransformer;
@@ -49,9 +50,9 @@ public class CreateSpecificDiagramRunTimeModelAction implements IObjectActionDel
DiagramRunTimeModelTransformer t = new DiagramRunTimeModelTransformer(packName, getMapModelURI().appendSegment("diagramrt").toString());
t.transform(m);
EPackage drtModel = t.getResult();
- Resource drtEcoreModelRes = resSet.createResource(getDestEcoreURI());
+ Resource drtEcoreModelRes = resSet.createResource(getDestEcoreURI(), ContentHandler.UNSPECIFIED_CONTENT_TYPE);
URI genModelURI = getDestGenModelURI();
- Resource drtGenModelRes = Resource.Factory.Registry.INSTANCE.getFactory(genModelURI).createResource(genModelURI);
+ Resource drtGenModelRes = Resource.Factory.Registry.INSTANCE.getFactory(genModelURI, ContentHandler.UNSPECIFIED_CONTENT_TYPE).createResource(genModelURI);
resSet.getResources().add(drtGenModelRes);
// Resource drtGenModelRes =
// resSet.createResource(getDestGenModelURI());
diff --git a/plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/GMFGenExtensionModelWizard.java b/plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/GMFGenExtensionModelWizard.java
index b3ba00a64..ac5779862 100644
--- a/plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/GMFGenExtensionModelWizard.java
+++ b/plugins/org.eclipse.gmf.codegen.ui/src/org/eclipse/gmf/internal/codegen/popup/actions/GMFGenExtensionModelWizard.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ContentHandler;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
@@ -164,7 +165,7 @@ public class GMFGenExtensionModelWizard extends Wizard implements IWorkbenchWiza
}
protected void addExtensionMetamodelRootToGmfgen(URI nextGmfgenURI, EObject instantiated) throws IOException {
- Resource gmfgenModel = getResourceSet().createResource(nextGmfgenURI);
+ Resource gmfgenModel = getResourceSet().createResource(nextGmfgenURI, ContentHandler.UNSPECIFIED_CONTENT_TYPE);
gmfgenModel.load(getResourceSet().getLoadOptions());
gmfgenModel.getContents().add(instantiated);
gmfgenModel.save(null);

Back to the top