Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 223113 Details for
Bug 390921
InjectionException when using Context-Menu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix up the context for a popup contained in a popup
bug390921.patch (text/plain), 2.21 KB, created by
Paul Webster
on 2012-11-02 10:34:10 EDT
(
hide
)
Description:
Fix up the context for a popup contained in a popup
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2012-11-02 10:34:10 EDT
Size:
2.21 KB
patch
obsolete
>From a5fba9b0a71443ead6a97df20ee575af807357b9 Mon Sep 17 00:00:00 2001 >From: Paul Webster >Date: Fri, 02 Nov 2012 10:26:17 -0400 >Subject: Bug 390921 - InjectionException when using Context-Menu > >Allow for setting up the proper context if there is a second registered >context menu >--- >diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java >index 84e1550..1451741 100644 >--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java >+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java >@@ -847,6 +847,17 @@ public class MenuManagerRenderer extends SWTPartRenderer { > } > } else { > modelChildren.add(childModel); >+ if (childModel instanceof MPopupMenu) { >+ if (((MPopupMenu) childModel).getContext() == null) { >+ IEclipseContext lclContext = getContext(menuModel); >+ if (lclContext != null) { >+ ((MPopupMenu) childModel) >+ .setContext(lclContext >+ .createChild(childModel >+ .getElementId())); >+ } >+ } >+ } > } > } > } else if (item.isSeparator() || item.isGroupMarker()) { >diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PopupMenuExtender.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PopupMenuExtender.java >index 97d2a98..f4c6ec6 100644 >--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PopupMenuExtender.java >+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PopupMenuExtender.java >@@ -157,7 +157,7 @@ public class PopupMenuExtender implements IMenuListener2, > menuModel = null; > for (MMenu item : modelPart.getMenus()) { > if (id.equals(item.getElementId()) && item instanceof MPopupMenu >- && item.getTags().contains("popup")) { //$NON-NLS-1$ >+ && item.getTags().contains(ContributionsAnalyzer.MC_POPUP)) { > menuModel = (MPopupMenu) item; > break; > } >-- >cgit v0.8.3.4-115-g1759
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 390921
: 223113