NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Multiline Comment

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Maksym
Posted via mailing list.





PostPosted: Wed Sep 03, 2008 1:41 pm    Post subject: Multiline Comment Reply with quote

Hello.

Does anybody know how to create hotkey (or macro)
for multiline comment in the NetBeans Editor?

For example I have such code:

int index = 0;
String name = "";

after I select these two lines and press the desired
hotkey they are will look like the following:

/* int index = 0; String name = ""; */



Thank you,
Maksym.
Back to top
Thales (Shubacca) - Tebo
Posted via mailing list.





PostPosted: Wed Sep 03, 2008 1:50 pm    Post subject: Multiline Comment Reply with quote

You can use the shortcut Ctrl+Shift+C.

2008/9/3 Maksym <maximailx@gmail.com (maximailx@gmail.com)>
Quote:
Hello.

Does anybody know how to create hotkey (or macro)
for multiline comment in the NetBeans Editor?

For example I have such code:

int index = 0;
String name = "";

after I select these two lines and press the desired
hotkey they are will look like the following:

/* int index = 0; String name = ""; */



Thank you,
Maksym.




--
Thales Eduardo Barros de Oliveira
Desenvolvedor Delphi / Firebird / Java
Emails:
tebosoftware@gmail.com (tebosoftware@gmail.com) (GoogleTalk)
thales_oli@hotmail.com (thales_oli@hotmail.com) (MSN)
Blog:
http://tebosoftware.blogspot.com/

"Tente ser uma pessoa de valor, n
Back to top
Petr Dvorak
Posted via mailing list.





PostPosted: Wed Sep 03, 2008 1:59 pm    Post subject: Multiline Comment Reply with quote

Hi!

If you are interested only in commenting the code out (no uncommenting),
you can try to create following macro in Tools>Options>Editor (or Java
Code in 6.1)>Macros:

copy-to-clipboard delete-previous "/* " paste-from-clipboard " */"

Hope that helps,

Petr Dvorak

Maksym wrote:
Quote:
Hello.

Does anybody know how to create hotkey (or macro)
for multiline comment in the NetBeans Editor?

For example I have such code:

int index = 0;
String name = "";

after I select these two lines and press the desired
hotkey they are will look like the following:

/* int index = 0;
String name = ""; */


Thank you,
Maksym.
Back to top
Jiri Prox
Posted via mailing list.





PostPosted: Wed Sep 03, 2008 2:08 pm    Post subject: Multiline Comment Reply with quote

Hi,

also the hint can be used - select the block of code, press alt-enter
when light bulb appears on the left side of editor and select Surround
with /*selection*/

Regards
Jirka

Petr Dvorak wrote:
Quote:
Hi!

If you are interested only in commenting the code out (no
uncommenting), you can try to create following macro in
Tools>Options>Editor (or Java Code in 6.1)>Macros:

copy-to-clipboard delete-previous "/* " paste-from-clipboard " */"

Hope that helps,

Petr Dvorak

Maksym wrote:
Quote:
Hello.

Does anybody know how to create hotkey (or macro)
for multiline comment in the NetBeans Editor?

For example I have such code:

int index = 0;
String name = "";

after I select these two lines and press the desired
hotkey they are will look like the following:

/* int index = 0;
String name = ""; */


Thank you,
Maksym.
Back to top
Nick Beare
Posted via mailing list.





PostPosted: Thu Sep 04, 2008 8:01 am    Post subject: Multiline Comment Reply with quote

My preference is to use control + /
It acts as a toggle.

This comments the lines if not commented (puts // in first column). If commented (// in first column) will uncomment them. Very handy for temporarily commenting out code.



From: Maksym [mailto:address-removed]
Sent: 03 September 2008 13:58
To: address-removed
Subject: [nbusers] Multiline Comment


Hello.



Does anybody know how to create hotkey (or macro)

for multiline comment in the NetBeans Editor?



For example I have such code:



int index = 0;

String name = "";



after I select these two lines and press the desired

hotkey they are will look like the following:



/* int index = 0;
String name = ""; */






Thank you,

Maksym.
Back to top
Ediklip



Joined: 09 Aug 2012
Posts: 4
Location: United Kingdom

PostPosted: Thu Aug 09, 2012 11:34 pm    Post subject: Reply with quote

thanks for the list guys. it'll really help me.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo