Saturday Jul 18, 2009

Groovy and Grails related changes in trunk

In this post I'll provide you update on recent changes that happened in NetBeans. These changes will be available in 6.8 M1.

The most important thing fixed in trunk (and in 6.5.1 as well) is a regression 161176 causing "unresolved class" problems when Groovy class was referenced in Java.

Other great improvement is much better code completion for variables and parameters. As picture is worth a thousand words, compare the following two pictures.

Variable code completion in NetBeans 6.7:


Variable code completion in trunk:


There is now brand new mechanism to properly stop the process tree. It is used for Grails and seems to be much better than previous solution. It even works without admin privileges (at least on Vista). Please report any problem you find.

As there were many requests for Groovy 1.6 support it is finally available in trunk. The integration also supports AST transformations. See code completion on the next picture.


There is also couple of minor fixes and improvements. The work is not finished of course. These are just most important changes for upcoming M1. Let us know what you think.

Tuesday Jun 30, 2009

NetBeans 6.7 Released

Yesterday NetBeans 6.7 was finally released. There was no significant improvement since in Groovy area since my last post as we were in stabilization period. You can see the complete list of new features in New and Noteworthy document for 6.7.

Unfortunately there is one defect in the new Parsing API influencing integration of Groovy into Java (the opposite way is ok). This will be fixed in a patch that should be released in couple of weeks. Fix is already present in trunk build.

Wednesday May 06, 2009

NetBeans 6.7 Beta Status

As you have probably noticed the NetBeans 6.7 Beta is out. Do not expect any new features. Now we are doing stabilization fixing all the remaining bugs we know about. Here is just a plain list of important fixes.

  • Parser performance improved
  • More accurate code completion for fields
  • Removed synthetic elements from navigator
  • Navigator emphasizes element being edited
  • Stopping Grails on Windows; missing cases fixed
  • No dynamic methods derived from domain's static properties
  • Couple of other minor issues fixed

Would be great if you could test it and report any other bugs.

For those who would like to test new features I have one bad and one good message. The bad one is that no such feature can appear in main repositories until end of the May (roughly). The good one is that I already have a patch for much better code completion for parameter and variables (patch attached to issue 159463) and I'm experimenting with groovy expressions in debugger.


Thursday Apr 02, 2009

Groovy and Grails in NetBeans 6.7 M3

The last milestone of NetBeans 6.7 is out. What has been improved and fixed in Groovy and Grails area? Read below.

The biggest change is that we changed our parsing and indexing infrastructure. This should unify the code across different languages and solve several Groovy and Java integration issues. As you can imagine this is quite a big change that does not affect Groovy only. So if you are going to use M3 or daily builds please let us know any bug or incorrect behavior.

The first visible enhancement (as opposed to previous which should be ideally invisible) is the Grails 1.1 support. Now you can install and uninstall plugins while seeing the proper code completion, relevant parsing errors etc.

This should work even in case you override some of the default settings in BuildConfig.groovy. For this purpose there is Resolve Plugins action in context menu of the project. You need to execute this action only if you are using non default values and you've opened the project for the first time or you've changed the values recently. The reason why this is not done automatically, although it would be possible, is that BuildConfig.groovy is in fact a script that has to be evaluated. The IDE can't be sure what are the side effects of such script so we decide to choose the conservative way of conscious action.


Perhaps we could add a download of missing plugins as a part of this action. It would be useful after VCS checkout. What do you think? Let me know.

Another related change is overall context menu cleanup as you can see on the following picture.


Now you can also assign shortcut (although there is none by default) to Run Grails Command action. This will certainly make you very effective. I think the usage of shortcut and command dialog is even faster than the console typing.

Another important improvements were made in wizards. You can now configure your Grails installation directory directly from the project wizard. This is especially useful for new users and when using the fresh IDE installation.


Artifact (domain, controller, service, etc.) wizard was improved as well. It was cleaned up and fixed so now you can finally easily create the artifact including the package easily.


In previous releases you might run into problems while stopping the Grails application on Windows from the IDE. This was fixed with great help from Lloyd Meinholz. So running and stopping the application from the IDE should be quite comfortable now.


Also many other minor fixes were made. For example dynamic finder code completion should be now properly displayed even when the domain class is not in the default package.

Unfortunately, as always, not all interesting changes made it to M3. Several performance improvements were made just after M3. Thanks to Göran Ehrsson for valuable reports. Also field code completion is now more accurate in daily build and Groovy file navigator was improved and fixed. As this is the last milestone and stabilization period starts the daily builds should more and more stable in future. In case you are interested in the latest features and fixes and/or you want to help us you can download daily builds from the NetBeans dowload page. If you even want a couple of minutes old builds with Groovy features integrated you can get a build from continuous build server.

Wednesday Feb 25, 2009

Groovy and Grails in NetBeans 6.7 M2

Today NetBeans 6.7 M2 was released (yes 7.0 is now 6.7). What are the new features you can use in Groovy and Grails development? Let's have a look.

First of all there is a couple of enhancements in properties of the Grails project. Now you can disable the browser opening on project run (general category of project properties).


Another improvement in project settings allows ou to configure the JDK. You can easily configure the required JDK in libraries category.


One big improvement for Grails development is code completion for dynamic methods of domain class especially dynamic finders.


Code completion was also enhanced to work with method reference operator and safe navigation operator as you can see on the following pictures. This is usable in both Groovy and Grails of course. The next screenshot shows method dereference operator completion.


And another picture for safe navigation operator.


One feature which was missing in previous releses was the ability to run any Grails command not just those supported by the IDE integration. This was even more annoying in case you wanted to use custom script or command provided by a plugin. Now you can use context action to display the command dialog.


When invoked it displays the listing of all available commands and you can directly start typing the prefix of your command. Just by hitting enter you can run it. It would be even better and faster if the context action had a keyboard shortcut. This is not possible at the moment but planned for M3.


Other notable fixes are automatic classpath update on plugin installation (thanks Sven ;) ) and workaround for very very annoyning issue where the EDT was blocked on text selection.

I hope you'll like this.

Wednesday Feb 18, 2009

Grails Podcast Interview

Last week I was interviewed by Sven Haiges. Sven together with Glen Smith run the great Grails Podcast. They definitely do a good job for community. Keep up the good work guys!

Interview: http://www.grailspodcast.com/blog/id/121

Friday Dec 19, 2008

Groovy and Grails in NetBeans 7.0 M1

Long time has passed since my last post about Groovy support. In meantime I was intensively fixing and improving the support. I fixed various bugs and enhancements and Groovy support is getting better everyday. Short list:

  • Grails installed from debian package now supported
  • Grails plugin support works behind proxy
  • Wizards properly report failed Grails operation
  • Code completion for this and super
  • Find action fixed for GSP files
  • Navigation for Domain/Controller/View improved
  • Clean supported from contextual menu
  • Run for the script is available from contextual menu
  • Proof of concept implementation of code completion for controller dynamic methods


These are just notable fixes many other small issues were resolved. If you were not using daily builds you also get all the features mentioned in my previous post.

There are more features planned for M2. We are rewriting the Groovy support to brand new Parsing API. This should bring us significant performance improvements. We also want to enhance support of code completion for dynamic methods in domain classes.

Features already pushed to trunk which unfortunately didn't make it to M1 (and thus are present in daily build only) are per project configuration of JDK for Grails and option to disable browser opening on run.

Wednesday Oct 15, 2008

NetBeans and Groovy Enhancements

As promised in previous post several enhancements for Groovy were pushed to development version of NetBeans.

The major change is that the plugin now supports (and uses) Groovy 1.5.7 which contains several important bugfixes. Other areas improved in code completion:

  • More accurate code completion on dot
  • Return types displayed in code completion are now accurate (including generics)
  • Removed duplicate entries
  • Correctly displayed method access level
  • Field icons correspond to modifiers
The next thing in code completion area I would like to address is better support for Grails controllers.

Saturday Oct 04, 2008

Groovy Code Completion in NetBeans

There were significant improvements in code completion for Groovy in NetBeans during the last few days. The code completion is now more accurate and reliable.

It provides the correct suggestions for methods and fields of statically typed variables, literals and collections. The correct code completion is now provided for these types inside if and for statements and other places. Also the simple type inference now takes place when using the latest development builds.

You can also see some visual enhancements such as better representation of method access level and return types.


Certainly there are areas to improve, such as completion of unparsable code fragments and extended type inference. Try the improvements for yourself. If you want to help us make it better, report the code fragment which provides the wrong results to issuezilla (component groovy). We can easily turn such fragment into a test cases and fix them.

This is just the beginning. More enhancements coming soon.

About

Petr is a NetBeans software engineer responsible for the Groovy & Grails support.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today