-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Pretty formatting from Ant Task
PostPosted: Tue Feb 13, 2007 1:43 am 
Senior
Senior

Joined: Sat Aug 19, 2006 6:31 pm
Posts: 139
Hi,

I'm using Hibernate-tools 3.2.0-beta9a both from an ant task and eclipse plugin.

When I generate the POJOs (with annotation), I get different results when using eclipse than when using ant task.

The annotations are not aligned correctly when done from ant task.

Does anybody know what's used by the plugin to format the POJOs so that the annotations are aligned?

Thanks
Budyanto


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 4:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
from new and noteworthy http://www.hibernate.org/hib_docs/tools ... beta9.html

When generating Java code from inside Eclipse we always formatted the source according to the current Java project; with Ant no such formatting took place.

This is now possible by using the Ant java formatter which utilizes Eclipses code formatter. See HBX-811 for the details.

Code:
<taskdef name="javaformatter" classname="org.hibernate.tool.ant.JavaFormatterTask" classpathref="tasks.classpath"/>
<javaformatter configurationfile="optional-eclipse-formatting-settings">
<fileset dir="${build.dir}">
  <include name="**/*.java"/>
</fileset>
</javaformatter>

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 11:30 am 
Newbie

Joined: Sat Mar 05, 2005 2:36 pm
Posts: 19
max wrote:
http://www.hibernate.org/hib_docs/tools/eclipse/newandnoteworthy/hibernate-eclipse-news-3.2.0.beta9.html

Great feature! I really like it. But it took quite a lot of time to find the right libraries to use for this target. Currently I have the following eclipse libraries in the classpath:
  • org.eclipse.core.runtime
  • or.eclipse.equinox.common
  • org.eclipse.jdt.core
  • org.eclipse.text

It works, but I am not sure whether I really need them all. Would be nice if the issue or the new and noteworthy page pointed to the list of libraries needed for the target to work.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 11:34 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you found the correct plugins.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 12:09 pm 
Senior
Senior

Joined: Sat Aug 19, 2006 6:31 pm
Posts: 139
Yeah it works. Thanks.

Budyanto


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.