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 151632 - Impossible to remove Ant target shortcuts
Summary: Impossible to remove Ant target shortcuts
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: UI
: 117680 158539 167805 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-28 18:29 UTC by shadewind
Modified: 2010-03-16 00:40 UTC (History)
3 users (show)

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 shadewind 2008-10-28 18:29:04 UTC
Right now, there is no way to remove Ant target shortcuts that were created as menu items. This is a really serious
issue! I have searched all menus and all options but haven't found it. If it exists, it should be made a lot clearer.
Comment 1 Jesse Glick 2008-10-28 23:06:13 UTC
You can delete entries from config/Menu/ in your user directory (usually ~/.netbeans/<something>/).

More generally, we used to have an Advanced options dialog mode which let you do various things to menus, but it is no
longer accessible and there is no alternative in the GUI.
Comment 2 Jiri Skrivanek 2008-10-29 10:23:28 UTC
I don't know which Ant target shortcuts you mean but in general a customization of main menu items is not supported
(decided by HIE team).
Comment 3 shadewind 2008-10-29 12:58:28 UTC
If the HIE teams has decided main menus cannot be customized, then there should be no way to add Ant target shortcuts
either.

The shortcuts I'm talking about is these:

1. Open the Navigator window.
2. Open an Ant file.
3. Select "Ant targets" from the Navigator.
4. Right-click a target and choose "Create shortcut".

There you go. From there, you can create a menu item indeed. If the GUI has a way to add it, there SHOULD be a way to
remove it through the GUI as well!
Comment 4 Jiri Skrivanek 2008-10-29 13:41:31 UTC
I see now. I didn't know about such feature. Then it is the responsibility of the ant module to provide a possibility to
remove created shortcuts. It can be for example in Tools>Options>Miscellaneous>Ant panel. Otherwise reassign to HIE team.
Comment 5 Jesse Glick 2008-10-29 16:26:44 UTC
In such a case I have no real option but to remove the Ant shortcut wizard, I guess; implementing a general menu editor
in Ant options is out of the question. Not sure offhand if Ant KB shortcuts can be deleted from Options currently; if
so, could leave just the ability to make KB bindings. (Not sure why you can edit KB shortcuts but not menus!) Or Ant
shortcut functionality could be moved to a separate module available on AU only that would also include old-style menu
editing GUI (or depend on a module which did).

Could be made to work in an entirely different way that does not involve adding menu items to arbitrary menus (or
toolbar buttons to toolbars); maybe some fixed menu item like "Ant Favorites", to appear only when some targets have
been marked "my favorite" from the context menu? Potentially a fair amount of work that I do not have time for at the
moment unless there is broad demand.

Tim B. has a "Targets" module in contrib that I haven't played with that has something like this kind of functionality,
though for a toolbar rather than a menu. Does not appear to be published on Dev AU at the moment.
Comment 6 _ tboudreau 2008-10-29 23:17:58 UTC
contrib/targets is pretty rough around the edges.

I didn't quite understand "If the HIE teams has decided main menus cannot be customized, then there should be no way to add Ant target shortcuts
either" - if we have a feature people use, and the core functionality of the feature adds menu items, then that needs to be considered, rather than applying 
such advice in a draconian way.

I could see shortcut-to-target being moved into a separate module, since it is possibly a bit esoteric.  There are a huge number of UIs in NetBeans that 
generically show a tree of (what happen to be) DataShadows in some folder (menu customization, etc.) with up/down/add/delete buttons - surely it would be 
trivial to copy such a piece of UI, and with ten minutes of tweaking have something that enables you to delete/customize Ant shortcuts... 
Comment 7 shadewind 2008-10-29 23:27:06 UTC
Well, I'm not suggesting the feature to be removed, I'm just pointing out that the given reasoning has certain flaws. It
would make more sense to simply add a way to remove them from the GUI. Users should not be stuck with old target
shortcuts in menus that they do not use anymore. Sure they can remove them from the file system, but that's not
documented anywhere.
Comment 8 Jesse Glick 2008-11-12 17:30:04 UTC
It may be possible to just add a "Remove Shortcut" action to the context menu of a target, to look for an
Actions/Build/*.xml mentioning this script & target, and delete it, along with any
{Menu/*,Toolbars/*,Shortcuts}/*.shadow referring to it. This won't work if you create a shortcut and later delete (or
move) the script it points to; maybe the action could offer to delete _all_ Ant shortcuts (under the assumption that
there are probably not many and you can easily recreate any you really wanted).
Comment 9 Jesse Glick 2009-02-13 16:10:15 UTC
*** Issue 158539 has been marked as a duplicate of this issue. ***
Comment 10 Jiri Skrivanek 2009-06-29 14:59:46 UTC
*** Issue 167805 has been marked as a duplicate of this issue. ***
Comment 11 Jesse Glick 2009-09-21 21:53:08 UTC
core-main #d41442814dbf
Comment 12 Quality Engineering 2009-09-22 21:38:37 UTC
Integrated into 'main-golden', will be available in build *200909221401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d41442814dbf
User: Jesse Glick <jglick@netbeans.org>
Log: #151632: GUI to remove Ant target shortcuts.
Comment 13 Jesse Glick 2010-03-16 00:40:31 UTC
*** Bug 117680 has been marked as a duplicate of this bug. ***