Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Peter Gromov 
Subsystem
Editor. Code Completion 
Affected versions
Fixed in
Fixed in build
Next build 
Build
7584
Fixed in build
8107
Severity
0
  • Submitted by   Mark Vedder
    2 years ago (11 Dec 2007 02:48)
  • Updated by   root
    3 weeks ago (17 Jan 2010 19:56)
  • Jira: IDEA-42194
    (history, comments)

IDEA-42194

Code complete sometimes deletes "." operator

1
Added by <no user>
15 Sep 2009
screenshot.png   (26 KB)

In certain circumstances, auto complete is deleting the dot operator ("."). One use case to cause this is as follows:

  1. Configure IDEA code compete window to auto popup when "." is typed. Set the delay to a low value. (if you use ctrl-space to get the code completion window, the issue does not present itself. Also, if the time delay for the auto popup is high, the issue also does not present itself. The issue did occur with a time of 300 ms for me)
  2. Configure IDEA to "Add unambiguous imports on the fly"
  3. Type the name of a class immediately followed by a dot for a class that is (a) not yet imported; (b) has an accessible static property or method; (c) is unambiguous. For example: {{JOptionPane.}}
  4. IDEA will auto import the class
  5. wait for code completion window to auto popup
  6. use code completion window to select a static method or property and hit enter.
  7. the resultant statement with be {{ClassNameStaticElement}} rather than {{ClassName.StaticElement}} even though you had typed the "."

The issue may occur in other use cases. This is simply one I found that causes it to consistently happen.

See attached screenshot.

Issue was resolved
Comments (2)
 
History (1)
 
Links
 
Peter Gromov
  Peter Gromov
30 Dec 2007 18:02
(2 years ago)
#permalink
What autoreparse delay do you have in your Editor Settings?
Mark Vedder
  Mark Vedder
30 Dec 2007 22:38
(2 years ago)
#permalink
I have my autoreparse delay set to 300 ms. Adjusting it from values as low as 50ms to values as high as 5000ms does not seem to affect the issue. It still occurs.

However, the "Code Completion Autopopup After dot" setting does affect the issue. If I increase that to 500ms or higher, the issue does not occur. But at values of 475ms or lower (I was testing in 25ms increments) it does occur. I typically have this set for 300ms.

Also, it is still occurring in build 7613.

Let me know if you need any other information.

Thanks.