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 75465 - Please provide a "stop process" button in the output window
Summary: Please provide a "stop process" button in the output window
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL: http://ui.netbeans.org/docs/ui/output...
Keywords: UI
Depends on:
Blocks: 83313
  Show dependency tree
 
Reported: 2006-04-25 09:40 UTC by Tim Lebedkov
Modified: 2006-11-28 16:50 UTC (History)
8 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2006-04-25 09:40:18 UTC
see summary

Thank You
Comment 1 Milos Kleint 2006-04-25 09:45:27 UTC
up to ant integration to provide such action. Output is processing also content
that cannot be stopped.
j2ee servers already have such buttons for starting/stopping servers.
Comment 2 Jesse Glick 2006-08-08 18:36:04 UTC
Enabled for now just with the flag

-J-Dorg.apache.tools.ant.module.run.TargetExecutor.SHOW_STOP_BUTTON=true

Jano, any objection to turning this on by default? Would make the stop build
functionality more discoverable, and would be more consistent with output tabs
for J2EE servers and the like.

Checking in ant/arch/arch-ant-main.xml;
/shared/data/ccvs/repository/ant/arch/arch-ant-main.xml,v  <--  arch-ant-main.xml
new revision: 1.15; previous revision: 1.14
done
RCS file:
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/resources/stop.gif,v
done
Checking in ant/src/org/apache/tools/ant/module/resources/stop.gif;
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/resources/stop.gif,v
 <--  stop.gif
initial revision: 1.1
done
Checking in ant/src/org/apache/tools/ant/module/run/Bundle.properties;
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/run/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.28; previous revision: 1.27
done
Checking in ant/src/org/apache/tools/ant/module/run/TargetExecutor.java;
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/run/TargetExecutor.java,v
 <--  TargetExecutor.java
new revision: 1.59; previous revision: 1.58
done
Comment 3 jrojcek 2006-08-09 16:36:54 UTC
We plan to put a close button into output tabs and we also have a UI spec that should be discussed soon. 
Not final yet, but you can take a look at:
http://ui.netbeans.org/docs/ui/outputwindow/OutputWindowSpecification.html

I'll look at Jesse's switch.
Comment 4 Jesse Glick 2006-08-09 16:55:16 UTC
Right, I thought there was a proposal somewhere...

I would leave this issue just for the stop button, which is the simplest to
implement and probably most important element, but quick comments on feasibility
of other parts of spec:

1. Repeat button probably easy. (See existing Build | Repeat Build/Run.) But it
is not possible to make it not appear for e.g. Test Project etc. Nor do I
exactly see why you would want to disable it for such cases. Other windows may
indeed be opened but it is still the OW window that controls the entire action.
Anyway for a freeform project or any project with a customized build script it
is impossible to distinguish these cases precisely.

2. Filter button's behavior is underspecified. May be problematic to make work
the way you want, but TBD.

3. Stopping Ant process upon closing of OW tab (or prompting user) would require
an API change and work in OW as well as Ant modules.
Comment 5 jrojcek 2006-08-10 14:14:07 UTC
I checked the switch. The current implementation is in the spirit of UI spec, but there are a few differences.  
Apart from things mentioned by Jesse, the UI spec proposes to place toolbar buttons outside of individual 
output tabs. Please put this on hold for a while. We should soon know how it should finally look like.
Comment 6 Martin Krauskopf 2006-08-14 20:06:34 UTC
Presumably not final UI spec but.... In the current implementation the button
should be disabled after it is clicked. Since it may happen that stopping take
few seconds, sometime ten and more. Then it looks odd when the button is still
enabled. The user has tendency to click again since it seems it did not take the
efect.
Comment 7 Jesse Glick 2006-08-14 23:25:37 UTC
Martin's comment applied:

Checking in TargetExecutor.java;
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/run/TargetExecutor.java,v
 <--  TargetExecutor.java
new revision: 1.61; previous revision: 1.60
done
Comment 8 _ recjake 2006-08-16 09:22:50 UTC
Using the switch:
-J-Dorg.apache.tools.ant.module.run.TargetExecutor.SHOW_STOP_BUTTON=true
prevents NB6.0 M2 from starting.

When inserting this switch in "netbeans.conf" for NB6.0 Milestone2 the IDE is 
not starting. No entry in the error log.
Comment 9 Jesse Glick 2006-08-16 18:27:54 UTC
recjake: you need to add switches to the netbeans_default_options var. You can
also just use the switch when starting NB from a command shell, for testing.
Comment 10 Josef Pavlicek 2006-08-21 14:35:45 UTC
Hi All,
    I solved these problems with stop (terminate) process button etc.  in the
Output window. Now I finalized  it in the specification, please read it in this file

http://ui.netbeans.org/docs/ui/outputwindow/OutputWindowSpecification.html


Thanks for your interest and help
 Josef Pavlicek 
Comment 11 Jesse Glick 2006-08-21 16:21:00 UTC
I have read the UI spec but some aspects of that are not implementable currently
due to missing support in the Input/Output API. In particular, the Ant module
cannot make the buttons be drawn outside of the tab pane, nor can it intercept
tab closing. These changes would need to be filed in core/output. Also impl of
other buttons besides Stop I would leave to separate issues; they may be hard to
implement and I probably will not have time for it in 6.0. Given these things, I
believe the impl of the Stop button is already compliant with the spec. So do
you want the Stop button in trunk or not?
Comment 12 Martin Krauskopf 2006-08-21 16:27:17 UTC
I think that Dafe talked about such API in Input/Output on today's meeting. CCing.
Comment 13 Jesse Glick 2006-08-22 23:39:57 UTC
So I just added a Re-run button roughly according to spec (but enabled for all
builds, unlike as in spec). Disabled when build starts, then enabled when build
terminates (for any reason: success, failure, stop). Always reruns exact same
Ant process, whether that be app run, compile file, unit test, etc. Also
conditionally shown only if passed

-J-Dorg.apache.tools.ant.module.run.TargetExecutor.SHOW_STOP_BUTTON=true

Should be in next dev build. Please try it.
Comment 14 Josef Pavlicek 2006-08-23 07:41:26 UTC
OK Jessy, I will try it. Thanks
Josef 
Comment 15 Jesse Glick 2006-08-23 20:15:18 UTC
OK, implementing Stop and Re-Run buttons as in spec except:

- inside, not outside, tabbed pane (file bug in core/output if desired)

- Re-Run always enabled after end of any build, even for e.g. test or debug
(could be solved in most cases but not 100% reliably - file bug in ant/ui if
desired)

Checking in src/org/apache/tools/ant/module/run/TargetExecutor.java;
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/run/TargetExecutor.java,v
 <--  TargetExecutor.java
new revision: 1.63; previous revision: 1.62
done
Checking in arch/arch-ant-main.xml;
/shared/data/ccvs/repository/ant/arch/arch-ant-main.xml,v  <--  arch-ant-main.xml
new revision: 1.17; previous revision: 1.16
done
Comment 16 Tim Lebedkov 2006-10-09 14:23:15 UTC
ok