Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Chad W. Skinner is currently offline Chad W. SkinnerFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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)
Previous Topic:Remote Debugging -- Possible for Debug-ee to connect to Eclipse? server=n?
Next Topic:Unexpected exception while debugging
Goto Forum:
  


Current Time: Wed Feb 05 14:11:35 GMT 2025

Powered by FUDForum. Page generated in 0.38403 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top