Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335976 - CCE when trying to expand the markers' view's 'Group By' submenu
Summary: CCE when trying to expand the markers' view's 'Group By' submenu
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 225780 318325 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-01 10:38 EST by Remy Suen CLA
Modified: 2011-03-14 06:03 EDT (History)
3 users (show)

See Also:


Attachments
Fix (7.88 KB, patch)
2011-02-02 07:03 EST, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-02-01 10:38:28 EST
1. Put the 'Problems' view and 'Console' view into the same stack.
2. Check that the 'Console' view will activate when stdout/stderr is printed to.
3. Run an application that will print to stdout after a few seconds.
4. Activate the 'Problems' view.
5. Ctrl+F10
6. Wait for the 'Console' view to activate. The 'Show' submenu will disappear. The 'Group By' and 'Sort By' submenus are still there but they cannot be expanded.

java.lang.ClassCastException: org.eclipse.ui.internal.console.ConsoleView
at org.eclipse.ui.internal.views.markers.MarkersContribution.getView(MarkersContribution.java:62)
at org.eclipse.ui.internal.views.markers.GroupsContribution.getContributionItems(GroupsContribution.java:48)
at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:95)
at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:70)
at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:125)
at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:737)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:818)
at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:470)
at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465)
at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:491)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:4849)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4536)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1610)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4933)
at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:256)
at org.eclipse.swt.widgets.Display.runPopups(Display.java:4167)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3709)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2697)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2661)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2495)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
Comment 1 Dani Megert CLA 2011-02-02 06:52:53 EST
Let me fix this concrete issue.

Please file a new bug if you think a general fix is needed for all views so that their view menu closes when the view gets deactivated.
Comment 2 Dani Megert CLA 2011-02-02 06:55:42 EST
*** Bug 225780 has been marked as a duplicate of this bug. ***
Comment 3 Dani Megert CLA 2011-02-02 06:56:18 EST
*** Bug 318325 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2011-02-02 07:03:59 EST
Created attachment 188125 [details]
Fix
Comment 5 Dani Megert CLA 2011-02-02 07:04:50 EST
Fixed in HEAD.
Available in builds >= N20110202-2000.
Comment 6 Jesse CLA 2011-03-09 16:15:26 EST
Using build I20110307-2110, the CCE is gone. I'm not sure if the patch was supposed to get rid of the 'Problems' menu entirely when the view gets switched, but it seems the menu is still there after this happens. 

When the view gets switched over to the console and the 'Problems' menu is open:

- like before, the 'Show' submenu disappears, and the 'Group By' and 'Sort By' submenus are disabled but only become disabled when you try to expand them

- if the 'Group By' or 'Sort By' submenus were disabled, this gets "remembered" the next time the 'Problems' menu is opened, but become enabled again once you attempt to expand the "disabled" submenu (I know this sounds a bit awkward)

- if the 'Group By' or 'Sort By' submenus were expanded, the 'Problems' menu will disappear entirely (which is okay, I think)

- the functionality for all menu items don't do anything when executed

- if the 'Show' submenu is expanded, it's submenu will still remain next to the 'Problems" menu, even though the 'Show' menu item has disappeared from the 'Problems' menu
Comment 7 Dani Megert CLA 2011-03-14 06:03:59 EDT
(In reply to comment #6)
See comment 1: the fix only addresses the CCE. There are various problems/differences when opening a view menu in such a scenario (not just in the Problems view).