1

I have a problem formatting an annotation type element of an array type. I'd like to instruct the Eclipse Formatter to insert a space between the type and the name of the element.

So this would be great:

String[] value();

But all I get is this (no space between the closing square bracket and the element name):

String[]value();

Everything works fine if the type is not an array.

Probably I just do not know how to name the "annotation element type space after closing square bracket" correctly. Otherwise I suppose I would find the configuration option or at least a reference to a bug report.

7
  • Strange. Everything works for me with the default eclipse formatting policy.
    – AlexR
    Sep 23, 2015 at 17:13
  • @AlexR: Thanks for your hint! I checked it with Mars Release (4.5.0), Build id: 20150621-1200 with both Eclipse configurations, but the result is the same: the space is removed. Sep 24, 2015 at 9:09
  • I am using build 20130919-0819...
    – AlexR
    Sep 24, 2015 at 9:12
  • Ok, I remember not to have the problem on my older Eclipse installations. So it is probably a bug with the version I'm using ... Thanks again! Sep 24, 2015 at 9:19
  • You are welcome to open bug.
    – AlexR
    Sep 24, 2015 at 9:20

1 Answer 1

1

The issue is fixed with version 4.5.1

See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=472962#c5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.