I'm having two problems with STS running grails, posting them together because I think they could be interrelated.
1. STS sometimes does not resolve domain classes. I get the typical red cross saying "Groovy:unable to resolve class ...", e.g. when working in a controller, although the domain classes and the controller are in the same package. The strange thing is that these errors disappear when I do the following: In the Project Properties, I add an arbitrary exclusion to the domain class source folder, e.g. "xyz". After leaving the dialog, the project refreshes and the errors are gone; then I can also remove the dummy filter again. Only when I start working in (i.e. editing) classes again (not only controllers but also test cases etc. which all share the same package), STS starts adding the cannot resolve errors within the classes I work on. I can also remove the errors by using the full package and class name, but I think that's not a clean solution for classes within one package.
2. Although I've successfully set breakpoints already and executed grails in debug mode, I'm currently having problems again setting breakpoints in the right line. I double click on the left side of the editor window, but the breakpoint appears in another line than the one I was clicking at.
Maybe those are both just symptoms of some deeper problems compiling my code in the background, however the grails application runs correctly and I think package and class namings are ok.
Thanks in advance for any help, and P.S. grails rulez!


Reply With Quote
