At line 1 changed 1 line. |
This page will show you how to setup appfuse 1.8 and jalopy so that you can format/beautify your code. |
This page will show you how to setup AppFuse 1.8 and [Jalopy|http://jalopy.sourceforge.net] that you can format/beautify your code. This is useful if you're in a development team or if you like making your code ''more'' readable ;-). |
At line 3 changed 1 line. |
This tutorial is divided in two. First we have to setup an ant task that calls jalopy to format your code, once there we'll have to modify appfuse's source code (I hope it's not for long, since all we do is modify the javadoc comments in the code). |
This tutorial is divided in two. First we have to setup an ant task that calls jalopy to format your code, once there we'll have to modify appfuse's source code (I hope it's not for long, since all we do is modify the javadoc comments in the code). Every file url starts at your projects root foolder, I used appfuse's source code for this tutorial, but have done it with several __ant new__ projects (just change the __org/appfuse__ package to whatever your using, but I'll recomend changing your root appfuse, that way, every new project will have jalopy setup). There are two attachments at the bottom of the page you'll need. |
At line 5 changed 1 line. |
! Setup AppFuse |
! AppFuse Setup |
At line 17 changed 1 line. |
* Open the properties.xml and search for the {{{<path id="web.test.classpath">...</path>}}} section and add the following under it |
* Open the {{properties.xml}} and search for the {{{<path id="web.test.classpath">...</path>}}} section and add the following under it |
At line 45 changed 1 line. |
If you're looking at what we're doing you'll notice a convention xml named __um.xml__... this is the convention I use, and you can [change it|http://jalopy.sourceforge.net/printer.html] if you like, but I won't get into that, there are [tools|http://jalopy.sourceforge.net/download.html] to do that (an Eclipse plugin, a standalone gui, etc.). By the way, the __um.xml__ is attached at the bottom of this page as well as the __jalopy-1.0b11.zip__ (you'll have to use this one, if you want jalopy task you've just create it to format your javadoc comments, because it's patched to know what to do with the servlet-mapping tag found in some servlets). |
If you're looking at what we're doing you'll notice a convention xml named __um.xml__... this is the convention I use, and you can [change it|http://jalopy.sourceforge.net/printer.html] if you like, but I won't get into that, there are [tools|http://jalopy.sourceforge.net/download.html] to do that (an Eclipse plugin, a standalone gui, etc.). By the way, the __um.xml__ is attached at the bottom of this page as well as the __jalopy-1.0b11.zip__ (you'll have to use this one, if you want the jalopy task you've just create it to format your javadoc comments, because it's patched to know what to do with the servlet-mapping tag found in some servlets). |
At line 47 changed 1 line. |
Thats it!!! Well... not quite, we still have to modify some javadocs :)... |
Thats it!!! Well... not quite, we still have to modify some javadocs :-)... |
At line 49 changed 1 line. |
* Add a |
! Fixing AppFuse's javadocs |
|
Before this it all was fun, now comes the ugly part... __But be patient, it's worth it!!!__ |
|
* Open {{src/dao/org/appfuse/dao/hibernate.BaseDaoHibernate.java}} file and add a {{{<p>}}} at the start of the class javadoc. |
* Open {{src/dao/org/appfuse/model/LabelValue.java}} file and insert {{{* <p>}}} before the line 14 and change both {{{<p/>}}} in lines 11 and 12 respectively for {{{<br>}}}. |
* Open {{src/dao/org/appfuse/model/Address.java}} file and add a {{{<p>}}} at the start of the class javadoc. |
* Open {{src/dao/org/appfuse/model/Role.java}} file and add a {{{<p>}}} at the start of the class javadoc and in the __@author__ section \\{{{Dan Kibler [email protected]}}} should be {{{<a href="mailto:[email protected]">Dan Kibler</a>}}}. |
* Open {{src/dao/org/appfuse/model/User.java}} file and do the same with the __@author__. |
* Open {{src/service/org/appfuse/service/impl/RoleManagerImpl.java}} file and add a {{{<p>}}} at the start of the class javadoc. |
* Open {{src/service/org/appfuse/service/impl/UserManagerImpl.java}} file and add a {{{<p>}}} at the start of the class javadoc. |
* Open {{src/service/org/appfuse/util/StringUtil.java}} file and remove the carriage return in line 14. It should look like this: |
{{{ * <a href="StringUtil.java.html"><i>View Source</i></a>}}} |
* Open {{src/web/org/appfuse/webapp/action/BaseAction.java}} file and change lines 46, 155, 157, 356, 361, 364 {{{<p/>}}} for a {{{<br>}}} and delete line 48. |
* Open {{src/web/org/appfuse/webapp/action/SignupAction.java}} file and change line's 26 {{{<p/>}}} to {{{<p>}}}. |
* Open {{src/web/org/appfuse/webapp/filter/ActionFilter.java}} file, delete[1] lines 40 through 42. |
* Open {{src/web/org/appfuse/webapp/filter/GZIPResponseWrapper.java}} file and change the __@author__ to |
{{{ @author <a href="mailto:[email protected]">Matt Raible</a> }}} |
* Open {{src/web/org/appfuse/webapp/form/BaseForm.java }} file and add a {{{<p>}}} at the start of the class javadoc. |
* Open {{src/web/org/appfuse/webapp/taglib/LabelTag.java}} file and change the text in line 27 that reads {{{<label>}}} to {{{<label>}}}. |
* Finally, open {{src/web/org/appfuse/webapp/taglib/SecureTag.java}} file and in line 22 you'll find at the end of the line two {{{<br />}}}, you know what to do (remove the {{{/}}} and leave them like this {{{<br>}}}). The same thing can be found in line 29 (but there's just one). Grab lines 38 through 43 and put them before line 34 (everything after a tag gets erased). |
{{{ |
* Contributed by:<br> |
* <br> |
* XEsoft GmbH<br> |
* Oskar-Messter-Strasse 18<br> |
* 85737 Ismaning, Germany<br> |
* http://www.xesoft.com<br> |
* |
}}} |
Save all your edited files and try running __ant jalopy__. |
|
And as [Matt|MattRaible] so eloquently puts it: |
|
__Yeah Baby, Yeah:__ |
%%(color:green)BUILD SUCCESSFUL\\ |
Total time: 20 seconds%% |
|
;:''I'll let you in a little secret... you can start using __ant jalopy__ at the end of the __AppFuse Setup__ section''. |
|
[#1]Just found out there's a limit to the chars jalopy can hold as a description, so if you don't want to lose the link to the html page, you will have to lose this section (Don't move the lines just erase them...). |