Classpath incomplete in IJavaProject#findType [message #148262] |
Fri, 12 March 2004 06:40 |
Eclipse User |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
Hi!
I'm having a problem with the classpath of a project. We have our own
project nature attached to projects and created several classpath containers
plus a managed IVMInstall entry based on the standard JDK
(StandardVMInstallType).
We use JDT API to find a specific typ (IType) in the build path
[IJavaProject#findType(String)].
Now the problem: when I close and reopen a project in workspace, we listen
for resource changes and update our model if a project is opened. In this
case, the IType cannot be found.
During debugging I discovered, that the classpath is incomplete. It only
contains IPackageFragmentRoots from the JRE container and from some other
containers (managed by us). The entries of one specific container are
missing.
When I expand this container in the Package Explorer, then it correctly
resolves and shows the missing entries. But I can refresh my model several
times, the entries are still missing.
If I call IJavaProject#getResolvedClasspath(false) before
IJavaProject#findType I get the complete classpath and the container is
correctly resolved. But the type is still not found.
Now the part I don't understand. If I right click the project in the Package
Explorer and select "Properties" to bring up the "Java Build Path"
properties page, and immediately click OK to close this window after
bringing up (ONLY SHOWING) the "Java Build Path" properties page, and then
refresh my model again, the type is found by IJavaProject#findType(String).
What is going on here? Anybody knows what happen and how I can work around
this (IMHO) bug?
Thanks,
Gunnar
|
|
|
|
Powered by
FUDForum. Page generated in 0.02916 seconds