Bug 326738 - [api][build] create startup extension for builds framework
Summary: [api][build] create startup extension for builds framework
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 0.7   Edit
Assignee: Torkild Resheim CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 317890
  Show dependency tree
 
Reported: 2010-10-01 02:58 EDT by Steffen Pingel CLA
Modified: 2011-01-05 14:44 EST (History)
0 users

See Also:


Attachments
Patch to implement startup extension (8.98 KB, patch)
2010-10-01 06:31 EDT, Torkild Resheim CLA
steffen.pingel: iplog+
Details | Diff
mylyn/context/zip (17.65 KB, application/octet-stream)
2010-10-01 06:31 EDT, Torkild Resheim CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2010-10-01 02:58:20 EDT
The startup extension should support auto discovery of servers and should be invoked when the builds integration is used for the first time, i.e. the builds view is made visible.

This avoids have more than one startup extension and ensures lazy loading of plug-ins. IContextUiStartup implements a similar mechanism for the context framework.
Comment 1 Torkild Resheim CLA 2010-10-01 06:31:16 EDT
Created attachment 180036 [details]
Patch to implement startup extension

The patch resolves this issue as specified in the initial description. The loading of startup extensions will be performed during the Builds UI plug-in startup.
Comment 2 Torkild Resheim CLA 2010-10-01 06:31:18 EDT
Created attachment 180037 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2010-10-02 00:59:52 EDT
Great stuff! I have applied the patch with minor modifications:

* BuildsUiStartup is now an abstract class to allow for future extensibility.
* The call to BuildsUiStartup.lazyStartup() is wrapped in a SafeRunnable to guard for problems in extensions
* The startup extensions are invoked in BuildsUiPlugin.initializeRefresh() which triggered when the builds view is made visible.

Activating other bundles when a bundle activator is initialized or start() is invoked can unfortunately lead to class loader dead locks and is best avoided as we have had to learn in the past.