aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemy Suen2011-07-18 09:25:04 (EDT)
committerPaul Webster2011-08-25 10:21:54 (EDT)
commitba75f040b875d6ecf2ac148ee01a68008a622832 (patch)
treecc5a582f7042befb802c670b3c8a18723e38491e
parent156108a4fe73670b47376201e74a973cc231a39b (diff)
downloadeclipse.platform.ui-ba75f040b875d6ecf2ac148ee01a68008a622832.zip
eclipse.platform.ui-ba75f040b875d6ecf2ac148ee01a68008a622832.tar.gz
eclipse.platform.ui-ba75f040b875d6ecf2ac148ee01a68008a622832.tar.bz2
Bug 345094 [Compatibility] ShowViewMenu contribution item doesn't show
all entries Due to an optimization in the 'Show View' contribution item and the system of updating menu managers, the items were not getting shown as the item did not think that the items had to be regenerated. By removing the optimization the items will get regenerated properly.
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java14
1 files changed, 1 insertions, 13 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
index c3ae723..83145aa 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* 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
@@ -93,12 +93,9 @@ public class ShowViewMenu extends ContributionItem {
// Maps pages to a list of opened views
private Map openedViews = new HashMap();
- protected boolean dirty = true;
-
private IMenuListener menuListener = new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
manager.markDirty();
- dirty = true;
}
};
private boolean makeFast;
@@ -166,10 +163,6 @@ public class ShowViewMenu extends ContributionItem {
}
- public boolean isDirty() {
- return dirty;
- }
-
/**
* Overridden to always return true and force dynamic menu building.
*/
@@ -323,10 +316,6 @@ public class ShowViewMenu extends ContributionItem {
((MenuManager) getParent()).addMenuListener(menuListener);
}
- if (!dirty) {
- return;
- }
-
MenuManager manager = new MenuManager();
fillMenu(manager);
IContributionItem items[] = manager.getItems();
@@ -339,7 +328,6 @@ public class ShowViewMenu extends ContributionItem {
items[i].fill(menu, index++);
}
}
- dirty = false;
}
// for dynamic UI