Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-03-12 10:57:12 +0000
committerCamille Letavernier2014-03-12 10:57:12 +0000
commit4b90b682eae29e9913b96a4c14dedd84acc8e7db (patch)
treebf9c730e14f138468e62df177aaa8f70c6726444 /plugins/infra
parent6be9e558ea2d8effef99a2b064d76214c053729d (diff)
downloadorg.eclipse.papyrus-4b90b682eae29e9913b96a4c14dedd84acc8e7db.tar.gz
org.eclipse.papyrus-4b90b682eae29e9913b96a4c14dedd84acc8e7db.tar.xz
org.eclipse.papyrus-4b90b682eae29e9913b96a4c14dedd84acc8e7db.zip
421411: [Diagram] Navigating a hyperlink marks the model as dirty.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=421411
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java15
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkSpecificObject.java8
2 files changed, 7 insertions, 16 deletions
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java
index cb88606aa09..be3c5d95886 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2011 CEA LIST.
*
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.editorsfactory.IPageIconsRegistry;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
import org.eclipse.papyrus.infra.hyperlink.Activator;
@@ -82,18 +81,10 @@ public class HyperLinkEditor extends HyperLinkObject {
/**
* {@inheritDoc}
*
- * This HyperLink needs an executable EMF command when the page is not yet opened
- * Otherwise, openLink() can be called directly
+ * This HyperLink never needs a command, because the IPageManager already supports transactions
*/
@Override
public boolean needsOpenCommand() {
- EObject context = EMFHelper.getEObject(getObject());
- try {
- ServicesRegistry registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(context);
- final IPageManager pageManager = registry.getService(IPageManager.class);
- return !pageManager.isOpen(context);
- } catch (ServiceException ex) {
- return false;
- }
+ return false;
}
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkSpecificObject.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkSpecificObject.java
index 008c5adf60c..69b04a8a2ff 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkSpecificObject.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkSpecificObject.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
*
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,9 +23,9 @@ import org.eclipse.papyrus.infra.services.openelement.service.OpenElementService
/**
* References a specific object in a View (Diagram/Table/...)
- *
+ *
* @author Camille
- *
+ *
*/
public class HyperLinkSpecificObject extends HyperLinkObject {
@@ -51,7 +51,7 @@ public class HyperLinkSpecificObject extends HyperLinkObject {
@Override
public boolean needsOpenCommand() {
- return targetElement != null;
+ return false;
}
@Override

Back to the top