completion by pressing Tab behaves differently

When I've got this piece of code (overly simplified):
double x = Math.cos(Math.PI);
...and I want to change "cos" to "sin", I'd delete "cos", type 's' after the dot, hit Ctrl+Tab, choose "sin" and hit Tab.
Previously it would result in:
double x = Math.sin(Math.PI);
Currently it results in:
double x = Math.sin();Math.PI);
...which is very annoying, because now I have to remove the unwanted closing parenthesis and semicolon.
Is it a bug or a feature? If it's a feature, is it possible to configure IDEA to use the "old" behaviour?

9 comments

I'm quite sure this is a bug - and an annoying one. Please file a JIRA
for it.

Sergei S. Ivanov wrote:

When I've got this piece of code (overly simplified):
double x = Math.cos(Math.PI);
..and I want to change "cos" to "sin", I'd delete "cos", type 's' after the dot, hit Ctrl+Tab, choose "sin" and hit Tab.
Previously it would result in:
double x = Math.sin(Math.PI);
Currently it results in:
double x = Math.sin();Math.PI);
..which is very annoying, because now I have to remove the unwanted closing parenthesis and semicolon.
Is it a bug or a feature? If it's a feature, is it possible to configure IDEA to use the "old" behaviour?

0

Yep been noticing this a lot myself recently...

Martin Fuhrer wrote:

I'm quite sure this is a bug - and an annoying one. Please file a JIRA
for it.

Sergei S. Ivanov wrote:

>> When I've got this piece of code (overly simplified):
>> double x = Math.cos(Math.PI);
>> ..and I want to change "cos" to "sin", I'd delete "cos", type 's'
>> after the dot, hit Ctrl+Tab, choose "sin" and hit Tab.
>> Previously it would result in:
>> double x = Math.sin(Math.PI);
>> Currently it results in:
>> double x = Math.sin();Math.PI);
>> ..which is very annoying, because now I have to remove the unwanted
>> closing parenthesis and semicolon.
>> Is it a bug or a feature? If it's a feature, is it possible to
>> configure IDEA to use the "old" behaviour?

0

The last days I tried to find out, what I have done wrong :)
Hope this will be fixed soon.
Sometimes I am not sure whether those IntelliJ guys use their own
software ;).


Johannes Schneider

Martin Fuhrer wrote:

I'm quite sure this is a bug - and an annoying one. Please file a JIRA
for it.

Sergei S. Ivanov wrote:

>> When I've got this piece of code (overly simplified):
>> double x = Math.cos(Math.PI);
>> ..and I want to change "cos" to "sin", I'd delete "cos", type 's'
>> after the dot, hit Ctrl+Tab, choose "sin" and hit Tab.
>> Previously it would result in:
>> double x = Math.sin(Math.PI);
>> Currently it results in:
>> double x = Math.sin();Math.PI);
>> ..which is very annoying, because now I have to remove the unwanted
>> closing parenthesis and semicolon.
>> Is it a bug or a feature? If it's a feature, is it possible to
>> configure IDEA to use the "old" behaviour?

0

I'm quite sure this is a bug - and an annoying one.
Please file a JIRA
for it.


Done:
http://www.jetbrains.net/jira/browse/SELENAMS-117

0

on 7.0M1a it works as you describe it should.
resulting in

double x = Math.cos(Math.PI);

0

on 7.0M1a it works as you describe it should.


Maybe because 7.0M1a is build 6827 and I am on EAP 6913 now.

0

Yes, I've been noticing this as well.

0

I think it's been fixed in 6951. Thanks, JetBrains.

0

Please sign in to leave a comment.