summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2014-04-23 09:23:30 (EDT)
committerCamille Letavernier2014-04-23 10:58:45 (EDT)
commit403f4eca218593c7ddcc3c0992861115b8df1650 (patch)
tree4f0bc429213291b56680313157b0bc2d4168324e
parent22b19371a36c899f165d536a668f1eff50c717ae (diff)
downloadorg.eclipse.papyrus-403f4eca218593c7ddcc3c0992861115b8df1650.zip
org.eclipse.papyrus-403f4eca218593c7ddcc3c0992861115b8df1650.tar.gz
org.eclipse.papyrus-403f4eca218593c7ddcc3c0992861115b8df1650.tar.bz2
Bug 433274 - [Model explorer] Duplicate diagram linkrefs/changes/15/25415/2
Use == instead of equals to validate the owner of a diagram in the model explorer Change-Id: Ie7839c27bcd3cb7a869d5bf9947ceaa17dd71ec5 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java
index 223a6b5..05dbc03 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java
@@ -36,7 +36,9 @@ public class IsDiagramContainer extends AbstractEditorContainerQuery implements
while(roots.hasNext()) {
EObject root = roots.next();
if(root instanceof Diagram) {
- return DiagramUtils.getOwner((Diagram)root) == source;
+ if (DiagramUtils.getOwner((Diagram)root) == source){
+ return true;
+ }
}
}
}