Bug 51201 - Code formatter missing 'between empty brackets' option in Whitespace Array allocation configuration
Summary: Code formatter missing 'between empty brackets' option in Whitespace Array al...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-04 16:06 EST by Ian Brown CLA
Modified: 2004-02-12 15:27 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 Ian Brown CLA 2004-02-04 16:06:23 EST
The code formatter keeps getting better and better - thanks guys.

Looking at the I20040203 build, I notice that the Whitespace configuration tab 
has changed a little. 

In the Arrays section, there are the usual options for whitespace inclusion 
before/after brackets. In Array declarations and Array initializers, there is 
also the option to select whether or not there are spaces between empty 
brackets.

This is great, but needs to also be offered in the Array allocation 
configuration as the same configuration choice can be made there.

With the current options, I could choose to format as either:

// No whitespace before/after brackets
int[] array1 = new int[]
int[] array2 = new int[3];

OR

// Whitespace before/after brackets
int[] array1 = new int[ ]
int[] array2 = new int[ 3 ];

Whereas I want the best of both worlds :)

// Whitespace before/after brackets, no whitespace between empty brackets
int[] array1 = new int[]
int[] array2 = new int[ 3 ];
Comment 1 Martin Aeschlimann CLA 2004-02-05 12:20:18 EST
You can do that since I20040129:
Uncheck 'Space between empty brackets' but check 'Space after open and before
close  bracket'
Comment 2 Ian Brown CLA 2004-02-05 14:30:34 EST
Actually, I think you might have misread what I've put.

The option you mention *is* there on "Array declarations" and "Array 
initializers" (cool), but what I was saying was that it *isn't* there 
on "Array allocation" (but should be).

This is on I20040203

Thanks, and sorry if my original report was unclear...
Comment 3 Martin Aeschlimann CLA 2004-02-09 09:34:48 EST
ok, now I see. Thanks.
Moving to jdt.core
Comment 4 Olivier Thomann CLA 2004-02-09 11:23:53 EST
Fixed and released in HEAD.
Regression test added.
Comment 5 Olivier Thomann CLA 2004-02-12 15:27:13 EST
Verified in 200402121200.