Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2008-07-10 08:29:44 -0400
committerashatalin2008-07-10 08:29:44 -0400
commitdf79a2ede42b33cd125ef4ebec25f643403eea9c (patch)
treeb751df12e70378a65a17bd37ac1ce0c373f4f36b /plugins
parentca801e32796f727aaba7bcb59cc7ed62631102d2 (diff)
downloadorg.eclipse.gmf-tooling-df79a2ede42b33cd125ef4ebec25f643403eea9c.tar.gz
org.eclipse.gmf-tooling-df79a2ede42b33cd125ef4ebec25f643403eea9c.tar.xz
org.eclipse.gmf-tooling-df79a2ede42b33cd125ef4ebec25f643403eea9c.zip
[217307] - "Add extension model" action: impossible use for additing nondeployed models
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.bridge.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/GenModelDetector.java3
-rw-r--r--plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java3
-rw-r--r--plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/GMFMapGuideModelWizard.java3
-rw-r--r--plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/pages/WizardInput.java3
5 files changed, 9 insertions, 5 deletions
diff --git a/plugins/org.eclipse.gmf.bridge.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmf.bridge.ui/META-INF/MANIFEST.MF
index bb4aae8e5..acba846c6 100644
--- a/plugins/org.eclipse.gmf.bridge.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.gmf.bridge.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.gmf.bridge.ui;singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.200.qualifier
Bundle-Activator: org.eclipse.gmf.internal.bridge.ui.Plugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/GenModelDetector.java b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/GenModelDetector.java
index c18adc840..57d5e271f 100644
--- a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/GenModelDetector.java
+++ b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/GenModelDetector.java
@@ -27,6 +27,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.EPackage;
+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;
@@ -131,7 +132,7 @@ public class GenModelDetector {
GenModel model = gma.create();
IPath path = patternResource.getFullPath().removeFileExtension().addFileExtension("genmodel"); //$NON-NLS-1$
URI uri = URI.createPlatformResourceURI(path.toString(), true);
- Resource res = new ResourceSetImpl().createResource(uri);
+ Resource res = new ResourceSetImpl().createResource(uri, ContentHandler.UNSPECIFIED_CONTENT_TYPE);
res.getContents().add(model);
try {
res.save(null);
diff --git a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java
index 0ba27f545..98c0e5b02 100644
--- a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java
+++ b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java
@@ -33,6 +33,7 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
+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.util.EcoreUtil;
@@ -390,7 +391,7 @@ public class TransformToGenModelOperation {
}
gmfgenRes.save(saveOptions);
} catch (RuntimeException ex) {
- Resource dgmmRes = getResourceSet().createResource(getGenURI());
+ Resource dgmmRes = getResourceSet().createResource(getGenURI(), ContentHandler.UNSPECIFIED_CONTENT_TYPE);
dgmmRes.getContents().add(genBurdern);
dgmmRes.save(getSaveOptions());
}
diff --git a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/GMFMapGuideModelWizard.java b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/GMFMapGuideModelWizard.java
index c3eee03c7..697a42e0e 100644
--- a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/GMFMapGuideModelWizard.java
+++ b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/GMFMapGuideModelWizard.java
@@ -25,6 +25,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.EPackage;
+import org.eclipse.emf.ecore.resource.ContentHandler;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.gmf.gmfgraph.Canvas;
import org.eclipse.gmf.internal.bridge.ui.Plugin;
@@ -160,7 +161,7 @@ public class GMFMapGuideModelWizard extends Wizard implements INewWizard {
URI toolDefURI = URI.createPlatformResourceURI(toolDefFile.toString(), true);
myRegistry = GMFToolFactory.eINSTANCE.createToolRegistry();
myRegistry.setPalette(GMFToolFactory.eINSTANCE.createPalette());
- myHolder.getResourceSet().createResource(toolDefURI).getContents().add(myRegistry);
+ myHolder.getResourceSet().createResource(toolDefURI, ContentHandler.UNSPECIFIED_CONTENT_TYPE).getContents().add(myRegistry);
return toolDefURI;
}
diff --git a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/pages/WizardInput.java b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/pages/WizardInput.java
index 3e44ac0bd..0908fc227 100644
--- a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/pages/WizardInput.java
+++ b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/wizards/pages/WizardInput.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.ContentHandler;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
@@ -101,7 +102,7 @@ public abstract class WizardInput {
if (mapInstance == null) {
mapInstance = GMFMapFactory.eINSTANCE.createMapping();
URI res = URI.createPlatformResourceURI(getMappingFile().getFullPath().toString(), true);
- getResourceSet().createResource(res).getContents().add(mapInstance);
+ getResourceSet().createResource(res, ContentHandler.UNSPECIFIED_CONTENT_TYPE).getContents().add(mapInstance);
CanvasMapping cm = GMFMapFactory.eINSTANCE.createCanvasMapping();
mapInstance.setDiagram(cm);
}

Back to the top