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 17573 - Don't use double click on an ant script to execute (double click should mean 'open in the source editor')
Summary: Don't use double click on an ant script to execute (double click should mean...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: PC Windows 95/98
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-12 22:14 UTC by David-john Burrowes
Modified: 2001-12-13 14:37 UTC (History)
0 users

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 David-john Burrowes 2001-11-12 22:14:55 UTC
All other files in in the Filesystems tab of NetBeans seem to use double click to mean "open this file for editing".  Ant, however, treats a double click on 
an ant script to mean "execute".

Some discussion on nbusers on the 8th and 9th of November 2001 suggest that many users are a little bothered by this inconsistency.
Additionally, for users that want a quick way of executing the script, there is already a shortcut key (F6) which can be used.
Comment 1 Jesse Glick 2001-11-13 08:14:41 UTC
I agree, Open would be a much better default. It is quite easy to
change, actually - just delete four lines from source code
(AntProjectNode.getDefaultAction()).

Do you think this should be done for NB 3.3? I know it is after UI
freeze, but some users may be running scripts they really didn't want
to be, accidentally, which could be considered a bug.

One thing to think about: if you make a shortcut to a target using the
wizard, and select the option to add a shortcut to your Project tab,
this will no longer be runnable via double-clicking, only by clicking
and F6 (or similar). Probably not important though.

Also note that the fix would make Ant scripts actually take as their
default action whatever the first context menu item is: meaning that
if the user reorders the context menu (possible under the Object Types
node in Options), they can change the default for themselves.
Comment 2 Milan Kubec 2001-11-13 08:58:45 UTC
I think Jesse that solution mentioned in last paragraph is the best
one, because it allows everybody their own special default
double-click action. And "factory" default setting could be "Open"? I
thought it already worked this way for any object type, but it
doesn't. I will ask on nbui.
Comment 3 Jesse Glick 2001-11-13 09:16:14 UTC
The behavior described is the default for object types if you do not
give an explicit default action in a DataNode, which is what I propose
to do for Ant scripts. Milan your opinion also welcome on whether this
change should be for 3.3 or 3.4.
Comment 4 Milan Kubec 2001-11-13 11:14:24 UTC
Since we are far behind feature freeze and ui freeze, it would not be
good to change this kind of behavior IMHO.
Comment 5 Jesse Glick 2001-11-13 15:05:53 UTC
3.4 it is then.
Comment 6 David-john Burrowes 2001-11-13 16:55:27 UTC
FWIW, I agree that post 3.3 is better for the reasons mentioned here.

I'm not sure that the solution of having the first item be the double click action is ideal (though, maybe it is the 
only practical one in the short term).
There ought to be some way of explicitly designating which action corresponds to a double click (and probably this 
should be done from the Object Types options nodes)
Comment 7 Jesse Glick 2001-11-14 09:30:36 UTC
Perhaps the default action should be separately configurable--but that
would be an API change, and not one that is likely to be accepted
since we are looking at more general changes to the way actions for
object nodes are configured anyway, which would obsolete such a
change.
Comment 8 Jesse Glick 2001-12-12 22:10:07 UTC
Have patch ready for 3.4 dev.
Comment 9 Jesse Glick 2001-12-13 14:37:59 UTC
Fixed in the trunk:

committed     Up-To-Date  1.21       
ant/src/org/apache/tools/ant/module/nodes/AntProjectNode.java