Bug 21012 - [ExternalTools] Cancel tool does not cancel tool
Summary: [ExternalTools] Cancel tool does not cancel tool
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Jared Burns CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2002-06-26 11:58 EDT by Mads Pultz CLA
Modified: 2003-01-10 11:51 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 Mads Pultz CLA 2002-06-26 11:58:49 EDT
When I run an external tool (in my case a Makefile that among other things 
invoke bash scripts) I can not cancel the execution. Execution runs to 
completion instead of terminating.
Comment 1 Simon Arsenault CLA 2002-06-26 15:10:04 EDT
What build of Eclipse are you using?
Comment 2 Mads Pultz CLA 2002-06-26 15:54:06 EDT
I'm using GM4. The problem also exist in F2 which I used before.
Comment 3 Darin Wright CLA 2002-11-15 12:09:18 EST
"cancel" no longer exists. When you run an external program, a process is 
registered, which can now be terminated.
Comment 4 Darin Wright CLA 2002-11-15 12:09:38 EST
Please verify, Jared.
Comment 5 Jared Burns CLA 2002-11-25 21:55:36 EST
Reopening.
Comment 6 Jared Burns CLA 2002-11-25 21:57:15 EST
When I click on the "Terminate" button, it doesn't stop the execution of my
script. I've tested this with the exportplugins.xml script in the 
org.eclipse.jdt.debug.tests/scripts directory. The script runs to completion
even if I click Terminate as soon as it starts.
Comment 7 Darin Wright CLA 2002-11-26 09:11:45 EST
It only works for "programs" - not ant scripts currently. This is beacuse a 
program is a java.lang.Process (which supports terminate), and a script is 
a "fake" IProcess that does not support terminate. The terminate button is not 
enabled for ant scripts.
Comment 8 Jared Burns CLA 2002-11-26 09:54:59 EST
Yes it is. :-/ If you launch the exportplugins script, you'll see that the
terminate button in the debug view is enabled for the duration of its
execution.
Comment 9 Darin Wright CLA 2002-11-26 10:51:05 EST
Ah - it's only enabled when the "launch" is selected - not the process. There 
is actually a bug with the #canTerminate() method in Launch.
Comment 10 Darin Swanson CLA 2002-12-10 17:18:54 EST
not sure where this bug should be living?
Comment 11 Darin Wright CLA 2002-12-10 17:31:42 EST
There are two bugs:
(1) Debug platform - launch#canTerminate()
(2) Support termiante for ant builds

I will file a bug for (1) in the debug platform. This bug can stay here for (2)
Comment 12 Darin Wright CLA 2003-01-08 22:39:36 EST
Fixed. The terminate button is now enabled, and terminates a build.

I made the AntProcess into an IProgressMonitor, which is passed into the 
AntRunner. The AntRunner then checks for cancellation as tasks are processed.
Comment 13 Darin Wright CLA 2003-01-08 22:39:46 EST
Please verify.
Comment 14 Darin Swanson CLA 2003-01-10 11:51:53 EST
I accidentally verified this one :-)