Bug 161719 - [model] jar file refresh does not update content assist
Summary: [model] jar file refresh does not update content assist
Status: VERIFIED DUPLICATE of bug 162621
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-20 09:43 EDT by Thorsten Wärtel CLA
Modified: 2007-01-16 03:58 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 Thorsten Wärtel CLA 2006-10-20 09:43:09 EDT
I am using two projects: A and B. Project B uses some classes from project A, contained in a jar file, which is in the classpath of project B.

If I remove a method from one of project A's classes, build a new jar file and copy the new jar file to project B, I still can see the removed method in the content assist list for the changed class. 

A refresh was automatically done, because I instantly (auto build on) get a compilation error, if I referenced the removed method in project B. Explicit refresh or clean project does not help, the content assist list is only updated when I restart eclipse.

The same problem exists, if I add a method to one of the classes and copy a new jar file to project B. And this is, where it gets annoying: I cannot see any new methods from my newly built jar file, so content assist is quite worthless in this case.

Bug seen in 3.2.0 and 3.2.1, had worked correctly in 3.1
Comment 1 David Audel CLA 2006-10-25 05:07:52 EDT
This problem isn't only a code assist problem. The reconcile suffer from the same bad behavior.
Codeassist and reconcile use a SearchableEnviroment which use a NameLookup.
The problem seems to come from the NameLookup which return classes of the old version of the jar.
Comment 2 Thorsten Wärtel CLA 2006-10-25 07:34:21 EDT
One of my colleagues found a workaround to get the new classes without having to restart eclipse:

If you remove the jar from the buildpath and add it again, the problem is gone. Since you can just right-click on the jar in package explorer and do a "build path->remove from build path" followed by a "build path->add to build path", this is far less inconvenient than having to restart eclipse.
Comment 3 Thorsten Wärtel CLA 2007-01-11 08:18:30 EST
Any news on this? Will it be fixed in the upcoming version 3.3?
Comment 4 Frederic Fusier CLA 2007-01-11 09:47:09 EST
We missed this bug as a duplicate of an already existing one...
So, it's fixed since 3.3 M4 and also will be in 3.2.2...
If you urgently need this fix for 3.2 you can get the 3.2.2 preview there:
http://www.eclipse.org/jdt/core/r3.2/index.php#UPDATES


*** This bug has been marked as a duplicate of bug 162621 ***
Comment 5 David Audel CLA 2007-01-15 12:22:21 EST
Verified for 3.2.2 using build M20070112-1200