[EAP15] Groovy / Grails JDK extensions not recognized?
Hi,
It seems that in the last couple of EAP 15 builds, various Groovy JDK extensions are not recognized? Like ".each()" method on lists, for instance. In normal methods many of these methods are underlined, to show they're not recognized, and in code annotated with @CompileStatic they turn red.
Strange enough, ".eachParallel()" and ".eachWithIndexParallel()" are offered as suggestions.
Also, indexing a Map gives compilation errors when using the @CompileStatic annotation.
The code is part of a Grails project using Grails 2.5.0 / 2.5.1, using Groovy 2.4.3 / 2.4.4
Is anyone else seeing this?
Kind regards,
--Tim
请先登录再写评论。
Hi Tim
Could you please provide snippet of code which is not recognized by IDEA properly?
Also I need contents of the dslActivationStatus.xml located in application configuration folder (https://intellij-support.jetbrains.com/hc/en-us/articles/206827437-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs/).
Regards, Daniil
Hi,
I have attached the requested configuration file, some dummy code, and a screenshot showing compilation errors and a code-completion popup demonstrating lack of expected methods.
I do not see these problems in IntelliJ 14, although I did have them in 14 EAP versions up to 14.0.2 if I recall correctly, however I didn't report on it then.
In the first EAP builds of IntelliJ 15 I did not see these issues either, they appeared in the most recent EAP builds.
NB: Actual compilation only fails on the lines with methods 'eachParallel' etc, for which the editor does not give any error messages!
Thanks for looking into this and please let me know what other information is required.
Kind regards,
--Tim van der Leeuw
Attachment(s):
CompilationTest.groovy.zip
dslActivationStatus.xml
Schermafbeelding 2015-08-17 om 15.03.44.png
I cannot understand the problem right now (seems to be something with Spring/Groovy integration), will investigate it later.
As a workaround, you can open this file "file://$APPLICATION_HOME_DIR$/plugins/Groovy/lib/standardDsls/extensions.gdsl" in editor, then you will see notification panel, and click on "Activate" link.
GDK methods are resolved using GDSL mechanism, and if it fals the file gets disabled, idk why it failed, but you can enable it back manually.
If the above workaround will not work, try to quit IDEA, remove the dslActivationStatus.xml, and start IDEA.
Hi,
I have removed the dslActivationStatus.xml file and it has not returned.
When opening extensions.gdsl file, I do not get a panel asking me to activate the file, so I assume it already is activated?
At first I was under the impression that it did not make a difference since errors in the code didn't go away, however when I started editing one of the files,then all errors disappeared so it seems the problem is, for now at least, solved.
Regarding the Spring integration, the error in the dslActivationStatus.xml: I have been getting these exceptions for quite a while already and have reported them several times via the build-in exception reporter.
Up to now they did not seem to cause Groovy method recognition to break. They do however from time to time cause the IDE to break in various ways, requiring a restart.
Anyway for now the problem seems resolved, and I have a way now to get proper functionality back. Thanks for that!
Kind regards,
--Tim van der Leeuw
You are right, any gdsl is activated until saved to dslActivationStatus.xml.
You are welcome!