Bug 395767 - [3.8.2] Tracing UI bundle declarative service causes the workspace prompt to not display
Summary: [3.8.2] Tracing UI bundle declarative service causes the workspace prompt to ...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2.1   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.8.2   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on: 369916 395632
Blocks:
  Show dependency tree
 
Reported: 2012-12-04 17:44 EST by Curtis Windatt CLA
Modified: 2012-12-04 17:58 EST (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 Curtis Windatt CLA 2012-12-04 17:44:01 EST
Cloned to backport to 3.8.2/4.2.2 stream

+++ This bug was initially created as a clone of Bug #395632 +++

The declarative service for calling the tracing initializer class in the org.eclipse.ui.trace bundle can cause the workspace prompt to not display.  If this service is run before the workspace is initialized then its activator class will attempt to access the instance scoped preferences (i.e. workspace preferences):

@Override
public void start(final BundleContext context) throws Exception {
	...
	if (DebugOptionsHandler.isTracingEnabled()) {
		...
	} else if (PreferenceHandler.isTracingEnabled()) { <-- accesses prefs in workspace
		...
	}
}

As a result of doing this action before the workspace is initialized then the workspace location is set to be the location specified via the osgi.instance.area.default configuration property and the prompt is not displayed to change it.

I'm marking this as 'major' since our Eclipse-based product causes this situation to occur and the workspace prompt never displays.