[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Suggestion: improvement of java line/block commenting in eclipse

Thomas,

Open a bugzilla enhancement request for JDT.  Set severity to "enhancement" and use "UI" as the component.
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT


Thomas Åhlén wrote:
I don't really know if this is the right place to post improvement suggestions for eclipse :).

S1. When using // in front of a line that denotes a block of java code automatically change the commenting to block commenting and surround the code. The change would happen instantly when I type the second /.

S2. When deleting a top block comment remove the bottom one automatically. The auto-removal of the / and */ would happen instantly when removing the * in /*.

These two implementations would probably save an massive amount of time for many java developers.

See examples below.

Thanks
Thomas

Example 1 (S1):
-Source
    for( int i = 0; i < 10; i++ )
    {
       ... some code ...
    }   
-Before
//    for( int i = 0; i < 10; i++ )
    {
       ... some code ...
    }   
-After
/*
    for( int i = 0; i < 10; i++ )
    {
       ... some code ...
    }   
*/

Example 2 (S1):
-Source
    canvas.getCamera().setFrustumPerspective( 45.0f,
                                              aspect,
                                              1,
                                              10000 );
-Before
//    canvas.getCamera().setFrustumPerspective( 45.0f,
                                              aspect,
                                              1,
                                              10000 );
-After
/*
    canvas.getCamera().setFrustumPerspective( 45.0f,
                                              aspect,
                                              1,
                                              10000 );
*/

Example 3 (S2):
-Source
/*
    for( int i = 0; i < 10; i++ )
    {
       ... some code ...
    }   
*/
-Before
/
    for( int i = 0; i < 10; i++ )
    {
       ... some code ...
    }   
*/
-After
    for( int i = 0; i < 10; i++ )
    {
       ... some code ...
    }