Command Completion Quirk
I have the following code:
StringBuilder sb = new StringBuilder() ;
sb.Append( "Some text" ) ;
I realized that I wanted "AppendFormat" instead, so I put the cursor '|' at
the end of "Append" (see below) and typed ]]>:
sb.Append|( "Some Text" ) ;
The pink highlighting tells me if I select AppendFormat that it will wipe
out the rest of the line. Okay, no problem. I'll just put a space after
Append and try again:
sb.Append| ( "Some Text" ) ;
Nope - it still wants to replace the entire line. I tried replacing the
space with a tab - no good. The only way I can get it to just replace the
"Append" part is to put the rest of the line after "Append" on the next
line:
sb.Append|
( "Some Text" ) ;
It seems like a space or a parenthesis should be good enough delimiters for
the tab completion to only replace just the method name. What the general
consensus on this?
Thanks,
Derek
Please sign in to leave a comment.
In fact the right key to use in the described case is Tab. It won't erase
the method arguments since the method which you selected has arguments as
well. But the pink highlighting seems to be confusing in this case. Maybe we
should only highlight the parenthesis (and change to highlighting of the
whole argument list when selected item has no arguments), what do you think?
for
As for using Space key in this case, we are not sure. I personally do not
remember I ever used Space to select items from code completion so I don't
know what people expect from it.
--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Derek" <NOdpriceSPAM@doble.com.INVALID> wrote in message
news:c39ve6$dld$1@is.intellij.net...
>
>
at
>
>
>
>
>
>
for
>
>
>
I think the pink highlighting was confusing me. I seem to remember a
previous post where you first mentioned using a highlighting method to show
what was going to be replaced when selecting the Tab key. I went back to my
example and, sure enough, the "Append" was replaced by "AppendFormat"
without erasing the rest of the line. What is the actual purpose of the
pink highlighting if it's not to show what's getting replaced?
"Valentin Kipiatkov (JetBrains)" <valentin@intellij.com> wrote in message
news:c3a2c4$ug6$1@is.intellij.net...
we
think?
>
general
>
>
>
wipe
after
the
the
general
>
>
After some discussion we've decided to implement a bit changed behaviour
which should be more intuitive. See
http://www.intellij.net/tracker/resharper/viewSCR?publicId=1279
--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Derek" <NOdpriceSPAM@doble.com.INVALID> wrote in message
news:c3a40j$8bc$1@is.intellij.net...
show
my
>
erase
as
Maybe
delimiters
not
don't
'|'
next
delimiters
>
>
Seems reasonable!
"Valentin Kipiatkov (JetBrains)" <valentin@intellij.com> wrote in message
news:c3a6d7$lf0$1@is.intellij.net...
>
>
to
message
the
replacing
replace
>
>