Community
Participate
Working Groups
1. Window > Show View > Console 2. Click the dropdown > New Console View 3. Close the new view. 4. Try clicking the dropdown again. 5. Nothing happens. An NPE is logged. java.lang.NullPointerException at org.eclipse.ui.internal.console.OpenConsoleAction.getMenu(OpenConsoleAction.java:83) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:530) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
1. Window > Show View > Console 2. Click the dropdown > New Console View 3. Go back to the first 'Console'. 4. Try clicking the dropdown again.
1. Ctrl+3 > Console 2. Show the console drop down. 3. Activate the 'Declaration' view. 4. Activate the 'Console' view. 5. Show the console drop down again. You'll hit the NPE. This problems seems more severe than before.
We dispose and recreate a part's tool bar every time the selected part in a part stack changes. The disposal of the tool item causes the console action to also be disposed due to its use of the IMenuCreator interface. Thread [main] (Suspended (breakpoint at line 53 in OpenConsoleAction)) OpenConsoleAction.dispose() line: 53 ActionContributionItem.handleWidgetDispose(Event) line: 474 ActionContributionItem.access$1(ActionContributionItem, Event) line: 466 ActionContributionItem$6.handleEvent(Event) line: 447 EventTable.sendEvent(Event) line: 84 ToolItem(Widget).sendEvent(Event) line: 1053 ToolItem(Widget).sendEvent(int, Event, boolean) line: 1077 ToolItem(Widget).sendEvent(int) line: 1058 ToolItem(Widget).release(boolean) line: 808 ToolBar.releaseChildren(boolean) line: 807 ToolBar(Widget).release(boolean) line: 811 ToolBar(Widget).dispose() line: 446 StackRenderer.showTab(MUIElement) line: 490
Created attachment 173885 [details] Patch that prevents RenderedToolBars from getting disposed This also changes the way that toolbars in views are managed, using the TBR state as opposed to directly disposing the TB (allowing the RenderedTB's to not have their widget disposed.
Committed in >20100709. Applied the patch (removed a piece of test code that was adding "VM" as the view menu button's text).