Drag and Drop support for Script Console
By chuk on Apr 13, 2007
My original scripting plugin provides a scripting plugin has a console but it requires you to type in at the console. If you make a mistake you have to type again.
To make it more convenient for the user, I made the console accept drop items; you can either drop a script file or a code snippet on to the console. First open the console Script -> Script Console -> <select your favourite script console>; then you can do one of the following
- Highlight and select any text from NetBeans editor. The drag and drop the selected text onto the console. The console will now execute the text.
- Finally you can perform the above 2 operations on files outside of NetBeans. So if you drag files from say Konqueror or from a text editor and drop that onto the console, the console will know what to do with it.
I am sure that I've not covered all the possible MIME types so let me know if you you find something that does not work. I've tested on Solaris and Linux but not on Windows and Mac. You can find the MIME type either from the terminal that you started NetBeans or from NetBeans' log files.
One final thing; the plugin requires JDK 6 so NetBeans must be running on JDK 6. Otherwise it will not work.
The binaries can found here. I'm going to try to check the sources into http://scripting.dev.java.net site.
I was at St Petersburg this week for Sun's Techdays. This is my first trip to Russia. The city is beautiful. However it is a bit cold for me; in Singapore, any thing below 28C is consider cold. I did however get to see snowfall for the first time in my life. Unfortunately I was not able to get a picture of me frolicking in it as I was working.