[go: up one dir, main page]

Menu

#80 Enums are not correctly handled (included suggested fix)

2.0.0
closed
None
5
2017-03-27
2017-03-27
Anonymous
No

Enums are not correctly handled

They are listed as fields and shown as unused, even if they are used.

I ran into a similar issue working with the Eclipse JDT, which was related to the JDT compiler options by default using 1.4, before enums existed. The fix that worked in my project was to call the following on my compiler options

JavaCore.setComplianceOptions(JavaCore.VERSION_1_8, compilerOptions);

I'm also using the AST.JLS8 level for the parser, so it can handle reading Java 1.8 code.

I'm using version 3.12.2 of the dependency "org.eclipse.jdt > org.eclipse.jdt.core".

Discussion

  • Joerg Spieler

    Joerg Spieler - 2017-03-27
    • status: open --> closed
    • assigned_to: Joerg Spieler
    • Priority: 1 --> 5
     
  • Joerg Spieler

    Joerg Spieler - 2017-03-27

    Just testet with eclipse Neon.3 Release (4.6.3). Everything works fine.

    I think it is a problem of your default compiler settings in Eclipse.

    UCDetector will not JavaCore.setComplianceOptions() because it seems to change the default settings of of Eclipse.

     

Anonymous
Anonymous

Add attachments
Cancel