Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 290920

Summary: ExtensionRegistryChange at runtime throws IllegalStateException
Product: [RT] RAP Reporter: Onno <bugzilla>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ed
Version: unspecified   
Target Milestone: 1.3 M5   
Hardware: All   
OS: All   
Whiteboard:

Description Onno CLA 2009-09-30 10:59:57 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Build Identifier: 3.4.2

Changing the ExtensionRegistry at runtime produces an IllegalStateException: No context available outside of the request service lifecycle.

The Workbench listens to registry changes with the org.eclipse.ui.internal.ExtensionEventHandler. When a Workbench is open and a new OSGi Bundle is installed at runtime and registers an extensionpoint , the registryChanged(..) method in the ExtensionEventHandler is called. In this method the Exception is thrown by PlatformUI.getWorkbench(). I assume this should be replaced with the class field "workbench".

IWorkbenchWindow[] win = workbench.getWorkbenchWindows();
instead of
IWorkbenchWindow[] win = PlatformUI.getWorkbench().getWorkbenchWindows();
worked for me.


Reproducible: Always

Steps to Reproduce:
1. Open a workbench
2. Install a bundle with an extension point at runtime while workbench (UIThread) is still running
3. get an IllegalStateException
Comment 1 RĂ¼diger Herrmann CLA 2010-01-27 07:29:37 EST
Fixed in CVS HEAD like suggested in the desciption.
Comment 2 Ed Willink CLA 2010-03-18 09:09:34 EDT
Is this fix in M6?

I'm seeing something very similar after installing from an Update Site, following which Outline shows error text, Show->View and File->Save All... are greyed out.
Comment 3 RĂ¼diger Herrmann CLA 2010-03-18 09:25:58 EDT
(In reply to comment #2)
> Is this fix in M6?
This was fixed in 1.3M5
> 
> I'm seeing something very similar after installing from an Update Site,
> following which Outline shows error text, Show->View and File->Save All... are
> greyed out.
If you still encouter problems, please re-open or file a new bug with steps to reproduce.