This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 130827 - Cancel running task does not work
Summary: Cancel running task does not work
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
: 129240 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-21 21:01 UTC by Alexander Pepin
Modified: 2008-04-07 16:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2008-03-21 21:01:28 UTC
Steps to reproduce:
- create Quote sample
- compile the project
- run the project
- press "cross" button in the Quote_1(Build, Run) progress bar in the right bottom corner of the IDE window, Cancel
Running Task dialog appears
- in Cancel Running Task dialog press "Yes" to confirm cancellation
Result: The process does not stop. Clicks on "cross" button do not have any effect.
Comment 1 _ gordonp 2008-03-21 22:28:16 UTC
This appears to be a more general projects issue, rather than a gdb-lite issue. The
cancel action is ignored for both running and debugging. I looked through code and
DefaultProjectActionHandler$StopAction doesn't enable the action so the isEnabled()
check in the actionPerformed() method returns false and the process isn't stopped.

I experimented by enabling the action in the constructor. By the time it reached the
actionPerformed method it was again disabled. If I enabled it in actionPerformed
(something I wouldn't do except while experimenting), it still did nothing in gdb-lite
(because handleEvents.getExecutorTask() was null) and aborted NetBeans if Running
a project.

Anyway, I'm reassigning this to Thomas as it appears to be a project issue.
Comment 2 Thomas Preisler 2008-03-21 22:54:47 UTC
The issue is not that you cannot cancel a run when we execute in an external terminal but that the cancel button at the bottom of output window is not 
disabled. The run is terminated simply by dismissing the terminal window. The problem is NB doesn't have an API to control enableness of the cancel button, 
and there is also no way to not show it. The button is always available. I can ask for an API but I doubt it can be done in 6.1.

Comment 3 Thomas Preisler 2008-03-21 22:57:04 UTC
Is this really a P2? 
Comment 4 _ gordonp 2008-03-21 23:43:46 UTC
IMHO no. For both Run and Debug there are alternate ways of terminating the
process.
Comment 5 Thomas Preisler 2008-03-25 01:23:42 UTC
Will remove the cancel icon from the progress bar when executing in external window. The cancel icon will still be present (and work) during the build. To 
cancel the run when running in terminal window, simply dismiss the terminal window.
Comment 6 Thomas Preisler 2008-03-25 04:42:43 UTC
The cancel icon is now only shown when it also does work. The icon is not shown when running in terminal window or when debugging. There are alternative 
ways to terminate the process in those two cases and doing it from the progress bar wouldn't work. The cancel icon is shown when building and running in 
internal window and it does work in those two cases.
Comment 7 Thomas Preisler 2008-03-25 05:23:32 UTC
changeset 999b9f64cf4a in main
details: http://hg.netbeans.org/main?cmd=changeset;node=999b9f64cf4a
description:
	130827 Cancel running task does not work

changeset 078e07ce3dc6 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=078e07ce3dc6
description:
	130827 Cancel running task does not work
Comment 8 Thomas Preisler 2008-03-25 23:55:29 UTC
changeset 33e80d45492c in main
details: http://hg.netbeans.org/main?cmd=changeset;node=33e80d45492c
description:
	130827 Cancel running task does not work
Comment 9 Alexander Pepin 2008-04-01 16:13:58 UTC
verified in build 200803302302
Comment 10 Alexander Pepin 2008-04-07 16:01:24 UTC
*** Issue 129240 has been marked as a duplicate of this issue. ***