Community
Participate
Working Groups
Consider following setup: foo.bundle: class Invisible { } bar.bundle: requires foo.bundle (WITHOUT reexport) class Visible extends Invisible { } client.bundle: requires bar.bundle (but NOT foo.bundle) class Client extends Visible { } In this case, JDT shows the following problem marker: "The type bar.bundle.Visible cannot be resolved. It is indirectly referenced from required .class files." I think this is indirect, because class Visible is visible and can be resolved -- this can be proven by writing Visible v = new Visible(); which works perfectly well. The problem is really, that a superclass of Visible can not be resolved. I think the error message should be like: "The type bar.bundle.Visible cannot be resolved. A required superclass is not on the classpath."
Can you please specify the build id you're using?
Build ID: I20080422-0800
Srikanth, please investigate if we can make the distinction when not being able to resolve the superclass.
Created attachment 157387 [details] testcase Here's a testcase to reproduce the problem.
(In reply to comment #4) > Created an attachment (id=157387) [details] > testcase > > Here's a testcase to reproduce the problem. Ayush, this doesn't quite "reproduce" the problem. This test case elicits the error message: "The type p1.Invisible cannot be resolved. It is indirectly referenced from required .class file" which in itself is reasonable cf the message in comment# 0. Could you closely align the test with what is described in comment#0 and attach a test ? If you are unable to reproduce the exact message, perhaps this issue is already fixed by another bug, post a patch with what you tried anyways -- Thanks.
Created attachment 159282 [details] plug-in projects Foo, bar and client Actually, even if i try to reproduce this using plugin projcts, i get the same error - The type foo.Invisible cannot be resolved. It is indirectly referenced from required .class files. I agree that it doesnt reproduce the problem as stated. The bug seems invalid in the wake of these observations.
(In reply to comment #6) I do think that at least one aspect of the bug is still valid, and I do think that your test cases correctly exhibit that problem aspect. From the original description, it was incorrect that the error said "cannot resolve class Visible" now it seems to say "cannot resolve class Invisible" which is correct, probably due to some other bug fix. But even with this issue fixed (so the message is technically correct), it remains a source of confusion is that the error message is not helpful. I'm changing the bug summary to indicate this. When I, as a Programmer, write code class Foo extends Visible { and see the error "cannot resolve class Invisible. It is indirectly referenced from required .class files" I neither know where or what class Invisible is, nor who references it and where. I also do not know how to resolve the issue (not checking whether a quickfix is available here). The error message would be more helpful if it said: "cannot resolve class Invisible. It is indirectly referenced from .class files required by superclasses of Visible." since the "extends Visible" is the location of the problem marker, it makes sense to have the error message specify how the error relates to Visible. > Created an attachment (id=159282) [details] > plug-in projects Foo, bar and client > > Actually, even if i try to reproduce this using plugin projcts, i get the same > error - The type foo.Invisible cannot be resolved. It is indirectly referenced > from required .class files. > > I agree that it doesnt reproduce the problem as stated. The bug seems invalid > in the wake of these observations.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.