QuickOpener-NetBeans icon indicating copy to clipboard operation
QuickOpener-NetBeans copied to clipboard

Launch custom commands directly from Menu Item or Dropdown

Open dkirrane opened this issue 9 years ago • 13 comments

Currently it takes 3 to 4 mouse-clicks to Launch a Custom command (via the Launch Custom command)

I use these command very often to launch Cygwin and Sublime etc...

It would be a nice enhancement to allow launching a Custom command via a single mouse click or maybe a separate context menu option to launch each Custom command.

Also it would be good if I could disable the Confirm dialog "You are about to launch command... Are you sure?"

dkirrane avatar Dec 16 '15 16:12 dkirrane

+1 Hi dkirrane I agree with you.

Git-GT avatar Dec 20 '15 09:12 Git-GT

IMO "separate context menu option to launch each Custom command." is possible

markiewb avatar Jan 21 '16 23:01 markiewb

Great module! And must has this feature. I vote for this enchancment

mikbox74 avatar Feb 03 '16 16:02 mikbox74

I also would like this enhancement. Either that or being able to run a command with a key shortcut, right from the keyboard.

negora avatar Feb 24 '16 16:02 negora

Adding actions at runtime is technically possible.

See http://wiki.netbeans.org/DevFaqActionsAddAtRuntime

This allows to

  • add actions to the "action pool"
  • add actions to toolbar
  • add shortcuts for actions

markiewb avatar Mar 16 '16 20:03 markiewb

@dkirrane / @Gittino / @mikbox74 / @negora / @tychobrailleur : Please provide a dialog mockup!

markiewb avatar Mar 16 '16 20:03 markiewb

Hi Markiewb, for me the best would be to have some toolbar button (like the ones available for the maven actions), what do you think about it?

Edit: NOTE: The maven buttons that I mentioned are the customizable ones ( Tools -> Options -> Java -> Maven -> Execution -> Edit Global Custom Goal Definitions..) not the standard ones

Git-GT avatar Mar 17 '16 13:03 Git-GT

The relevant code for the custom maven toolbar icons.

https://github.com/Tateology/java-corpus/blob/4c8b54c226ebbb7051fc18b4d0e44ce46ff5000b/netbeans/maven/src/org/netbeans/modules/maven/actions/RunCustomMavenAction.java

https://github.com/Tateology/java-corpus/blob/4c8b54c226ebbb7051fc18b4d0e44ce46ff5000b/netbeans/maven/src/org/netbeans/modules/maven/customizer/ActionMappings.java#L721

markiewb avatar Mar 17 '16 19:03 markiewb

@dkirrane / @mikbox74 / @negora / @tychobrailleur : Any other proposals?

markiewb avatar Mar 20 '16 18:03 markiewb

@markiewb IMO the less clicks and mouse moves the better. If the custom command could be listed directly beneath the custom command toolbar button.

dkirrane avatar Mar 21 '16 22:03 dkirrane

@markiewb just thinking is it possible to add keyboard shortcuts to custom commands.

dkirrane avatar Mar 21 '16 22:03 dkirrane

I believe that if you had many custom commands, their buttons might clutter the toolbar. In my opinion, it would be better to combine a drop-down list with the possibility of defining keyboard short-cuts. That way, one could have direct access to the most used commands with a pair of key strokes, while still being able to have a long list of commands that is just 2-click away.

quick-opener-mockup

Obviously, there should be also an option to suppress the confirmation window before the execution of each command, at the own risk of the user.

But it's only my opinion. If you implement the buttons in the toolbar, it will be also a good feature.

negora avatar Mar 22 '16 08:03 negora

  • [x] Remove other dialogs (everything can be mapped using this custom dialog)
  • [ ] add positioning attributes to prevents warning in the log
  • [x] Add custom entries to toolbar presenter popup entries
  • [x] Add custom entries to menu bar
  • [x] Rework/Simplify options
  • [ ] Allow reordering of actions
  • [ ] Deleting entries should remove shortcuts and toolbar entries
  • [ ] Escape names
  • [x] Provide no reimplementation of tooling to define Shortcuts/Toolbar entries, let the user use the dialogs of NB
    • [x] Add hinting label to dialog, that Shortcuts can be defined at xxx
    • [x] Add hinting label to dialog, that Toolbar entries can be added via xxx

markiewb avatar Mar 27 '16 11:03 markiewb