dzsessona / QuickOpener-NetBeans

Sometimes while programming in NetBeans you want to explore a particular file that you are editing on the file system browser, or maybe launch a command in a terminal to do something with it.
52 stars 41 forks source link

Launch custom commands directly from Menu Item or Dropdown #59

Open dkirrane opened 8 years ago

dkirrane commented 8 years ago

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?"

Git-GT commented 8 years ago

+1 Hi dkirrane I agree with you.

markiewb commented 8 years ago

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

mikbox74 commented 8 years ago

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

negora commented 8 years ago

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

markiewb commented 8 years ago

Adding actions at runtime is technically possible.

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

This allows to

markiewb commented 8 years ago

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

Git-GT commented 8 years ago

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

markiewb commented 8 years ago

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 commented 8 years ago

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

dkirrane commented 8 years ago

@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 commented 8 years ago

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

negora commented 8 years ago

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.

markiewb commented 8 years ago