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

Bug 326738

Summary: [api][build] create startup extension for builds framework
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Torkild Resheim <torkildr>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 Keywords: contributed
Version: unspecified   
Target Milestone: 0.7   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 317890    
Attachments:
Description Flags
Patch to implement startup extension
steffen.pingel: iplog+
mylyn/context/zip none

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.