Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2008-07-10 12:29:41 +0000
committerashatalin2008-07-10 12:29:41 +0000
commitb7f4f5f8094ff5131d916190e2da2347c95a0cd7 (patch)
tree552dff1a8f61b911b00793f937a86ab482db1045 /plugins
parent462bb8b77f3005ebb8a77f7b05e4f6ab7adc6b33 (diff)
downloadorg.eclipse.gmf-tooling-b7f4f5f8094ff5131d916190e2da2347c95a0cd7.tar.gz
org.eclipse.gmf-tooling-b7f4f5f8094ff5131d916190e2da2347c95a0cd7.tar.xz
org.eclipse.gmf-tooling-b7f4f5f8094ff5131d916190e2da2347c95a0cd7.zip
[217307] - "Add extension model" action: impossible use for additing nondeployed models
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterOutcome.java7
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterSection.java3
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterOutcome.java b/plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterOutcome.java
index 6b63c051a..5264e4f1c 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterOutcome.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterOutcome.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ContentHandler;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.gmf.gmfgraph.Canvas;
@@ -95,18 +96,18 @@ class ConverterOutcome {
// the only difference with galleries in this case is where to put them - either
// separate resource or not.
Canvas mirror = ((CanvasProcessor) getProcessor()).getOutcome();
- canvasResource = rs.createResource(mirroredCanvasURI);
+ canvasResource = rs.createResource(mirroredCanvasURI, ContentHandler.UNSPECIFIED_CONTENT_TYPE);
canvasResource.getContents().add(mirror);
if (myOptions.needMirroredGalleries && myOptions.separateMirrorFiles) {
// sic! - respect separate mirror files only if explicitly asked to mirror galleries
// because separateMirrorFiles could be true when value for galleryOutputPath not set
- galleryResource = rs.createResource(galleryResourceURI);
+ galleryResource = rs.createResource(galleryResourceURI, ContentHandler.UNSPECIFIED_CONTENT_TYPE);
// XXX make sure we support containments in different resources
galleryResource.getContents().addAll(mirror.getFigures());
}
} else if (myOptions.needMirroredGalleries) {
- galleryResource = rs.createResource(galleryResourceURI);
+ galleryResource = rs.createResource(galleryResourceURI, ContentHandler.UNSPECIFIED_CONTENT_TYPE);
GalleryMirrorProcessor processor = (GalleryMirrorProcessor) getProcessor();
galleryResource.getContents().add(processor.convertFigureGallery());
}
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterSection.java b/plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterSection.java
index e1688ecc6..f2f1a9787 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterSection.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen.ui/src/org/eclipse/gmf/internal/graphdef/codegen/ui/ConverterSection.java
@@ -32,6 +32,7 @@ import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
+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.gmfgraph.DiagramElement;
@@ -349,7 +350,7 @@ public class ConverterSection extends OptionTemplateSection {
}
private static Resource loadResource(String path){
- Resource resource = new ResourceSetImpl().createResource(URI.createFileURI(path));
+ Resource resource = new ResourceSetImpl().createResource(URI.createFileURI(path), ContentHandler.UNSPECIFIED_CONTENT_TYPE);
try {
resource.load(Collections.EMPTY_MAP);
return resource;

Back to the top