7

I have bunch of groovy scripts in various directories (not necessarily netbeans/maven project dirs). I have been using Notepad++ and Netbeans to create/edit these scripts. I favorite the directories containing scripts in NB so that I can open it in NB (from the favorites tree) without having to have a java project. I usually fire-up cygwin thorugh putty-cyg to execute/test these scripts. Netbeans offers a decent terminal as well within IDE where i can issue commands without ALT-TAB'ing the IDE and Putty-Cyg. All is working nicely.

Just thought how nice it would be if I could have a Run Script in the context menu where I can run a script (and optionally it may ask for scripts arguments too). This would save a lot of ALT-TABing and cd'ing into scripts directory and typing groovy scriptname.groovy.

  1. Can anyone suggest any plugin that allows me to do so?
  2. If I have to write my own plugin for that same task, how should I start? (I checked out nb plugin/platform docs, its overwhelming).
  3. If someone is in same situation as I, feel free to share experiences.

pros/cons of NPP : fast / no auto-complete, its not IDE, no lang support for groovy

pros/cons of NB : everything at one place, lang support, somewhat auto-completes for groovy/ bit sluggish, takes time to start up, you must be in java (ant/maven) project directory to reap most of IDE benefits

Eclipse support is okay but it does not do what i am asking above. I am downloading IDEA community edition to check its support. (UPDATE: Nope it doesn't. I tried it)

1 Answer 1

3

I feel your pain. I don't know if this is the best solution but this is what my team has done.

GroovyConsole Groovy does come with a handy tool called Groovy Console where you can quickly play around with scripts. This is our primary tool if we want to quickly create or edit scripts. We setup our workstations to open all .groovy files in the Groovy Console which makes it painless and easy to test. It doesn't have code completion which is fine for us because it's a dynamic language and it doesn't really help; in most cases it just slows you down waiting for the suggestion to pop up anyways (NetBeans).

Existing NetBeans Plugin Here is a plugin for NetBeans that brings the Groovy Console inside the IDE. I haven't used it so an can't really speak for it but it seems like it could be useful.

Creating your own Plugin I've built a couple NetBeans plugins before and the first one is always the hardest because you can't just dive in and creating one. You'll really have to read the documentation to understand how things work. Don't try to just 'figure it out' (speaking form experience!).

Hope this helps!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.