Bug 165714 - [Workbench] Workbench should check for existing display before creating one
Summary: [Workbench] Workbench should check for existing display before creating one
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Kim Horne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 154088
  Show dependency tree
 
Reported: 2006-11-23 16:09 EST by Andrew Niefer CLA
Modified: 2007-06-06 15:38 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch (1.37 KB, patch)
2006-12-06 15:06 EST, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2006-11-23 16:09:11 EST
The Workbench.createDisplay() should check to see if a display exists already before creating a new one.

In the case of the new launcher a splash bundle may have already created a display for splash screen purposes.

Suggest checking Display.getCurrent();
Comment 1 Andrew Niefer CLA 2006-12-06 15:06:04 EST
Created attachment 55157 [details]
proposed patch
Comment 2 Kim Horne CLA 2006-12-07 10:38:18 EST
I doubt you are able to create the display with debug options without recreating the Policy logic somewhere down below.  I'm not sure what we should do about this.  Maybe we could get SWT to give us API to activate debugging/tracing after the display has been created?  
Comment 3 Andrew Niefer CLA 2006-12-07 11:20:56 EST
I think it comes down to the question of how are we getting the splash bundle activated.  There are 2 options here:
1) The splash bundle is on the osgi.bundles list. With a start level of 1, we can get progress before update.configurator runs which is interesting, however this requires swt on the bundles list and a platform-dependent config.ini.  In this case we wouldn't really know what debug options to use.

2) The splash bundle is not on the osgi.bundles list, it is lazy-started and the application creates it.  The progress starts at the same time as it did before, and since the application is creating the splash bundle, it could choose to create the display first, or pass to the splash bundle which debug options to use.
Comment 4 Kim Horne CLA 2006-12-13 10:29:02 EST
Not for M4.  Too risky.
Comment 5 Kim Horne CLA 2007-01-10 14:26:13 EST
Given that our splash implementation will be created with the workbench leaving things as it is seems fine.  If an eager splash creates the display it can be responsible for providing the correct debug info.  We can simply document this requirement.  I'm checking in the patch.
Comment 6 Kim Horne CLA 2007-02-06 10:19:44 EST
Verified in source in I20070206-0010