Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2016-05-26 16:45:13 +0000
committervincent lorenzo2016-05-27 10:51:52 +0000
commit5861a9b5d65ad4f5324be31c0358901e6ee7879b (patch)
tree6f1008fb74660258b38734a50ee7c35461104760 /plugins/uml
parentfa3f72f03d8fa062aaaca87ec7cdd6d38bf7146d (diff)
downloadorg.eclipse.papyrus-5861a9b5d65ad4f5324be31c0358901e6ee7879b.tar.gz
org.eclipse.papyrus-5861a9b5d65ad4f5324be31c0358901e6ee7879b.tar.xz
org.eclipse.papyrus-5861a9b5d65ad4f5324be31c0358901e6ee7879b.zip
Bug 494412: [Toolbar] Exception on startup for ZoomToolbar considered to be of Incorrect type
https://bugs.eclipse.org/bugs/show_bug.cgi?id=494412 - Modified the ZoomToolbar class to extend directly WorkbenchWindowControlContribution - Modified the way the diagramWorkbenchParts are fetched - Removed the lesteners from the correct old part before adding to the newly selected one - Remove ZOOM100 as it is already covered by the basic zoom items - Removed old toolbar implementation - removed changes on the pageChanged method awaiting a better fix Change-Id: I93a7b422f76fa3e9b21cd3a0bee2d3476cfa3d01 Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr> Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins/uml')
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/toolbar/ZoomToolbar.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/toolbar/ZoomToolbar.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/toolbar/ZoomToolbar.java
index 46481457bab..1c9cf189fa5 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/toolbar/ZoomToolbar.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/toolbar/ZoomToolbar.java
@@ -429,7 +429,8 @@ public class ZoomToolbar extends WorkbenchWindowControlContribution implements Z
// we remove the page changed listener
ISashWindowsContainer windowContainer = part.getAdapter(ISashWindowsContainer.class);
- if (windowContainer != null) {
+
+ if (windowContainer != null && !windowContainer.isDisposed()) { //probably never done, because already disposed
windowContainer.removePageChangedListener(getInstance());
}
refreshStatusCombo(part);
@@ -451,7 +452,7 @@ public class ZoomToolbar extends WorkbenchWindowControlContribution implements Z
// we add listener on the window container
ISashWindowsContainer windowContainer = part.getAdapter(ISashWindowsContainer.class);
- if (windowContainer != null) {
+ if (windowContainer != null && !windowContainer.isDisposed()) { //check on dispose is probably unecessary
windowContainer.addPageChangedListener(getInstance());
}
refreshStatusCombo(part);

Back to the top