Bug 49623 - [formatting] align fields messes up end of line comment
Summary: [formatting] align fields messes up end of line comment
Status: RESOLVED DUPLICATE of bug 47620
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-07 06:20 EST by Nikolay Metchev CLA
Modified: 2004-01-08 02:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Metchev CLA 2004-01-07 06:20:47 EST
if you have the "align fields in columns" option ticked and format the following
-------------------------------------------
public class A
{
   private static final UnsupportedOperationException exception      = new 
UnsupportedOperationException();
   protected Object  m_snapshotDate = null;  //null indicates that its not 
snapshot view
}
--------------------------------------------------------------
the result is
-----------------------------------------------------------------
public class A
{
   private static final UnsupportedOperationException exception      = new 
UnsupportedOperationException();
   protected Object                                   m_snapshotDate = 
null;                                //null
                                                                                
                            // indicates
                                                                                
                            // that
                                                                                
                            // its
                                                                                
                            // not
                                                                                
                            // snapshot
                                                                                
                            // view
}
------------------------------------------------------------

it may not show up properly in html but the end of line comment was spread to 
one word per line....not very nice!
Comment 1 Olivier Thomann CLA 2004-01-07 08:52:06 EST
Move to JDT/Text.
The code formatter doesn't touch comments.
Comment 2 Dani Megert CLA 2004-01-07 13:04:32 EST
To what value did you set the comment line length?
Comment 3 Nikolay Metchev CLA 2004-01-07 13:48:23 EST
180.
Also formatting the code twice in a row has the effect of shifting the bits of 
the comment that are on new lines to the start of those lines!
Comment 4 Dani Megert CLA 2004-01-08 02:37:17 EST
What would you expect? (please add comment directly to bug 47620)

*** This bug has been marked as a duplicate of 47620 ***