tags:

views:

55

answers:

1

I am having issues with IBM's AST (which is based on Eclipse 3.2) importing files. For example, I have a class file named "Status" in the following package: com.test.model

When I give another class in the project the following statement:

import com.test.model.Status;

the IDE complains that it cannot resolve the import.

There are no errors on the file that is being referenced.

If I remove the import statement and try to use the Status class, the IDE gives an error about the missing reference (as expected). When I click on the error icon to insert the reference to the class file, com.test.model.Status is the first selection.

So, the system cannot find the file, yet it can find the file.

Thoughts?

+1  A: 

That does look like a metadata workspace update issue.
This is usually taken care of with:

  • a project clean operation (which you did): that is enough if it is only the incremental builds that got messed up.
  • deleting and re-importing the project (you delete only the workspace metadata of the project, not its content): that works best of the .project and .classpath are not within the workspace, but in an external (to the workspace) directory, along with the sources of the project
  • re-launching eclipse with a '-clean' option to reset the workspace perspecitve (in case of a plugin side-effect)
VonC