Bug 49363 - [typing] Perform automatic correction/completion during typing
Summary: [typing] Perform automatic correction/completion during typing
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P4 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 74416 75365 388590 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-12-27 21:10 EST by Ed Burnette CLA
Modified: 2012-09-02 13:38 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Burnette CLA 2003-12-27 21:10:31 EST
Suppose I have a type MyUtil and a method openFile. If I type:

   myutil|

('|' represents where the cursor is)
and then press '.', I'd like to see my type name be corrected like:

   MyUtil.|

instead of 'myutil' with a red squiggly under it. Similarly, when I get to:

   MyUtil.openfile|

and then press '(', I'd like to see:

   MyUtil.openFile(|)

with a tooltip showing the arguments of the openFile method. If I'm in content 
assist 'mode', I get this now (i.e., if I typed the '.' and waited for content 
assist to come up, or I hit control-space), but I want it to happen without 
hitting control-space or being in that 'mode'.

Basically I want auto-correction in the editor to work just like it does in a 
word processor like MS Word. In Word, if I type thier, it just silently 
changes it to their. But unlike Word, I don't want to have a hardcoded list of 
things that can be corrected; I want it to use the normal symbol table just 
like conventional code completion.
Comment 1 Dani Megert CLA 2004-01-13 05:23:45 EST
Taking your first example: how should we know that you mean the type MyUtil and
not a not yet defined local variable or field or even an additional parameter of
the enclosing method?

You can invoke quick fix/assis (Ctrl+1) after the . and get the several options
to choose from.

Furthermore, doing such kind of analyses during typing might be quite expensive.
Comment 2 Ed Burnette CLA 2004-01-13 09:54:20 EST
You only have to perform the analysis at the end of a word (i.e., a potential 
variable, class, or method name). Besides the analysis is kind of happening 
now anyway, because it does the red squiggle almost immediately.

Doing an Undo after an auto correct should undo the correction just like in MS 
Word for those rare cases where you mean to reference an undefined symbol that 
matches a defined symbol except in case.

I think this could be a nice productivity boost for programmers.

Comment 3 Dani Megert CLA 2004-09-21 10:27:01 EDT
*** Bug 74416 has been marked as a duplicate of this bug. ***
Comment 4 Dirk Baeumer CLA 2004-10-04 09:11:56 EDT
*** Bug 75365 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2012-09-02 13:09:05 EDT
*** Bug 388590 has been marked as a duplicate of this bug. ***