[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] part of an import statement not resolved

This situation manifests as an import statement that is only underlined half-way. For example the line:

import formatter.common.Parser;

In one of my projects, this line has "formatter" underlined in red, and when I "hover" over the word "formatter", the error message says "the import 'formatter' cannot be resolved". As a side note, the code compiles without an actual error showing up in the "Problems" panel. This only shows up in the actual source code editing window. I have also noticed that in this case, the package "formatter" will not show up in the "packages" panel. I have only seen this error happen when the package has no .java files in it. I haven't found anything in the known bugs for Eclipse that says it cannot handle empty packages.

This may or may not help, but I have a very long classpathentry in my classpath file. The reason for this is that there are a lot of files in my team's source tree that caused Eclipse to run out of memory the first time we tried to compile everything in one project. Our solution was to edit the .classpath files of the individual projects, so that each application's project would only try to compile the source code it needed for that application. As a result the .classpath file has lines like this:

<classpathentry including="/formatter/common/Parser.java|/communications/BasicKeyValue.java|/communications/GenericCommHandler.java|/communications/GenericCommHandlerKeyValue.java|formatter/ADisplay/ADisplayDriver.java" kind="src" path="source"/>

If you need more elaboration on this let me know.