Is there a way to get Eclipse to understand Java 13 features, such as text blocks? Eclipse reports errors for the following code:
class Main {
private String text = """
first line
second line
third line
""";
}
Errors include:
first cannot be resolved to a type
Duplicate field Main.line
I suspect the problem is the combination of Eclipse and Java 13 in general.
Building with Maven succeeds (with appropriate --enable-preview
config). The "installed JRE" in use is Java 13 (with --enable-preview
as default VM argument). Installing Java 13 Support for Eclipse 2019-09 doesn't seem to help either (doesn't add the Java 13 compliance level option).