This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 181381

Summary: Groovy editor improvements
Product: groovy Reporter: mclaassen <mclaassen>
Component: EditorAssignee: Martin Janicek <mjanicek>
Status: NEW ---    
Severity: normal CC: dusty
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows Vista   
Issue Type: DEFECT Exception Reporter:

Description mclaassen 2010-03-01 14:43:22 UTC
There are quite a few groovy bugs that have not been addressed.  I think that since groovy is being advertised as a feature of NB, it should meet some minimum editor requirements.  I appreciate the support that NB has for groovy, but it is pretty frustrating to actually use.

It seems like groovy was hastily done to fit it in a few releases ago, with the intention to go back and give it first-class support later.  I am anxiously waiting for "later" to come.

1) Automatic indentation

Say you have something like:
			if (it == null)
			println "Hello"
The line after the "if" should be indented.

In a closure, the automatic formatting in NB gives (as you type)
	list.each( {
			if (it == null)
			println "Hello"
Again, the line after the "if" should be indented.
Reformatting gives
	list.each( {
			if (it == null)
			println "Hello"
This puts the }) in a different spot.

2) Editing character insertion
			println "Hello"

Now, say you actually wanted to put "Hello!" instead of "Hello".  So with the cursor at the end of the line, delete the last " character and type !"
What will appear is:
			println "Hello""
This happens to me all the time, and it is drives me crazy.  The java editor handles this situation much better.

3) Goto declaration (maybe bug 154544)
This seems to work on methods in same class and for top level class libraries, but not for methods in those libraries.

For instance,  lets say there is a groovy library called Utils with a method foo().  Ctrl click in Utils will go to the Utils class, but ctrl click on will do nothing.
Comment 1 Martin Janicek 2011-12-12 13:17:17 UTC
Those are valid requirements. Setting TM --> 7.2 and I'll see if there will be enough of time to fix this. Especially the automatic indentation should be improved somehow.
Comment 2 dusty 2013-03-01 16:30:03 UTC
Just installed version 7.3 and disappointed to discover that even basic formatting is not working.

Is there any commitment to solve this problem in a minor release?
Comment 3 Martin Janicek 2013-03-01 17:15:51 UTC
(In reply to comment #2)
> Is there any commitment to solve this problem in a minor release?

I wouldn't say there is a commitment but I'm planing to improve formatter for the next release