erjablow (9) [Avatar] Offline
#1
Has anyone used the non-EJB and non-web tasks, other than the <info> task? I wonder who uses the @javabean tags, or the @msg tags for creating properties files.

One idea I have for a new tag and task is to generate Format classes for type-safe enumerations, with code like:

// Create Text*.properties and
// FigurineAlgebraic.properties
/**
* @format.bundle bundle="Text"
* @format.bundle bundle="FigurineAlgebraic"
*/
public class Piece {

/**
* @format.bundle name="Text" value="King"
* @format.bundle name="Text" value="King" lang="en"
* @format.bundle name="Text" value="Roi" lang="fr"
* @format.bundle name="FigurineAlgebraic"
* value="u2654"
*/
public final Piece KING = new Piece("King");
}

This would generate properties files that would encapsulate the names, and two java.text.Format Java classes that could be used to read and write Pieces. Am I on the wrong track?

Frankly, java.text.Format is a sadly neglected part of Java.
pdmckenzie (1) [Avatar] Offline
#2
Re: Non-EJB and Web tasks
Interesting you ask... I've been looking for examples to create properties files using @msg.bundle and @msg.message. I've found an ant build script that seems to work, but getting the tags to be seen just hasn't been successful so far.