| 
| Converting /* .. */ to // comments? [message #165581] | Wed, 23 June 2004 08:00  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: crafterm.managesoft.com 
 Hi All,
 
 Hope all is going well.
 
 Is it possible to convert comment styles in Eclipse? What i'd like to be
 able to do is convert /* ... */ comments to // commands via a menu
 entry, something like right click over a comment block that looks
 something like:
 
 /*
 * some comment block inside a method
 */
 
 select some menu entry like 'Convert to // Comment' or similar so that
 the result looks like:
 
 //
 // some comment block inside a method
 //
 
 Does something like this already exist inside Eclipse? (or via an
 external plugin)
 
 Any thoughts/ideas?
 
 Cheers,
 
 Marcus
 
 
 --
 .....
 ,,$$$$$$$$$,      Marcus Crafter
 ;$'      '$$$$:    Computer Systems Engineer
 $:         $$$$:   ManageSoft Corporation
 $       o_)$$$:   Frankfurt am Main, Germany
 ;$,    _/\ &&:'
 '     /( &&&
 \_&&&&'
 &&&&.
 &&&&&&&:
 |  |  |  | 
|  | 
|  | 
| 
| Re: Converting /* .. */ to // comments? [message #166128 is a reply to message #165615] | Tue, 29 June 2004 01:00  |  | 
| Eclipse User  |  |  |  |  | I'm not sure if it's fair to say that most people would find it useless - I think it depends on the software shop that a person is working in,
 and the code they are managing. As for the example you provided about
 commenting, the code reformatting could be done like this:
 
 /*
 * comment
 */ not commented code;
 
 //
 // comment
 not commented code;
 
 or, perhaps a less trivial example
 
 /*
 * comment
 * text here */ not commented code;
 
 //
 // comment
 // text here
 not commented code;
 
 Although I'm not sure it neccessarily is of first priority to clutter
 the source/refactoring menus, I think this is a valid organization tool
 (along the lines of organize imports).
 
 
 
 
 Eric Bodden wrote:
 
 > Marcus Crafter wrote:
 >
 >> Hi All,
 >>
 >> Hope all is going well.
 >>
 >> Is it possible to convert comment styles in Eclipse? What i'd like to
 >> be able to do is convert /* ... */ comments to // commands via a menu
 >> entry, something like right click over a comment block that looks
 >> something like:
 >>
 >> /*
 >>  * some comment block inside a method
 >>  */
 >>
 >> select some menu entry like 'Convert to // Comment' or similar so that
 >> the result looks like:
 >>
 >> //
 >> // some comment block inside a method
 >> //
 >
 >
 > No, such a feature does not exist. I guess most people would find it
 > quite useless. Also it could break your code. Just consider the following:
 >
 > /*
 >  * comment
 >  */ not commented code;
 >
 > would become
 >
 > //
 > // comment
 > // commented code; !!!
 >
 > Eric
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04400 seconds