Groovy-Grails Tool Suite (GGTS) content assist not recognizing basic groovy
Asked Answered
C

2

8

I have installed GGTS, on ubuntu and am trying to edit .Groovy files with the built in editor.

The autocomplete is extremely annoying because while it will recognize my domain objects i.e. my User class etc.. It doesn't recognize basic groovy, for instance I start typing "def" to define a variable then hit space and it will autocomplete to "Default", similarly if I try to type in "return" it autocompletes to "RETURN" while I am typing as soon as I hit space, which is very annoying.

Like i said it will recognize classes, so if I type def u = new User(), the User part will complete ok, but the problem is that the variable u I defined earlier isn't recgonized later in the code.

I hope you guys get my meaning... No idea how to fix it, short of not using the groovy editor and treating it as plain text. I even tried disabling content assist, but that didn't seem to work for some reason

Cindacindee answered 28/8, 2013 at 15:5 Comment(4)
Have you added groovy nature to your project?Figuration
Have a look at your Eclipse error log and attach any relevant errors.Objectify
I have the same problem, hitting escape stops the destructive autofill, but any answers would be appreiciatedMccall
@Emmesk Dosk Did you find an answer to this? I am still facing troubles with it.Only
Y
1

I was having this problem in GGTS 3.4.0.RELEASE today, and getting very angry with the situation.

Somehow my workspace had the "Auto activation triggers for Java" set to "_.abcd....z" (all the lowercase letters)

Window -> Preferences Java -> Editor -> Content Assist "Auto activation triggers for Java" set to just "."

This seems to have helped dramatically.

I'm still not sure what caused my workspace to have this setting.

Yerga answered 4/12, 2013 at 20:41 Comment(1)
I know this is an old post, but just in case you never found out: it's an "optimization" in STS/GGTS that you can apply on first-time startup among many other settings. I ran into the same thing a while back. Why they thought it was a good idea I do not know.Amortization
P
0

Make sure that you're in the Grails perspective; that can impact some of the Groovy/Grails features and how Eclipse (even GGTS) leverages them. You'll find the perspective button in the upper right. If you're in Java or Debug, odd things like this may occur.

Also, how are you creating and opening your Groovy files? Do you use the context menus or the Grails command prompt tool to issue orders like "create-controller"? If you're creating the files in some other way, try using those methods to generate them, and see if you get the same results.

Pharos answered 17/11, 2013 at 4:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.