summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2014-07-25 09:03:48 (EDT)
committerQuentin Le Menez2014-07-25 09:12:47 (EDT)
commitb582f5e9c7c584c96d1121a6a387216040bd0b34 (patch)
treecdd3ed04927273d4b426dc915c3a0d2b5dd2be29
parentca773032c60138a39138d0566a925a4c0796cf10 (diff)
downloadorg.eclipse.papyrus-b582f5e9c7c584c96d1121a6a387216040bd0b34.zip
org.eclipse.papyrus-b582f5e9c7c584c96d1121a6a387216040bd0b34.tar.gz
org.eclipse.papyrus-b582f5e9c7c584c96d1121a6a387216040bd0b34.tar.bz2
439039 - problem with model explorer / table synchronizationrefs/changes/09/30509/2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=439039 - added multi-selection for RevealSemantic - correction of the ServiceUtilsForWorkbenchPage class Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/ServiceUtilsForWorkbenchPage.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/ServiceUtilsForWorkbenchPage.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/ServiceUtilsForWorkbenchPage.java
index 540ebd9..5e7bea7 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/ServiceUtilsForWorkbenchPage.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/ServiceUtilsForWorkbenchPage.java
@@ -31,6 +31,13 @@ public class ServiceUtilsForWorkbenchPage extends AbstractServiceUtils<IWorkbenc
if(registry != null) {
return registry;
}
+ } else // necessary for the link between model explorer and the diagram selection option
+ // WorkbenchPage is not an instance of IAdaptable, but we only need the activePart for the selections
+ if(from.getActivePart() instanceof IAdaptable) {
+ ServicesRegistry registry = (ServicesRegistry)((IAdaptable)from.getActivePart()).getAdapter(ServicesRegistry.class);
+ if(registry != null) {
+ return registry;
+ }
}
throw new ServiceException("Cannot resolve the ServiceRegistry from the IWorkbenchPage. Page: " + from);