Why eclipse doesn't see implemented interfaces?
Asked Answered
B

2

9

I've imported jfreechart-fse from here: https://github.com/jfree/jfreechart-fse and I've imported this to eclipse as maven project.

After that, I have many problems, for example in class ChartPanel in org.jfree.chart paskage, eclipse doesn't see "implements" section, and notice

@Override
    public void actionPerformed(ActionEvent event) {...}

as a problem. The same situation is in many other cases.

Can you tell what is wrong with that?

Brenna answered 7/6, 2013 at 12:13 Comment(4)
What about eclipse restart? It doesn't help?Huck
Get a better IDE - IntelliJ.Thymelaeaceous
I don't know this API but can there be any import conflicts?Insectarium
Tested on eclipse indigo, juno. Restart doesn't help.Brenna
P
2

Change version of java to 1.7. It resolves most of errors (errors still appear only in test directory in package-info.java files). Maven can build project successfully.

In eclipse you can change java version in project properties in Java Compiler tab or in properties of JRE System Library in your project tree.

Poling answered 7/6, 2013 at 12:17 Comment(0)
P
1

pom.xml doesn't declare java version for maven compiler plugin.

J2SE-1.5 is used by default, and Override anotation cannot be used for Interface implementation for this version.

Change Eclipse project configuration to use JavaSE-1.6, or fix pom.xml of project before importing:

<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.0</version>
  <configuration>
    <source>1.6</source>
    <target>1.6</target>
  </configuration>
</plugin>
Pothunter answered 7/6, 2013 at 12:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.