Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2007-04-17 05:44:05 -0400
committerdstadnik2007-04-17 05:44:05 -0400
commit928c4a8912adee0997fec951e3ff0cb710adfe02 (patch)
treef9a8b42750d678bb5dd31e526a3c8182eda8c2ad
parent7e161eac2a88d854ccd91b3473f90629296d0019 (diff)
downloadorg.eclipse.gmf-tooling-928c4a8912adee0997fec951e3ff0cb710adfe02.tar.gz
org.eclipse.gmf-tooling-928c4a8912adee0997fec951e3ff0cb710adfe02.tar.xz
org.eclipse.gmf-tooling-928c4a8912adee0997fec951e3ff0cb710adfe02.zip
regenerated
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java2
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java4
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java2
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/Messages.java5
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java16
6 files changed, 18 insertions, 19 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java
index 95405f4aa..dcdd02566 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java
@@ -36,19 +36,19 @@ public class AquatoryItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPo
if (req.getContainmentFeature() == null) {
req.setContainmentFeature(TaiPanPackage.eINSTANCE.getAquatory_Ports());
}
- return getMSLWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req));
}
if (TaiPanElementTypes.Ship_2002 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
req.setContainmentFeature(TaiPanPackage.eINSTANCE.getAquatory_Ships());
}
- return getMSLWrapper(new ShipCreateCommand(req));
+ return getGEFWrapper(new ShipCreateCommand(req));
}
if (TaiPanElementTypes.Warship_2003 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
req.setContainmentFeature(TaiPanPackage.eINSTANCE.getAquatory_Ships());
}
- return getMSLWrapper(new WarshipCreateCommand(req));
+ return getGEFWrapper(new WarshipCreateCommand(req));
}
return super.getCreateCommand(req);
}
@@ -58,7 +58,7 @@ public class AquatoryItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPo
*/
protected Command getDuplicateCommand(DuplicateElementsRequest req) {
TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
- return getMSLWrapper(new DuplicateAnythingCommand(editingDomain, req));
+ return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
}
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java
index 526960926..2d0b3329c 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java
@@ -136,7 +136,7 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy {
try {
for (Iterator it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
- if (nextResource.isLoaded()) {
+ if (nextResource.isLoaded() && !getEditingDomain().isReadOnly(nextResource)) {
nextResource.save(TaiPanDiagramEditorUtil.getSaveOptions());
}
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java
index 3a9fa5c8a..d6386a240 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java
@@ -31,13 +31,13 @@ public class ShipLargeCargoItemSemanticEditPolicy extends TaiPanBaseItemSemantic
if (req.getContainmentFeature() == null) {
req.setContainmentFeature(TaiPanPackage.eINSTANCE.getShip_Cargo());
}
- return getMSLWrapper(new LargeItemCreateCommand(req));
+ return getGEFWrapper(new LargeItemCreateCommand(req));
}
if (TaiPanElementTypes.EmptyBox_3003 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
req.setContainmentFeature(TaiPanPackage.eINSTANCE.getShip_Cargo());
}
- return getMSLWrapper(new EmptyBoxCreateCommand(req));
+ return getGEFWrapper(new EmptyBoxCreateCommand(req));
}
return super.getCreateCommand(req);
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java
index 427ee1287..043f5a8af 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java
@@ -30,7 +30,7 @@ public class ShipSmallCargoItemSemanticEditPolicy extends TaiPanBaseItemSemantic
if (req.getContainmentFeature() == null) {
req.setContainmentFeature(TaiPanPackage.eINSTANCE.getShip_Cargo());
}
- return getMSLWrapper(new SmallItemsCreateCommand(req));
+ return getGEFWrapper(new SmallItemsCreateCommand(req));
}
return super.getCreateCommand(req);
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/Messages.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/Messages.java
index d2acd7e13..e9ce1c1f9 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/Messages.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/Messages.java
@@ -49,11 +49,6 @@ public class Messages extends org.eclipse.osgi.util.NLS {
/**
* @generated
*/
- public static String TaiPanDocumentProvider_UnableToLoadResourceError;
-
- /**
- * @generated
- */
public static String TaiPanDocumentProvider_NoDiagramInResourceError;
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java
index 8ba9591b3..51e2a2981 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java
@@ -202,9 +202,6 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
throw e;
}
}
- if (resource == null) {
- throw new RuntimeException(Messages.TaiPanDocumentProvider_UnableToLoadResourceError);
- }
if (uri.fragment() != null) {
EObject rootElement = resource.getEObject(uri.fragment());
if (rootElement instanceof Diagram) {
@@ -517,7 +514,7 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
for (Iterator it = resources.iterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
monitor.setTaskName(NLS.bind(Messages.TaiPanDocumentProvider_SaveNextResourceTask, nextResource.getURI()));
- if (nextResource.isLoaded()) {
+ if (nextResource.isLoaded() && !info.getEditingDomain().isReadOnly(nextResource)) {
try {
nextResource.save(TaiPanDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
@@ -684,8 +681,15 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
/**
* @generated
*/
+ public TransactionalEditingDomain getEditingDomain() {
+ return myDocument.getEditingDomain();
+ }
+
+ /**
+ * @generated
+ */
public ResourceSet getResourceSet() {
- return myDocument.getEditingDomain().getResourceSet();
+ return getEditingDomain().getResourceSet();
}
/**
@@ -740,7 +744,7 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
* @generated
*/
public final void startResourceListening() {
- mySynchronizer = new WorkspaceSynchronizer(myDocument.getEditingDomain(), new SynchronizerDelegate());
+ mySynchronizer = new WorkspaceSynchronizer(getEditingDomain(), new SynchronizerDelegate());
}
public boolean isUpdateCache() {

Back to the top