diff options
author | Remy Suen | 2012-02-24 15:57:04 +0000 |
---|---|---|
committer | Remy Suen | 2012-02-24 15:57:04 +0000 |
commit | cb8c53c08054252a9e94b819fdd168a681f7e53f (patch) | |
tree | fb12338114b6483932344bad1b4ceba732aade85 | |
parent | 4a024ea740ec252b18c60c45b99d392ca0a6a180 (diff) | |
download | eclipse.platform.ui-cb8c53c08054252a9e94b819fdd168a681f7e53f.tar.gz eclipse.platform.ui-cb8c53c08054252a9e94b819fdd168a681f7e53f.tar.xz eclipse.platform.ui-cb8c53c08054252a9e94b819fdd168a681f7e53f.zip |
Bug 355061 [Commands] [Compatibility] Targeted popup menu contribution
appears in 'File > New' menu
Move the new code to the bottom so that the other conditional
statements are evaluated first to ensure no regressions have
been accidentally introduced.
-rw-r--r-- | bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java index dede19fc253..b1a86dbe933 100644 --- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java +++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java @@ -177,10 +177,7 @@ public final class ContributionsAnalyzer { static boolean isFiltered(MMenu menuModel, MMenuContribution menuContribution, boolean includePopups) { - if (!includePopups) { - // not including popups, so filter out popup menu contributions - return menuContribution.getTags().contains(ContributionsAnalyzer.MC_POPUP); - } else if (menuModel.getTags().contains(ContributionsAnalyzer.MC_POPUP)) { + if (includePopups || menuModel.getTags().contains(ContributionsAnalyzer.MC_POPUP)) { return !menuContribution.getTags().contains(ContributionsAnalyzer.MC_POPUP) && menuContribution.getTags().contains(ContributionsAnalyzer.MC_MENU); } @@ -188,6 +185,11 @@ public final class ContributionsAnalyzer { return !menuContribution.getTags().contains(ContributionsAnalyzer.MC_MENU) && menuContribution.getTags().contains(ContributionsAnalyzer.MC_POPUP); } + if (!includePopups) { + // not including popups, so filter out popup menu contributions if the menu is a regular + // menu + return menuContribution.getTags().contains(ContributionsAnalyzer.MC_POPUP); + } return false; } |