Wednesday Feb 20, 2013

Fast imports in groovy files

Good news everyone,

the bug fixing phase for NetBeans 7.3. has ended and that means I can finally work on some new and surely awesome features in groovy area. Today I would like to show you first of them called "Fast imports". The meaning should be known for everyone using our Java support. For example you have a class GalacticMaster in package "masters" and you need to use instance of GalacticMaster somewhere else, say in MasterUser class from package named "users". Now you type something like "GalM", use code completion which results in completing GalacticMaster and NOW the big news --> it automatically adds the import statement into the file. Until now you would have to use either "Fix imports" action or import hint provided by NB to resolve missing imports. But now everything is done automatically and thus you don't need to take care of imports at all. Hope this will make your groovy coding a little bit easier again..

And that's all for today. If you are interested in trying the feature, you need to use one of our daily builds [1].


Monday Oct 22, 2012

Groovy Refactoring in NetBeans

Hi guys,

during the NetBeans 7.3 feature development, I spend quite a lot of time trying to get some basic Groovy refactoring to the game. I've implemented find usages and rename refactoring for some basic constructs (class types, fields, properties, variables and methods). It's certainly not perfect and it will definitely need a lot fixes and improvements to get it hundred percent reliable, but I need to start somehow :) I would like to ask all of you to test it as much as possible and file a new tickets to the cases where it doesn't work as expected (e.g. some occurrences which should be in usages isn't there etc.)'s really important for me because I don't have real Groovy project and thus I can test only some simple cases. I can promise, that with your help we can make it really useful for the next release.

Groovy refactoring showcase

Also please be aware that the current version is focusing only on the .groovy files. That means it won't find any usages from the .java files (and the same applies for finding usages from java files - it won't find any groovy usages). I know it's not ideal, but as I said.. we have to start somehow and it wasn't possible to make it all-in-one, so only other option was to wait for the NetBeans 7.4. I'll focus on better Java-Groovy integration in the next release (not only in refactoring, but also in navigation, code completion etc.)

BTW: I've created a new component with surprising name "Refactoring" in our bugzilla[1], so please put the reported issues into this category.


Monday Sep 03, 2012

Groovy support in Java EE projects

As requested in the issue 144038, I've implemented support for Groovy in a Java enterprise projects. You should be able to combine Java/Groovy files, run them and thanks to the new Groovy JUnit tests support you can also run groovy tests together with your existing Java tests.

I hope it will make your enterprise development (and especially enterprise testing) easier and more productive.

Note: The changes will be propagated to the NetBeans daily build in a few days, so please stay in touch!

Thursday Aug 30, 2012

New items in the groovy context menu

Todays news will be pretty short. I've added few important items (Run File, Debug File, Test File and Debug Test File) to the .groovy context menu. Although it was possible to run or debug single file even in current version, it wasn't easy to find out how to do that. Now it is possible in the same way as for java files.

Have a nice day..

Tuesday Aug 28, 2012

Groovy JUnit test support

Good news everyone!

I've implemented support for the Groovy JUnit tests which basically means you can finally use Groovy in the area where is so highly productive! You can create a new Groovy JUnit test in the New File/Groovy/Groovy JUnit test and it should behave in the same way as for Java tests. Which means if there is no JUnit setup in your project yet, you can choose between JUnit 3 and JUnit 4 template and with respect to your choice the project settings will be changed (in case of the Maven based projects the correct dependencies and plugins are added to the pom.xml and in case of the Ant based project the JUnit dependency is configured)...... 

[Read More]

Monday Apr 23, 2012

Grails performance improvement

I have a great news for everyone using Grails framework!

Thanks to Tomas Zezula, we were able to improve initial indexing of the Grails based projects. This was one of the biggest problems in our Grails support and the speed improvement is really amazing. Of course it has also impact on Groovy projects, but since the large Groovy projects (few thousands of files) are quite rare it's not as important as for Grails users. I would like to ask everyone using the Grails framework in the NetBeans to test those changes in the latest-greatest daily build and provide some feedback (it's definitely possible that it might also caused some regressions, so please report any suspicious behavior as soon as possible).

Daily build could be downloaded here:

Wednesday Mar 28, 2012

Grails project structure

Good news everyone!

I've changed the structure of the Grails project as requested in the issue 160028 and it should be much more user friendly than before. There are actually two things I've fixed/implemented. First of all the source folders are finally represented in the same way as for the Java projects (which means instead of the folder based structure it uses package based structure). The difference can be seen on pictures bellow:

   Folder based structure:                                                 Package based structure:

Folder based structure Package based structure

Second, minor and quite related change could be seen on those pictures too. There are different icons for different structures. For example Views and Layouts items are folder based, Domain Classes are package based and so on.

Monday Mar 19, 2012

Fix import hint

Good news everyone!

I've implemented 'Fix import hint' which should make your life (and most probably also the groovy development) much easier! It looks in the same way as in Java editor, so you might choose between classes with the same name.

Hope you will enjoy it! And as usual if you would like to try it on your own, download the latest development build and I will be more than happy for every feedback!

Thursday Mar 15, 2012

CamelCase completion

Hello everyone,

first feature I would like to show you is a CamelCase completion. You've most probably already used it in the Java editor and now it is possible to do the same in the Groovy editor! For those who don't know what exactly is meant by CamelCase completion, short example follows:

Let's say we have two classes GalacticMaster and SuperGalacticMaster. Obviously SuperGalacticMaster needs to subclass GalacticMaster. With CamelCase completion we can do:

..and as you can see editor correctly propose our GalacticMaster (because Galactic starts with 'Ga' and Master starts with 'M'). Similarly SuperGalacticMaster might want to build some Strings (how else he would become SuperGalacticMaster, right?):

..and again we can choose whatever we want to complete.

And that's all for today. If you would like to try the CamelCase completion on your own, download the latest development build and I will be more than happy for every feedback!


This blogs is written by NetBeans developers who contribute to the Groovy support mainly.


« July 2016