Community
Participate
Working Groups
Build ID: I20061214-1445 (3.3. M4) Steps To Reproduce: This seems to have stopped working in M4 for me. Add a reference to an object that's not in this object's package. Organize imports doesn't generate the import line (even though I have the option checked to generate an import rather than a qualified name). Add Import doesn't do anything. Further, Open Type cannot find the type. Even so, I can do Open Declaration. More information: In my workspace I have about 10 different projects. Two are Base and Builder. I go down into Builder, into com.blah.e.upgrade.objects.Foo.java, and in a method I add CopyHandler ch = null; The CopyHandler object lives in com.blah.e.upgrade.copy. I am flagged that this object cannot be resolved. So I organize imports, but nothing changes...no import is generated. Add Import does nothing either. Note that I can Open Declaration on CopyHandler, and it'll go right to it. If I go to the import area and start typing "import com.adp.e.upgrade.copy", then CopyHandler pops up in the list as an option. In spite of this, if I do Open Type, and enter *Copy, CopyHandler does not show up in the list. I can see all sorts of *Copy objects that are coming from the libraries linking into this project, but nothing from this project nor other projects in the workspace.
I should have mentioned that if I go type in the import manually, all if fine. SO the object does really, truly exist.
Did you add a type filter (Preferences > Java > Appearance > Type Filters) for the package com.blah.e.upgrade.copy? I could not reproduce this problem. Can you reproduce in a fresh workspace? How are Base and Builder related (e.g. via PDE's manifest files, as required project on the build path, ...)?
I do not have a filter. It's empty. I created a new empty workspace and imported the existing projects into it. I recreated the problem in that way. But these projects have been around a long time, so I suspect the problem is there. (I've seen several issues in working with older, imported projects. We do a lot of that.) The projects are related as required projects on the build path. Note, though, that all the troubles are within a single project.
Looks like a dup of bug 169881. Please check whether I20070208-0010 fixes your problem.
Yahoo. That resolved it. Marking as a resolved dupe. *** This bug has been marked as a duplicate of bug 169881 ***