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

Bug 316457

Summary: Pulsar Mobile SDKs view freezes the IDE
Product: z_Archived Reporter: Gorkem Ercan <gorkem.ercan>
Component: SequoyahAssignee: Project Inbox <pulsar.sequoyah-inbox>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3 CC: david.dubrow, kpqb38, nkvg64, wmg040
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Gorkem Ercan CLA 2010-06-10 09:05:13 EDT
Pulsar Mobile SDKs view is using the SWT UI thread to make network access to discover the available SDKs. This is causing the whole Eclipse IDE to freeze and become unusable until the view is populated (or the network times out if used disconnected). Mobile SDKs view should use a non-UI thread to retrieve the SDK list and let user work with IDE meanwhile.
Comment 1 David Dubrow CLA 2010-07-13 08:52:28 EDT
Unfortunately, the p2 discovery catalog viewer must be updated in the UI thread  (catalog updating is the operation that fetches the items to display). 

However, the operation can be canceled at any time using the red cancel button in the eclipse window's status area.
Comment 2 Daniel Drigo Pastore CLA 2010-07-13 09:03:07 EDT
Hi David,

can't we set a job to do this and run the catalog update when the job finishes? This would release the UI thread, right?
Comment 3 David Dubrow CLA 2010-07-13 09:10:51 EDT
(In reply to comment #2)
> Hi David,
> 
> can't we set a job to do this and run the catalog update when the job finishes?
> This would release the UI thread, right?

Hi Daniel, 

We don't control the fetching of items from pulsar code. We create a p2 discovery CatalogViewer with a Catalog object. The Catalog we pass to the viewer has been initialized with various discovery strategies that tell it where to find catalog item extensions. Then when we want to fetch the items, we tell the viewer to update (this part is the part that fetches the actual items and it must be done on the main thread - otherwise it throws an invalid thread access SWT exception).

However, as I mentioned, the catalog update task supports canceling and is very responsive so if it is taking too long, the user can cancel and continue working. 

I guess this should be an enhancement request to the p2 discovery catalog viewer.