Bug 173454 - Import and Open Type don't find objects
Summary: Import and Open Type don't find objects
Status: RESOLVED DUPLICATE of bug 169881
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-08 10:10 EST by David Witherspoon CLA
Modified: 2007-02-08 13:40 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Witherspoon CLA 2007-02-08 10:10:10 EST
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.
Comment 1 David Witherspoon CLA 2007-02-08 10:14:39 EST
I should have mentioned that if I go type in the import manually, all if fine.  SO the object does really, truly exist.
Comment 2 Markus Keller CLA 2007-02-08 10:37:29 EST
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, ...)?
Comment 3 David Witherspoon CLA 2007-02-08 11:10:58 EST
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.
Comment 4 Dani Megert CLA 2007-02-08 11:30:25 EST
Looks like a dup of bug 169881. Please check whether I20070208-0010 fixes your problem.
Comment 5 David Witherspoon CLA 2007-02-08 13:40:50 EST
Yahoo.  That resolved it.  Marking as a resolved dupe.

*** This bug has been marked as a duplicate of bug 169881 ***