Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2017-05-01 14:08:29 +0000
committerptessier2017-05-08 14:57:38 +0000
commitf8f70118294d0e7eb423ca559afbf290fe3e598f (patch)
tree69c4477d9ae27f0cf660781df9d5702fbc9a66c1 /plugins/infra
parent0427aa9a377af28389896d4723e53a75193ee95c (diff)
downloadorg.eclipse.papyrus-f8f70118294d0e7eb423ca559afbf290fe3e598f.tar.gz
org.eclipse.papyrus-f8f70118294d0e7eb423ca559afbf290fe3e598f.tar.xz
org.eclipse.papyrus-f8f70118294d0e7eb423ca559afbf290fe3e598f.zip
Bug 515998 - [SequenceDiagram] Fix existed Tests for the Sequence
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/IdentityAnchorHelper.java3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/ResourceUpdateService.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/IdentityAnchorHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/IdentityAnchorHelper.java
index 53effd01357..ad16194ef82 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/IdentityAnchorHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/IdentityAnchorHelper.java
@@ -75,6 +75,9 @@ public class IdentityAnchorHelper {
public static final double getYPercentage(final IdentityAnchor anchor) {
String id = anchor.getId();
id = id.substring(id.indexOf(X_Y_SEPARATOR_AS_STRING) + 1, id.length() - 1);
+ if(id.indexOf(END_ID)!=-1){
+ id = id.substring(0, id.indexOf(END_ID));
+ }
return Double.parseDouble(id);
}
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/ResourceUpdateService.java b/plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/ResourceUpdateService.java
index 8ad0b6cda55..56790662b87 100644
--- a/plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/ResourceUpdateService.java
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/ResourceUpdateService.java
@@ -144,7 +144,7 @@ public class ResourceUpdateService implements IService, IPartListener {
IReloadableEditor.ReloadReason reason = reopen ? IReloadableEditor.ReloadReason.RESOURCES_CHANGED : IReloadableEditor.ReloadReason.RESOURCES_DELETED;
DirtyPolicy dirtyPolicy = DirtyPolicy.getDefault();
- if (!reopen && !editor.isDirty()) {
+ if (!reopen && !editor.isDirty()&& modelSet!=null) {
// Check whether we're deleting one of our own resources. If so, just close
URI principalURI = modelSet.getURIWithoutExtension();
for (Resource next : triggeringResources) {

Back to the top