Home » Language IDEs » Java Development Tools (JDT) » Java Code Formatter and Annotations
Java Code Formatter and Annotations [message #250742] |
Mon, 21 January 2008 14:27 |
Chad W. Skinner Messages: 4 Registered: July 2009 |
Junior Member |
|
|
We are working with JPA and annotations and I have noticed that the JDT
Code formatter for java has facilities for modifying the whitespace on
annotations, but not indentation? Does anyone know what it would take to
add indentation and newlines to handle annotations? or am I just missing
the settings somewhere?
For example if formatted the following would appear on three continuous
lines?
@Id
@GeneratedValue(strategy=GenerationType.TABLE, generator="entryGenerator")
@TagleGenerator(name="entryGenerator", table="generator_table",
pkColumnName="sequence_name", valueCOlumnName="sequence_value",
allocationSize=1, initialValue=1)
I would like to be able to formatted it as follows:
@Id
@GeneratedValue(
strategy=GenerationType.TABLE,
generator="entryGenerator")
@TagleGenerator(
name="entryGenerator",
table="generator_table",
pkColumnName="sequence_name",
valueCOlumnName="sequence_value",
allocationSize=1,
initialValue=1)
|
|
|
Re: Java Code Formatter and Annotations [message #250776 is a reply to message #250742] |
Tue, 22 January 2008 08:01 |
Eclipse User |
|
|
|
Originally posted by: jodet.e.fr.ibm.com
Chad,
there are several bugs around the formatter and annotations.
Please check-out bugzilla.
One I can think about is:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247
Eric.
Chad Skinner a écrit :
> We are working with JPA and annotations and I have noticed that the JDT
> Code formatter for java has facilities for modifying the whitespace on
> annotations, but not indentation? Does anyone know what it would take to
> add indentation and newlines to handle annotations? or am I just missing
> the settings somewhere?
>
> For example if formatted the following would appear on three continuous
> lines?
> @Id
> @GeneratedValue(strategy=GenerationType.TABLE, generator="entryGenerator")
> @TagleGenerator(name="entryGenerator", table="generator_table",
> pkColumnName="sequence_name", valueCOlumnName="sequence_value",
> allocationSize=1, initialValue=1)
>
> I would like to be able to formatted it as follows:
>
> @Id
> @GeneratedValue(
> strategy=GenerationType.TABLE,
> generator="entryGenerator")
> @TagleGenerator(
> name="entryGenerator",
> table="generator_table",
> pkColumnName="sequence_name",
> valueCOlumnName="sequence_value",
> allocationSize=1,
> initialValue=1)
|
|
|
Re: Java Code Formatter and Annotations [message #250930 is a reply to message #250776] |
Fri, 25 January 2008 09:42 |
Eclipse User |
|
|
|
Originally posted by: jodet.e.fr.ibm.com
Chad,
good news: fix for bug 122247 was released.
Please be aware that until corresponding UI bug 216541 gets fixed
you won't be able to see the new preference on the Code Formatter
preference page.
Eric.
Eric Jodet a écrit :
> Chad,
> there are several bugs around the formatter and annotations.
> Please check-out bugzilla.
> One I can think about is:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247
>
> Eric.
>
> Chad Skinner a écrit :
>> We are working with JPA and annotations and I have noticed that the
>> JDT Code formatter for java has facilities for modifying the
>> whitespace on annotations, but not indentation? Does anyone know what
>> it would take to add indentation and newlines to handle annotations?
>> or am I just missing the settings somewhere?
>>
>> For example if formatted the following would appear on three
>> continuous lines?
>> @Id
>> @GeneratedValue(strategy=GenerationType.TABLE,
>> generator="entryGenerator")
>> @TagleGenerator(name="entryGenerator", table="generator_table",
>> pkColumnName="sequence_name", valueCOlumnName="sequence_value",
>> allocationSize=1, initialValue=1)
>>
>> I would like to be able to formatted it as follows:
>>
>> @Id
>> @GeneratedValue(
>> strategy=GenerationType.TABLE,
>> generator="entryGenerator")
>> @TagleGenerator(
>> name="entryGenerator",
>> table="generator_table",
>> pkColumnName="sequence_name",
>> valueCOlumnName="sequence_value",
>> allocationSize=1,
>> initialValue=1)
|
|
|
Goto Forum:
Current Time: Wed Feb 05 14:11:35 GMT 2025
Powered by FUDForum. Page generated in 0.38403 seconds
|