Community
Participate
Working Groups
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.
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.
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.
*** Bug 74416 has been marked as a duplicate of this bug. ***
*** Bug 75365 has been marked as a duplicate of this bug. ***
*** Bug 388590 has been marked as a duplicate of this bug. ***