Skip to content

Always enabled actions

kinkadzs edited this page Jul 16, 2012 · 10 revisions

Back to Index

Launch a custom command...

At any time you can click on this action icon  that you can find in the plugin toolbar. This action is the one i like most of the plugin and allows you to build and run your custom command on any file adding extra power to NetBeans. When you click on the button the following dialogue shows up:

Terminal action 

What you see is a dialogue where you can type the command you want to launch. The plugin automatically detects your operating system and gives you the option to add the prefix to the command. You can type whatever you want in the text field and that will simply gets executed (after a confirmation). But there are a couple of extra that really adds power and saves you a lot of time in your daily work.

In particular you can add parameters to your command:
You can fill your command to a total of 6 parameters that you can set at execution time. For example, if you have a ${param1} in your command, at execution time you can type the parameter in the text filed (1 in the screenshot) or click on the near button "file" (2 in the screenshot) to open your currently selected files or your favourites. Terminal action 

Once you have done that simply click on the ok button to execute the command. In this example I am copying the selected file to a paricular location. That location in this example would have been my backup folder, but i could have chosen any location.
Also, available by default there are parameters that will be bound automatically without the need to set them, this "special parameter" are:

  • ${currentFile} the file associated with the current selection
  • ${currentFolder} the folder associated with the current selection

Considering this, in the example the following command will be executed:
_**cmd /c start copy C:\Users\sessonad\Documents\QuickOpener-NetBeans\QuickOpener-NetBeans\QuickOpener\src\com\sessonad\quickopener\actions\popup\DialogCustomCommandRun.java C:\Develop\backup**_

It saved me a lot of time just typing the command! Now that you know how it works you can write your own commands, the limit is the fantasy and the number of parameters (6 for the moment) but be careful: I am not responsible if you format your entire hard drive!!!

Open FileSystem in...

At any time you can click on this action icon  that you can find in the drop down button of the toolbar. This action will allow you to open your file system browser in any location of your choice.

Terminal action 

Obviously you can type the location that you want to open manually directly in the text field, but you can also select some pre-determined locations (just click on any blue text to set the path), in particular, referring to the screenshot:

1. The folder associated to the currently selected node. Note that this path will be available only if there is a valid selection, and if the selection has a file associated with it. Also a valid selection is set to be valid when only one node is selected in the package or file explorer.
2. The root folder of the main project. Note that this path will be available only if the main project has been set in your NetBeans session.
3. The NetBeans settings folder. This path will always be available.
4. A custom, set in favourites, location. This path is part of my settings, and is just a folder where I like to keep my temporary backups of my java files. So, to access this folder in no time, an action that I do several times a day, I can just click on this path and press the ok button. My file system browser will open on this location and I am able to select a backup.
5. Another custom, set in favourites, location.
6. Another custom, set in favourites, location.
7. Another custom, set in favourites, location.

There is no limitation on the number of favourites location you can have, please view the page Preferences and settings to see how to add favourites location. Also scroll over the little blue "i" icon for a quick tip.



Open shell in...

At any time you can click on this action icon  that you can find in the drop down button of the toolbar. This action will allow you to open your file system default shell in any location of your choice.

Terminal action 

Obviously you can type the location that you want to open manually directly in the text field, but you can also select some pre-determined locations (just click on any blue text to set the path), in particular, referring to the screenshot:

1. The folder associated to the currently selected node. Note that this path will be available only if there is a valid selection, and if the selection has a file associated with it. Also a valid selection is set to be valid when only one node is selected in the package or file explorer.
2. The root folder of the main project. Note that this path will be available only if the main project has been set in your NetBeans session.
3. The NetBeans settings folder. This path will always be available.
4. A custom, set in favourites, location. This path is part of my settings, and is just a folder where I like to keep my temporary backups of my java files. So, to run a command in this folder in no time, an action that I do several times a day, I can just click on this path and press the ok button. My shell opens up on this location and I am able to run a previously save jar.
5. Another custom, set in favourites, location.
6. Another custom, set in favourites, location.
7. Another custom, set in favourites, location.

There is no limitation on the number of favourites location you can have, please view the page Preferences and settings to see how to add favourites location. Also scroll over the little blue "i" icon for a quick tip.





Back to Index

Clone this wiki locally