Bug 16233 - formatter problem with constructor, array and line-end comments
Summary: formatter problem with constructor, array and line-end comments
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-17 07:53 EDT by Stefan Matthias Aust CLA
Modified: 2003-10-13 10:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Matthias Aust CLA 2002-05-17 07:53:08 EDT
Here's formatting problem for a complex constructor in combination with // 
comments (I shortened the strings to fit it into this textarea):

    public IPropertyDescriptor[] getPropertyDescriptors() {
        if (getClass().equals(ClassDiagram.class)) {
            ComboBoxPropertyDescriptor cbd =
                new ComboBoxPropertyDescriptor(
                    ID_ROUTER,
                    OdinMessages.getString("..."),
                //$NON-NLS-1$
    new String[] {
        OdinMessages.getString("..."),
                //$NON-NLS-1$
                OdinMessages.getString("...") //$NON-NLS-1$
            });
            cbd.setLabelProvider(new ConnectionRouterLabelProvider());
            return new IPropertyDescriptor[] { cbd };
        }
        return super.getPropertyDescriptors();
    }

The "new String[]" should have the same indentation level as the 
line "OdinMessages.getString".
Comment 1 Philipe Mulet CLA 2002-05-19 11:45:37 EDT
Will reconsider post 2.0.
Comment 2 Philipe Mulet CLA 2002-07-25 06:30:34 EDT
Resurrecting formatter issues in 2.1 stream.
Comment 3 Philipe Mulet CLA 2002-07-25 06:32:30 EDT
Clearing resolution
Comment 4 Olivier Thomann CLA 2003-01-15 13:23:02 EST
We need to clear 2.1 bug reports that won't be addressed before 2.1. The new 
implementation is still in the works. Therefore we cannot include it for 2.1. 
Not enough testing and we need to polish the preferences. This will be address 
for 2.2 as stated in the JDT/Core plan.
Comment 5 Philipe Mulet CLA 2003-06-12 06:36:03 EDT
Resurrecting for 3.0
Comment 6 Olivier Thomann CLA 2003-06-12 15:58:54 EDT
Reopen for 3.0 consideration.
Comment 7 Olivier Thomann CLA 2003-10-03 09:55:05 EDT
This is addressed in the new formatter.
Fixed and released in HEAD.
Regression test added.
Comment 8 David Audel CLA 2003-10-13 10:21:06 EDT
Verified.