Comment Functionality
I just wanted to comment about the comment feature (ctrl+/) in RS.
Given:
ArrayList al = new ArrayList() ;
//al.Add( "junk" ) ;
{'|' denotes cursor position}
If the cursor is here and I press ctrl+/:
|ArrayList al = new ArrayList() ;
//al.Add( "junk" ) ;
I get:
//ArrayList al = new ArrayList() ;
////al.Add( "junk" ) ;
If I use the IDE's native comment and uncomment, I get different results:
If the cursor is here and I press ctrlk,ctrlu
|ArrayList al = new ArrayList() ;
//al.Add( "junk" ) ;
I get:
ArrayList al = new ArrayList() ;
al.Add( "junk" ) ;
If the cursor is here and I press ctrlk,ctrlc
|ArrayList al = new ArrayList() ;
//al.Add( "junk" ) ;
I get:
//ArrayList al = new ArrayList() ;
////al.Add( "junk" ) ;
I don't think this is a bug, but I just wanted to hear what anyone else
thinks.
Thanks,
Derek Price
Please sign in to leave a comment.
hm..I think it should only comment current line, and leave other code as it is, so I see it as a bug.
Although, it would be smart to comment all usage of list in your case, e.g.
ArrayList list = new ArrayList();
list.Add( "junk" );
would become:
//ArrayList list = new ArrayList();
//list.Add( "junk" );
only if there's no other variable named list in the scope,
it would be nice to have option to comment out other uses of list.
should be optional of course..
-j
"Derek Price" <dprice@doble.com> wrote in message news:cbc20e$6jq$1@is.intellij.net...
>I just wanted to comment about the comment feature (ctrl+/) in RS.
>
I could not reproduce the behaviour you described. For me Ctrl-/ always
affects only the current line and jumps to the next one. Are you sure you
described the behaviour correctly?
--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Derek Price" <dprice@doble.com> wrote in message
news:cbc20e$6jq$1@is.intellij.net...
>
>
>
>
>
>
>
>
>
>
>
>
>
e.g.
I think it would be TOO smart. IMO most users would hate it.
--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"jjooee" <jjooeeN_0_S_P_A_M@machak.com> wrote in message
news:cbc3ec$gv8$1@is.intellij.net...
hm..I think it should only comment current line, and leave other code as it
is, so I see it as a bug.
Although, it would be smart to comment all usage of list in your case, e.g.
ArrayList list = new ArrayList();
list.Add( "junk" );
would become:
//ArrayList list = new ArrayList();
//list.Add( "junk" );
only if there's no other variable named list in the scope,
it would be nice to have option to comment out other uses of list.
should be optional of course..
-j
"Derek Price" <dprice@doble.com> wrote in message
news:cbc20e$6jq$1@is.intellij.net...
>I just wanted to comment about the comment feature (ctrl+/) in RS.
>
>
>
>
>
>
>
>
>
>
>
>
>
"Valentin Kipiatkov (JetBrains)" <valentin@intellij.com> wrote in message news:cbc9bg$r9g$1@is.intellij.net...
>> Although, it would be smart to comment all usage of list in your case,
well, that's why I wrote: "should be optional of course..",
-j
My appologies. I forgot to mention that both lines were highlighted when I
did the ctrl+/.
"Valentin Kipiatkov (JetBrains)" <valentin@intellij.com> wrote in message
news:cbc99k$qnb$1@is.intellij.net...
>
>
results:
else
>
>
Ok, that makes it clear. It's definetely not a bug but intended behavior. Is
it inconvenient for some usecases?
--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Derek Price" <dprice@doble.com> wrote in message
news:cbcb0j$7h6$1@is.intellij.net...
I
>
you
>
>
Sometimes inconvenient. Consider the psuedo code below:
//code
//code
code
//code
//code
I would like select all of it and uncomment everything in one keystroke.
Currently in RS, you would get:
////code
////code
//code
////code
////code
If I want to uncomment all at once, I need to use the IDE's uncomment
feature (ctrlk,ctrlu). Otherwise with RS, I'd need to uncomment the first
section and then the second section. Is this a helpful usecase?
Thanks,
Derek Price
"Valentin Kipiatkov (JetBrains)" <valentin@intellij.com> wrote in message
news:cbcdao$mmq$1@is.intellij.net...
Is
>
>
when
message
always
>
>
Well, that's true. But personally I do not remember I ever had a similar
case. For me one shortcut is just easier to use than two. Kind of
compromise...
--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Derek Price" <dprice@doble.com> wrote in message
news:cbcemi$vli$1@is.intellij.net...
>
>
>
>
first
>
>
behavior.
sure
anyone
>
>