Bug 44884 - Wrong list displayed while code completion
Summary: Wrong list displayed while code completion
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 45000 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-15 06:34 EDT by Frederic Fusier CLA
Modified: 2003-11-21 07:12 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2003-10-15 06:34:36 EDT
Open a new project a create a new class X:
public class X {
  void foo() {
  }
}

Create a new class Y:
public class Y {
  void foo() {
  }
}

Modify class Y as follow:
public class Y {
  void foo() {
    StringBuffer buffer;
    StringTokenize
  }
}
when I launch the completion after "StringTokenize" then I get following list:
- StringTokenizer - java.util

Modify now class X (no matter what the modification is) but DO NOT SAVE it.
When I come back on class Y an relaunch the completion after "StringTokenize", 
then I get following list:
- StringTokenizer - java.util
- X(default package)

I would not expect X as a valid completion...
It seems that in the list now appears all the current class on which an editor 
is opened and dirty...
Comment 1 Jerome Lanneluc CLA 2003-10-16 09:29:38 EDT
*** Bug 45000 has been marked as a duplicate of this bug. ***
Comment 2 Jerome Lanneluc CLA 2003-10-31 10:01:39 EST
Changed SearchEngine.searchAllTypeNames(...) to filter types in working copy 
based on the given pattern.

Added regression tests WorkingCopySearchTests.testAllTypeNames3() and 
testAllTypeNames4()
Comment 3 David Audel CLA 2003-11-21 07:12:54 EST
Verified.