Community
Participate
Working Groups
BuildId: I20111028-1100 OS: MacOS X (only because it demonstrates the problem) The CocoaUIProcessor requests the MApplication through injection. But an interesting thing occurs: when the MApplication instance is set (in E4Application#createE4Workbench()), the injector actually tries to inject with a created instance of MApplication, which fails. This can be seen if you place a breakpoint on InjectionException: Daemon Thread [Thread-1] (Suspended (exception InjectionException)) InjectorImpl.internalMake(Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier) line: 326 InjectorImpl.resolveArgs(Requestor, PrimaryObjectSupplier, PrimaryObjectSupplier, boolean, boolean, boolean) line: 450 InjectorImpl.resolveArguments(IRequestor, boolean) line: 334 FieldRequestor(Requestor).resolveArguments(boolean) line: 115 ContextObjectSupplier$ContextInjectionListener.update(IEclipseContext, int, Object[]) line: 76 TrackableComputationExt.update(ContextChangeEvent) line: 106 EclipseContext.processScheduled(Set<Scheduled>) line: 307 EclipseContext.set(String, Object) line: 321 E4Application.createE4Workbench(IApplicationContext, Display) line: 231 (I often trap InjectionException as it seems the best way to discover why a handler isn't being invoked.)
If I understand the description right, this seem like a result of the change in the bug 302533. Is that correct? How can I duplicate the problem (and where is the CocoaUIProcessor coming from)?
(In reply to comment #1) > If I understand the description right, this seem like a result of the change in > the bug 302533. Maybe, although in this case there is a value available in the context. > Is that correct? How can I duplicate the problem (and where is the > CocoaUIProcessor coming from)? The CocoaUIProcessor is part of the org.eclipse.e4.ui.workbench.renderers.swt.cocoa fragment, and installed by default. (I vaguely recall that you had a mac, so this would be an easy demo of the issue.)
Thank you, I can duplicate the problem. (My Git repo was messed up on Mac.) There seems to be two issues there: - Originally ModelAssembler#runProcessor() injects CocoaUIProcessor with a context that gets disposed (localContext.dispose()); - The CocoaUIProcessor gets update notification even through its context was disposed. I'll look into those.
(In reply to comment #3) > There seems to be two issues there: > - Originally ModelAssembler#runProcessor() injects CocoaUIProcessor with a > context that gets disposed (localContext.dispose()); Fixed: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=0e5242977d5dd079aa45de99c7d85d1e41f5b60a > - The CocoaUIProcessor gets update notification even through its context was > disposed. Fixed: http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=c8d5768a057413a47ccfd713aa89b2b3b01f25e4
Verified in I20120123-2200 — it doesn't happen in any of my sample apps.