How to set GWT facet's language level to 1.8

Answered

Hello,

We have a GWT 2.8.2 project with Java language level 1.8 (set by Maven).
Everything works correctly, the code compiles, runs, etc.

But Idea Ultimate 2020.3.2 keeps giving errors like: "Lambda expressions are not supported at language level '6' (configured by GWT facet)"
Although these errors are displayed only in the editor when a GWT Java class is opened (as I wrote, everything works as expected), they are very annoying when we edit GWT Java code.

Is there a way to let the GWT facet know that Java 1.8 features are safe to use even in GWT sources?

Thanks.

0
4 comments

Setting <sourceLevel>x</sourceLevel> works for applications, thanks.
But it's not a solution for GWT library projects (where the gwt-maven-plugin is not applied on the project).

0

I removed the GWT facet from the problematic GWT library project...

0

Just add `-sourceLevel 1.8` into the compiler parameters of the GWT facet.

0

Please sign in to leave a comment.