Bug 373662 - Pre-launch workspace deletion should respond to cancellation
Summary: Pre-launch workspace deletion should respond to cancellation
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.8 M6   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2012-03-08 11:17 EST by DJ Houghton CLA
Modified: 2012-03-09 16:35 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2012-03-08 11:17:11 EST
Eclipse 3.7.1

I have the same problem as bug 354338 where it is taking forever to start a launch config. Turns out it is deleting the workspace files for a rather large workspace. 

I can delete these files from the file-system but if I forget and accidentally launch the config first and then hit Cancel while the progress monitor is at 57% (deleting), it won't cancel the operation until all the files are deleted. 

I quickly looked at the code and it appears LauncherUtils.clearWorkspace is the entry point. It receives a progress monitor but then it calls out to CoreUtility.deleteContent which actually does the deletion on disk. This method doesn't (but could) take a progress monitor and check for cancellation each iteration of the loop.
Comment 1 Curtis Windatt CLA 2012-03-09 10:57:46 EST
Fixed in master, the progress monitor is now used in a much smarter manner for Eclipse, OSGi and JUnit launches.

I updated the javadoc on the API clear() method of AbstractPDELaunchConfiguration to inform users that a CoreException may be thrown with a cancel status if the operation is cancelled (this is not a change in API behaviour).