Bugs item #494035, was opened at 2001-12-16 17:24 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=402704&aid=494035&group_id=31602
Category: ejbdoclet Group: None Status: Open Resolution: None Priority: 5 Submitted By: Brill Pappin (brill) Assigned to: Nobody/Anonymous (nobody) Summary: Java Coding Standards not used Initial Comment: Example file attached. The generated classes are very messy and do not conform to standard coding standards. 1. The java.lang.* package is imported into all generated classes, this should not be explicitly imported. 2. in the attached example, first "if" statement missing block, method signature: equals(Object)::boolean. 3. Explicit declaration of such classes as java.lang.String (or Object) not required and obfuscates the code. 4. Explicit declaration of classes in the same package. Once again, bad coding practice, and obfuscates code. If there are people who do like their classes output in this way (as I'm sure there must be), then I suggest you add a switch to the ant task so the output can conform (or not) to a cleaner, standard format. In fact, I'll do the work for it too! For more information, see: http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc .html in particular, the sections: 7 - Statements 9 - Naming Conventions With experience I have found a few more items that tend to make the code clearer, which is important when you expect other developers to be looking/working with it (and who doesn't now?). ---------------------------------------------------------------------- >Comment By: Brill Pappin (brill) Date: 2001-12-17 10:09 Message: Logged In: YES user_id=7933 Things like not importing java.lang.* and specifing blocks for if, while etc, should be simple, and is not covered by pretty printer(s) (such as the one for ant, or the two for JEdit). Ohenestly, i do get anal about my code, and I don't mind running a pretty printer over it to format it. What got my attention was the stuff that looks like a novice wrote it. If I make the changes, will you folks use/implement them? ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-12-16 22:28 Message: Logged In: NO We do not plan to support any naming convention. It's out of scopt of xdoclet and hard to implement in a template file. The solution I propose you is to use an automated source code beautifier like jrefactory's PrettyPrinter. We use prettyprinter for XDoclet's source too. You put a <pretty/> task in build and it quickly formats it according to the coding conevtion you setup (you have full control over all aspects of settings). For an example of <pretty/>'s usage refer to xdoclet's cvs sources. If you take a close look at xdoclet's sources you see they all confirm to a single coding convention desipte the fact that 9 developers worked on it. <pretty/> applies the coding convention. I'll add a tip in this regard in docs. Cheers, Ara. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=402704&aid=494035&group_id=31602 _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
