Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354875 - [Compatibility] Many exceptions logged when opening a .ecorediag file
Summary: [Compatibility] Many exceptions logged when opening a .ecorediag file
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 4.2 M7   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 376232 (view as bug list)
Depends on:
Blocks: 331377 343974
  Show dependency tree
 
Reported: 2011-08-16 14:15 EDT by Remy Suen CLA
Modified: 2012-05-01 15:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-08-16 14:15:23 EDT
The item being added is not a regular contribution item or manager.

org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.AbstractContributionItemProvider$PluginMenuManager

java.lang.Exception: fill(MToolBar container, IContributionManager manager) with rogue contribution manager: org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.AbstractContributionItemProvider$PluginMenuManager@95a095a
	at org.eclipse.ui.internal.CoolBarToTrimManager.fill(CoolBarToTrimManager.java:612)
	at org.eclipse.ui.internal.CoolBarToTrimManager.update(CoolBarToTrimManager.java:584)
	at org.eclipse.ui.internal.WorkbenchWindow.updateActionBars(WorkbenchWindow.java:1703)
	at org.eclipse.ui.internal.WWinActionBars.updateActionBars(WWinActionBars.java:113)
	at org.eclipse.ui.SubActionBars.updateActionBars(SubActionBars.java:611)
	at org.eclipse.ui.internal.e4.compatibility.ActionBars.updateActionBars(ActionBars.java:96)
	at org.eclipse.ui.part.PageBookView.showPageRec(PageBookView.java:1015)
	at org.eclipse.ui.views.contentoutline.ContentOutline.showPageRec(ContentOutline.java:251)
	at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:759)
	at org.eclipse.ui.views.contentoutline.ContentOutline.partBroughtToTop(ContentOutline.java:212)
	at org.eclipse.ui.part.PageBookView$4.partBroughtToTop(PageBookView.java:1039)
	at org.eclipse.ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3974)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.WorkbenchPage.firePartBroughtToTop(WorkbenchPage.java:3972)
	at org.eclipse.ui.internal.WorkbenchPage.access$15(WorkbenchPage.java:3957)
	at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partBroughtToTop(WorkbenchPage.java:172)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$6.run(PartServiceImpl.java:247)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartBroughtToTop(PartServiceImpl.java:245)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.access$4(PartServiceImpl.java:243)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:92)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:182)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:357)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:311)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:315)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:954)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2739)
	at org.eclipse.ui.internal.WorkbenchPage.access$19(WorkbenchPage.java:2664)
	at org.eclipse.ui.internal.WorkbenchPage$7.run(WorkbenchPage.java:2646)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2642)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2622)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2613)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
Comment 1 Remy Suen CLA 2011-08-16 14:48:53 EDT
Based on a comparison against 3.x, they appear to be adding a custom MenuManager subclass to the coolbar as a means of creating a dropdown tool item.
Comment 2 Paul Webster CLA 2011-08-17 12:57:37 EDT
(In reply to comment #1)
> Based on a comparison against 3.x, they appear to be adding a custom
> MenuManager subclass to the coolbar as a means of creating a dropdown tool
> item.

How do they get that in there?  A dynamic contribution?

PW
Comment 3 Remy Suen CLA 2011-08-17 13:22:32 EDT
(In reply to comment #2)
> How do they get that in there?  A dynamic contribution?

Since it's their own subclass of MenuManager, I'm guessing they threw them in programmatically using the editor action bars, let me check.
Comment 4 Remy Suen CLA 2011-08-17 13:33:18 EDT
It's programmatically inserted when we're initializing the editor's IEABC implementation.

Thread [main] (Suspended (breakpoint at line 405 in ContributionManager))	
	ToolBarManager2(ContributionManager).itemAdded(IContributionItem) line: 405	
	ToolBarManager2(ContributionManager).add(IContributionItem) line: 86	
	DiagramContributionItemProvider(AbstractContributionItemProvider).contributeItem(IAdaptable, IContributionManager, String, String) line: 711	
	DiagramContributionItemProvider(AbstractContributionItemProvider).contributeToActionBars(IActionBars, IWorkbenchPartDescriptor, boolean) line: 229	
	DiagramContributionItemProvider(AbstractContributionItemProvider).contributeToActionBars(IActionBars, IWorkbenchPartDescriptor) line: 154	
	ContributeToActionBarsOperation.execute(IProvider) line: 75	
	ExecutionStrategy$4.execute(Service, IOperation) line: 181	
	ContributionItemService(Service).execute(ExecutionStrategy, IOperation) line: 651	
	ContributionItemService.execute(IOperation) line: 293	
	ContributionItemService.contributeToActionBars(IActionBars, IWorkbenchPartDescriptor) line: 241	
	EcoreDiagramActionBarContributor(DiagramActionBarContributor).init(IActionBars) line: 75	
	EcoreDiagramActionBarContributor(EditorActionBarContributor).init(IActionBars, IWorkbenchPage) line: 146	
	EcoreDiagramActionBarContributor.init(IActionBars, IWorkbenchPage) line: 55	
	EditorReference.createEditorActionBars(WorkbenchPage, EditorDescriptor, IEditorSite) line: 397
Comment 5 Remy Suen CLA 2011-08-18 10:16:55 EDT
They have a menu manager wrapping another menu manager which then delegates to an ACI that renders the dropdown in 3.x.

3.x trace as follows:

Thread [main] (Suspended (breakpoint at line 866 in ToolItem))	
	ToolItem.setToolTipText(String) line: 866	
	ActionContributionItem.update(String) line: 810	
	ActionContributionItem.fill(ToolBar, int) line: 342	
	RouterMenuManager(ActionMenuManager).fill(ToolBar, int) line: 310	
	AbstractContributionItemProvider$PluginMenuManager.fill(ToolBar, int) line: 1122	
	ToolBarManager2(ToolBarManager).update(boolean) line: 353	
	ToolBarManager2(ToolBarManager).createControl(Composite) line: 111	
	ToolBarContributionItem2(ToolBarContributionItem).fill(CoolBar, int) line: 192	
	CoolBarManager2(CoolBarManager).update(boolean) line: 930	
	WorkbenchWindow.updateActionBars() line: 3217	
	WorkbenchWindow.largeUpdateEnd() line: 3270	
	Workbench.largeUpdateEnd() line: 3538	
	WorkbenchPage.busyOpenEditor(IEditorInput, String, boolean, int, IMemento) line: 2853	
	WorkbenchPage.access$11(WorkbenchPage, IEditorInput, String, boolean, int, IMemento) line: 2842	
	WorkbenchPage$10.run() line: 2793	
	BusyIndicator.showWhile(Display, Runnable) line: 70	
	WorkbenchPage.openEditor(IEditorInput, String, boolean, int, IMemento) line: 2789	
	WorkbenchPage.openEditor(IEditorInput, String, boolean, int) line: 2773	
	WorkbenchPage.openEditor(IEditorInput, String, boolean) line: 2764	
	IDE.openEditor(IWorkbenchPage, IFile, boolean, boolean) line: 651	
	IDE.openEditor(IWorkbenchPage, IFile, boolean) line: 610
Comment 6 Eric Moffatt CLA 2011-12-09 13:10:15 EST
Aggregate move to M5. Retarget to a different milestone if you wish...
Comment 7 Remy Suen CLA 2012-01-23 15:01:57 EST
(In reply to comment #5)
> They have a menu manager wrapping another menu manager which then delegates to
> an ACI that renders the dropdown in 3.x.

This pattern is reminiscent of the issue described in bug 330609.
Comment 8 Paul Webster CLA 2012-04-10 08:40:17 EDT
*** Bug 376232 has been marked as a duplicate of this bug. ***
Comment 9 Eric Moffatt CLA 2012-04-17 13:58:06 EDT
What's the status of this defect now ?
Comment 10 Mike Wilson CLA 2012-04-17 14:45:47 EDT
Need to retest.
Comment 11 Remy Suen CLA 2012-04-17 17:38:13 EDT
(In reply to comment #9)
> What's the status of this defect now ?

Presumably still broken based on bug 376232 but would have to retest to be sure I suppose.
Comment 12 Curtis Windatt CLA 2012-04-19 10:32:27 EDT
Retested using the latest UI code from master and e4.tools 0.10.0.20120203135 and the issue can still be reproduced (slightly different line numbers).

java.lang.Exception: fill(MToolBar container, IContributionManager manager) with rogue contribution manager: org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.AbstractContributionItemProvider$PluginMenuManager@1cc5ad3
	at org.eclipse.ui.internal.CoolBarToTrimManager.fill(CoolBarToTrimManager.java:691)
	at org.eclipse.ui.internal.CoolBarToTrimManager.update(CoolBarToTrimManager.java:635)
	at org.eclipse.ui.internal.WorkbenchWindow.updateActionBars(WorkbenchWindow.java:1796)
	at org.eclipse.ui.internal.WorkbenchPage.updateActionBars(WorkbenchPage.java:3872)
	at org.eclipse.ui.internal.WorkbenchPage$ActionSwitcher.updateActivePart(WorkbenchPage.java:616)
	at org.eclipse.ui.internal.WorkbenchPage.updateActivations(WorkbenchPage.java:273)
	at org.eclipse.ui.internal.WorkbenchPage.access$14(WorkbenchPage.java:248)
	at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:168)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:190)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:188)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.setPart(PartServiceImpl.java:163)
	at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:77)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:106)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:298)
Comment 13 Paul Webster CLA 2012-04-19 14:26:30 EDT
Curtis, what if we just remove the offending lines from org.eclipse.ui.internal.CoolBarToTrimManager


			} else if (item instanceof IContributionManager) {
				new Exception(
						"fill(MToolBar container, IContributionManager manager) with rogue contribution manager: " //$NON-NLS-1$
								+ item).printStackTrace();
				fill(container, (IContributionManager) item);


We would then in theory be turning them into Opaque items at the end of that loop

PW
Comment 14 Curtis Windatt CLA 2012-04-19 14:58:23 EDT
Removing those lines does take away the errors away.  The coolbar items, including the drop down options, appear to work.  Some are disabled (routing options), but I'm guessing this is intentional.  Did get an error in ecoretools when running the validation.

Caused by: java.lang.NoSuchMethodError: org.eclipse.emf.ecoretools.diagram.providers.EcoreValidationDecoratorProvider$StatusDecorator.getDecoration()Lorg/eclipse/gmf/runtime/diagram/ui/internal/services/decorator/Decoration;
	at org.eclipse.emf.ecoretools.diagram.providers.EcoreValidationDecoratorProvider$StatusDecorator.refresh(EcoreValidationDecoratorProvider.java:257)
	at org.eclipse.emf.ecoretools.diagram.providers.EcoreValidationDecoratorProvider$1$1.run(EcoreValidationDecoratorProvider.java:143)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.emf.ecoretools.diagram.providers.EcoreValidationDecoratorProvider$1.run(EcoreValidationDecoratorProvider.java:138)
Comment 15 Paul Webster CLA 2012-04-20 07:48:04 EDT
(In reply to comment #13)
> 
> We would then in theory be turning them into Opaque items at the end of that
> loop

OK, let's try that.

Not sure why you'd be getting a NoSuchMethodError, I don't believe that's related to us (but then not sure why it's there).

PW
Comment 16 Paul Webster CLA 2012-04-27 15:18:37 EDT
Fixed with bug 359117

PW
Comment 17 Paul Webster CLA 2012-05-01 15:18:06 EDT
In I20120430-1800
PW