Bug 48192 - Code completion mistake
Summary: Code completion mistake
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-05 17:54 EST by Emerson Cargnin CLA
Modified: 2004-05-12 10:49 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emerson Cargnin CLA 2003-12-05 17:54:52 EST
When you type class (inside a class) and '.', code completions shows all the
methods of the current class.which are sintaticaly wrong.
Comment 1 Dirk Baeumer CLA 2003-12-08 04:26:39 EST
Code completion is computed by JDT/Core.
Comment 2 Philipe Mulet CLA 2003-12-08 05:26:29 EST
Can you please provide: build number, and exact steps to reproduce ?
Comment 3 David Audel CLA 2003-12-08 06:26:58 EST
I can reproduce this behavior with the following test case
public class A {
  void foo() {
    class.<cursor>
  }
}

In this completion 'class.' is ignored because it is syntaxicaly wrong at this 
location. So the completion engine considered source as
public class A {
  void foo() {
    <cursor>
  }
}
The result is the same with code like
public class A {
  void foo() {
    for.<cursor>
    #.<cursor>
    =.<cursor>
    =<cursor>
  }
}

Currently this behavior is considered as correct. Perhaps it can be improved.
What kind of behavior do you expect with this test case ?
Comment 4 Emerson Cargnin CLA 2003-12-08 09:26:35 EST
that's ok, I didn't tested with other characters. I thought eclipse couldn't 
show completions for wrong statements.
Thanks for your attention
Emerson
Comment 5 David Audel CLA 2004-05-12 10:49:14 EDT
Closed