This is an automated email from the git hooks/post-receive script. New commit to annotated tag v2.0.0-beta-1 in repository jaxx. See https://gitlab.nuiton.org/nuiton/jaxx.git commit d4014526f7d0a901a33c55f755f81a326485b179 Author: Tony Chemit <chemit@codelutin.com> Date: Wed Oct 7 17:37:55 2009 +0000 fix javadocs + improve messages in goal --- .../java/jaxx/compiler/CompilerConfiguration.java | 46 +++++------ .../src/main/java/jaxx/compiler/I18nHelper.java | 4 +- .../java/jaxx/compiler/JAXXCompilerLaunchor.java | 2 +- .../compiler/UnsupportedAttributeException.java | 2 +- .../jaxx/compiler/beans/JAXXBeanDescriptor.java | 2 +- .../java/jaxx/compiler/beans/JAXXBeanInfo.java | 4 +- .../compiler/beans/JAXXEventSetDescriptor.java | 2 +- .../jaxx/compiler/beans/JAXXFeatureDescriptor.java | 2 +- .../java/jaxx/compiler/beans/JAXXIntrospector.java | 2 +- .../compiler/beans/JAXXPropertyDescriptor.java | 2 +- jaxx-demo/src/main/java/jaxx/demo/RunDemo.java | 3 +- .../src/main/java/jaxx/runtime/SwingUtil.java | 4 +- .../jaxx/runtime/context/JAXXInitialContext.java | 1 + .../jaxx/runtime/decorator/DecoratorUtils.java | 8 +- .../src/main/java/jaxx/runtime/swing/Item.java | 4 +- .../swing/navigation/NavigationTreeModel.java | 12 +-- .../swing/navigation/NavigationTreeNode.java | 4 +- .../swing/wizard/WizardOperationActionThread.java | 2 +- .../java/jaxx/runtime/validator/BeanValidator.java | 6 +- .../runtime/validator/BeanValidatorListener.java | 2 +- .../runtime/validator/BeanValidatorMessage.java | 4 +- .../org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java | 90 +++++++++++++--------- .../ErrorJaxxContextImplementorClass.xml | 3 + 23 files changed, 117 insertions(+), 94 deletions(-) diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/CompilerConfiguration.java b/jaxx-compiler/src/main/java/jaxx/compiler/CompilerConfiguration.java index 5181c5b..bd7a17c 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/CompilerConfiguration.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/CompilerConfiguration.java @@ -14,73 +14,74 @@ public interface CompilerConfiguration { /** * - * @return + * @return the class loader to use by compilers */ ClassLoader getClassLoader(); /** * - * @return + * @return the type of compiler to use */ Class<? extends JAXXCompiler> getCompilerClass(); /** * - * @return + * @return the type of default decorator to use if none specified */ Class<? extends CompiledObjectDecorator> getDefaultDecoratorClass(); /** * - * @return + * @return the type of the default error UI to use for validation */ Class<?> getDefaultErrorUI(); /** * - * @return + * @return extra imports to add on all generated jaxx object */ String[] getExtraImports(); /** * - * @return + * @return the FQN of the help broker (can not directly a type since + * the help broker should (may?) be inside the sources. */ String getHelpBrokerFQN(); /** * - * @return + * @return the name of the help set to generate */ String getHelpSetName(); /** * - * @return + * @return the prefix of i18n keys to use in help system */ String getHelpsetI18nPrefix(); /** * - * @return + * @return the suffix of i18n keys to use in index of help system */ String getHelpsetIndexI18nSuffix(); /** * - * @return + * @return the suffix of i18n keys to use in title of the help system */ String getHelpsetTitleI18nSuffix(); /** * - * @return + * @return the suffix of i18n keys to use in toc of the help system */ String getHelpsetTocI18nSuffix(); /** * - * @return + * @return the type of context to use in each generated jaxx object */ Class<? extends JAXXContext> getJaxxContextClass(); @@ -92,64 +93,63 @@ public interface CompilerConfiguration { boolean getOptimize(); /** - * Returns the target directory, generally specified with the "-d" option on the command line. + * Returns the target directory. * * @return the target directory - * @see #setTargetDirectory */ File getTargetDirectory(); /** * - * @return + * @return the type of validator to use */ Class<?> getValidatorClass(); /** * - * @return + * @return {@code true} if a logger must add on each generated jaxx object */ boolean isAddLogger(); /** * - * @return + * @return {@code true} if we are generating help */ boolean isGenerateHelp(); /** * - * @return + * @return {@code true} if we use the i18n system */ boolean isI18nable(); /** * - * @return + * @return {@code true} to generate optimized code */ boolean isOptimize(); /** * - * @return + * @return {@code true} if a profile pass must be done */ boolean isProfile(); /** * - * @return + * @return {@code true} if states must be reset after the compilation */ boolean isResetAfterCompile(); /** * - * @return + * @return {@code true} if UIManager is used to retrieve icons */ boolean isUseUIManagerForIcon(); /** * - * @return + * @return {@code true} if compiler is verbose */ boolean isVerbose(); } diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/I18nHelper.java b/jaxx-compiler/src/main/java/jaxx/compiler/I18nHelper.java index f38a840..f099142 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/I18nHelper.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/I18nHelper.java @@ -7,9 +7,9 @@ import java.util.Arrays; import java.util.List; /** - * I18n methods to add {@link org.nuiton.i18n.I18n#_(String, Object[])} method on some attributes. + * I18n methods to add {@link org.nuiton.i18n.I18n#_(java.lang.String, java.lang.Object[])} method on some attributes. * <p/> - * Make sure to set an i18nable compiler to have his {@link CompilerOptions#isI18nable()} returning true. + * Make sure to set an i18nable compiler to have his {@link CompilerConfiguration#isI18nable()} returning true. * * @author chemit */ diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompilerLaunchor.java b/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompilerLaunchor.java index 7d548c7..a8a9043 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompilerLaunchor.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompilerLaunchor.java @@ -105,7 +105,7 @@ public class JAXXCompilerLaunchor { } /** - * Load the {@link jaxx.spi.Initializer} services found via the{@link ServiceLoader} mecanism. + * Load the {@link Initializer} services found via the{@link ServiceLoader} mecanism. * * @param verbose <ocde>true</code> to print initializers */ diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/UnsupportedAttributeException.java b/jaxx-compiler/src/main/java/jaxx/compiler/UnsupportedAttributeException.java index 404fb5e..20dc23d 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/UnsupportedAttributeException.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/UnsupportedAttributeException.java @@ -7,7 +7,7 @@ package jaxx.compiler; /** * Thrown by <code>TagHandler</code> when an unsupported attribute is encountered. * - * @see jaxx.tags.TagHandler + * @see jaxx.compiler.tags.TagHandler */ public class UnsupportedAttributeException extends CompilerException { diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanDescriptor.java b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanDescriptor.java index 512f735..f1138bf 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanDescriptor.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanDescriptor.java @@ -4,7 +4,7 @@ import jaxx.compiler.reflect.ClassDescriptor; /** * Mirrors the class <code>java.beans.BeanDescriptor</code>. JAXX uses its own introspector rather than the built-in - * <code>java.beans.Introspector</code> so that it can introspect {@link jaxx.reflect.ClassDescriptor}, + * <code>java.beans.Introspector</code> so that it can introspect {@link ClassDescriptor}, * not just <code>java.lang.Class</code>. */ public class JAXXBeanDescriptor extends JAXXFeatureDescriptor { diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanInfo.java b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanInfo.java index bb0bfbb..e1be786 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanInfo.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanInfo.java @@ -1,8 +1,10 @@ package jaxx.compiler.beans; +import jaxx.compiler.reflect.ClassDescriptor; + /** * Mirrors the class <code>java.beans.BeanInfo</code>. JAXX uses its own introspector rather than the built-in - * <code>java.beans.Introspector</code> so that it can introspect {@link jaxx.reflect.ClassDescriptor}, + * <code>java.beans.Introspector</code> so that it can introspect {@link ClassDescriptor}, * not just <code>java.lang.Class</code>. */ public class JAXXBeanInfo { diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXEventSetDescriptor.java b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXEventSetDescriptor.java index 37b8cca..5790263 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXEventSetDescriptor.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXEventSetDescriptor.java @@ -5,7 +5,7 @@ import jaxx.compiler.reflect.MethodDescriptor; /** * Mirrors the class <code>java.beans.EventSetDescriptor</code>. JAXX uses its own introspector rather than the built-in - * <code>java.beans.Introspector</code> so that it can introspect {@link jaxx.reflect.ClassDescriptor}, + * <code>java.beans.Introspector</code> so that it can introspect {@link ClassDescriptor}, * not just <code>java.lang.Class</code>. */ public class JAXXEventSetDescriptor extends JAXXFeatureDescriptor { diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXFeatureDescriptor.java b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXFeatureDescriptor.java index a036c88..c7723bf 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXFeatureDescriptor.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXFeatureDescriptor.java @@ -7,7 +7,7 @@ import java.util.Map; /** * Mirrors the class <code>java.beans.FeatureDescriptor</code>. JAXX uses its own introspector rather than the built-in - * <code>java.beans.Introspector</code> so that it can introspect {@link jaxx.reflect.ClassDescriptor}, + * <code>java.beans.Introspector</code> so that it can introspect {@link ClassDescriptor}, * not just <code>java.lang.Class</code>. */ public class JAXXFeatureDescriptor { diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXIntrospector.java b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXIntrospector.java index 06b3b3c..05603be 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXIntrospector.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXIntrospector.java @@ -24,7 +24,7 @@ import java.util.Map; * don't believe it results in any meaningful incompatibilities. * <p/> * JAXX uses its own introspector rather than the built-in - * <code>java.beans.Introspector</code> so that it can introspect {@link jaxx.reflect.ClassDescriptor}, + * <code>java.beans.Introspector</code> so that it can introspect {@link ClassDescriptor}, * not just <code>java.lang.Class</code>. */ public class JAXXIntrospector { diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXPropertyDescriptor.java b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXPropertyDescriptor.java index ead6025..299c523 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXPropertyDescriptor.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXPropertyDescriptor.java @@ -6,7 +6,7 @@ import jaxx.compiler.reflect.MethodDescriptor; /** * Mirrors the class <code>java.beans.PropertyDescriptor</code>. JAXX uses its own introspector rather than the built-in - * <code>java.beans.Introspector</code> so that it can introspect {@link jaxx.reflect.ClassDescriptor}, + * <code>java.beans.Introspector</code> so that it can introspect {@link ClassDescriptor}, * not just <code>java.lang.Class</code>. */ public class JAXXPropertyDescriptor extends JAXXFeatureDescriptor { diff --git a/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java b/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java index 3a969f7..f1c1ede 100644 --- a/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java +++ b/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java @@ -52,7 +52,7 @@ public class RunDemo { public static void main(String[] args) { startingTime = System.nanoTime(); - log.info("Observe start at " + new java.util.Date() + " args: " + java.util.Arrays.toString(args)); + log.info("JAXX Demo start at " + new java.util.Date() + " args: " + java.util.Arrays.toString(args)); try { @@ -177,7 +177,6 @@ public class RunDemo { try { super.run(); - //JAXXContext.get().close(); // force to kill main thread log.info(_("jaxxdemo.init.closed", new java.util.Date())); diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/SwingUtil.java b/jaxx-runtime/src/main/java/jaxx/runtime/SwingUtil.java index 327c517..9c5df22 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/SwingUtil.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/SwingUtil.java @@ -454,7 +454,7 @@ public class SwingUtil extends Util { * * Says using method {@link JTabbedPane#getComponent(int)} * @param tabs the - * @return + * @return the iterator * @since 1.4 */ public static TabbedPaneIterator<Component> newTabbedPaneIterator(JTabbedPane tabs) { @@ -572,7 +572,7 @@ public class SwingUtil extends Util { * @param parent * @param x * @param y - * @return + * @return the deppest component */ public static Component getDeepestObjectAt(Component parent, int x, int y) { diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java b/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java index a932a2f..a3c1bd2 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java @@ -2,6 +2,7 @@ package jaxx.runtime.context; import java.awt.Container; import java.util.Map.Entry; +import jaxx.runtime.JAXXObject; /** * An initial context to be inject in a {@link JAXXObject}. diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/decorator/DecoratorUtils.java b/jaxx-runtime/src/main/java/jaxx/runtime/decorator/DecoratorUtils.java index 74971cf..779e0a5 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/decorator/DecoratorUtils.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/decorator/DecoratorUtils.java @@ -24,11 +24,11 @@ import jaxx.runtime.decorator.JXPathDecorator.Context; * To register a new decorator, use the method {@link #register(String, Decorator)}. * <p/> * To obtain a registred decorator, use the method {@link #get(String)} - * (get the decorator based on his registred name). or the method {@link #get(Class, tring)} + * (get the decorator based on his registred name). or the method {@link #get(Class, String)} * (get the decorator based on the type of decorator and the registred name). * <p/> * To sort a list of data, using a {@link JXPathDecorator}, use the method - * {@link #sort(JXPathDecorator, java.util.List, int)}. + * {@link #sort(JXPathDecorator, List, int)}. * <p/> * * @author tony @@ -43,7 +43,7 @@ public class DecoratorUtils { /** * Factory method to instanciate a new {@link PropertyDecorator} for the - * given class {@link O} and a readable property name. + * given class {@code internlaClass} and a readable property name. * * @param internalClass the class of the objects decorated by the new decorator * @param property the property @@ -63,7 +63,7 @@ public class DecoratorUtils { /** * Factory method to instanciate a new {@link JXPathDecorator} for the - * given class {@link O} and expression. + * given class {@code internalClass} and expression. * * @param internalClass the class of the objects decorated by the new decorator * @param expression the expression to use to decorated objects diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/swing/Item.java b/jaxx-runtime/src/main/java/jaxx/runtime/swing/Item.java index 2fe2caf..960ac67 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/swing/Item.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/swing/Item.java @@ -148,7 +148,7 @@ public class Item { /** * Remove all childs nodes * - * @param list of items to remove + * @param items list of items to remove */ public void removeChilds(List<Item> items) { if (children != null) { @@ -181,7 +181,7 @@ public class Item { /** * Set the parent of this item * - * @return the item parent (or null) + * @param parent the item parent (or null) */ public void setParent(Item parent) { this.parent = parent; diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeModel.java b/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeModel.java index 182a1c8..239b623 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeModel.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeModel.java @@ -27,7 +27,7 @@ public class NavigationTreeModel extends DefaultTreeModel { */ static private final Log log = LogFactory.getLog(NavigationTreeModel.class); /** - * The path separator used to build the {@link #fullPath}. + * The path separator used to build the {@link NavigationTreeNode#fullPath}. * * @see NavigationTreeNode#getNodePath() * @see NavigationTreeNode#getFullPath() @@ -51,7 +51,7 @@ public class NavigationTreeModel extends DefaultTreeModel { /** * Search from the root node a node named by his fully path (concatenation of nodes - * {@link NavigationTreeNode#navigationPath} valued separated by dot. + * {@link NavigationTreeNode#path} valued separated by dot. * <p/> * Example : * <p/> @@ -68,7 +68,7 @@ public class NavigationTreeModel extends DefaultTreeModel { * Apply first the regex pattern to obtain the searched node fi the given <code>regex</code> is not null. * <p/> * Search then from the root node a node named by his fully path (concatenation of nodes - * {@link NavigationTreeNode#navigationPath} valued separated by {@link #pathSeparator}. + * {@link NavigationTreeNode#path} valued separated by {@link #pathSeparator}. * <p/> * <p/> * Example : @@ -87,7 +87,7 @@ public class NavigationTreeModel extends DefaultTreeModel { * Apply first the regex pattern to obtain the searched node. * <p/> * Search then from the root node a node named by his fully path (concatenation of nodes - * {@link NavigationTreeNode#navigationPath} valued separated by {@link #pathSeparator}. + * {@link NavigationTreeNode#path} valued separated by {@link #pathSeparator}. * <p/> * Example : * <p/> @@ -103,7 +103,7 @@ public class NavigationTreeModel extends DefaultTreeModel { /** * Search from a given root node a node named by his fully path (concatenation of nodes - * {@link NavigationTreeNode#navigationPath} valued separated by {@link #pathSeparator}. + * {@link NavigationTreeNode#path} valued separated by {@link #pathSeparator}. * * @param root root node to be used * @param path the fully path of the searched node. @@ -117,7 +117,7 @@ public class NavigationTreeModel extends DefaultTreeModel { * Apply first the regex pattern to obtain the searched node. * <p/> * Search then from a given root node a node named by his fully path (concatenation of nodes) - * {@link NavigationTreeNode#navigationPath} valued separated by {@link #pathSeparator}. + * {@link NavigationTreeNode#path} valued separated by {@link #pathSeparator}. * * @param root root node to be used * @param path the fully path of the searched node. diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeNode.java b/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeNode.java index b2d7c97..932b0ed 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeNode.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeNode.java @@ -255,8 +255,8 @@ public class NavigationTreeNode extends DefaultMutableTreeNode { } /** - * @param path the name of the {@link #path} to be matched in the cild of this node. - * @return the child of this node with given {@link # path} value. + * @param path the name of the {@link #path} to be matched in the child of this node. + * @return the child of this node with given {@link #path} value. */ public NavigationTreeNode getChild(String path) { Enumeration<?> childs = children(); diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardOperationActionThread.java b/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardOperationActionThread.java index 92e7e26..aefe8cd 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardOperationActionThread.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardOperationActionThread.java @@ -12,7 +12,7 @@ import org.apache.commons.logging.LogFactory; * Thread qui réalise les opérations. * * Pour exécuter une nouvelle opération, on utilise la méthode - * {@link #launchOperation(SynchroActionWorker)}. + * {@link #launchOperation(WizardOperationStep)}. * * Note: Pour bloquer (ou débloquer) le thread, on utilise la méthode {@link #setWaiting(boolean)} * diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidator.java b/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidator.java index dcb93ca..abd7448 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidator.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidator.java @@ -328,9 +328,9 @@ public class BeanValidator<B> { * programmation, ce qui est utile par exemple si le bean ne supporte * pas les {@link PropertyChangeListener} * - * TODO la methode devra repasser en protected et on preperar utiliser la - * methode {@link #doRevalidate()} car {@link #validate()} ne modifie pas - * les etats internes et cela en rends son utilisation delicate (le + * TODO la methode devra repasser en protected et on utilise la + * methode {@link #doValidate()} car {@link #validate()} ne modifie pas + * les etats internes et cela en rend son utilisation delicate (le * validateur entre dans un etat incoherent par rapport aux messages envoyés). */ public void validate() { diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorListener.java b/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorListener.java index 54437c6..4024427 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorListener.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorListener.java @@ -1,7 +1,7 @@ package jaxx.runtime.validator; /** - * The listener contract to be used on {@link BeanValidator] + * The listener contract to be used on {@link BeanValidator} * * @author chemit * @since 1.3 diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorMessage.java b/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorMessage.java index 34f3373..4577f20 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorMessage.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorMessage.java @@ -3,7 +3,7 @@ package jaxx.runtime.validator; /** * The object to box a validation message. * - * @param <E> type of message (use for override {@link #compareTo(E)} method. + * @param <E> type of message (use for override {@link #compareTo(Object)} method. * * @author chemit * @since 1.3 @@ -15,7 +15,7 @@ public class BeanValidatorMessage<E extends BeanValidatorMessage<?>> implements */ protected BeanValidator<?> validator; /** - * the field thatproduce the message + * the field that produce the message */ protected BeanValidatorField<?> field; /** diff --git a/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java b/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java index 2b2578f..497edaa 100644 --- a/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java +++ b/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java @@ -53,7 +53,7 @@ import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; /** - * Classe permettant de transformer des sources jaxx vers du source java. + * Generates some java code from jaxx files. * * @author chemit * @goal generate @@ -113,8 +113,6 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi * If not given, will use the one defined in validator * * @parameter expression="${jaxx.defaultErrorUIFQN}" - * - * @see jaxx.runtime.validator.swing.SwingValidator */ protected String defaultErrorUIFQN; /** @@ -124,7 +122,7 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi * * @parameter expression="${jaxx.defaultDecoratorFQN}" default-value="jaxx.compiler.decorators.DefaultCompiledObjectDecorator" * - * @see jaxx.compiler.CompiledObjectDecorator + * @see jaxx.compiler.decorators.CompiledObjectDecorator */ protected String defaultDecoratorFQN; /** @@ -203,7 +201,7 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi * <p/> * add beanInfoSearchPath to be registred by {@link BeanInfoUtil#addJaxxBeanInfoPath(java.lang.String[])} * <p/> - * and then will be use by {@link jaxx.tags.swing.SwingInitializer#initialize()}. + * and then will be use by {@link jaxx.compiler.spi.DefaultInitializer#initialize()}. * <p/> * <p/> * This permit to use real beanInfo of imported graphic libraries. @@ -252,15 +250,17 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi */ protected String helpBrokerFQN; /** - * + * detected jaxx files in {@link #init()} method */ protected String[] files; /** + * file updater used to detect jaxx files. * + * <b>Note:</b> if {@link #verbose} flag is on, will ne be used */ protected MirroredFileUpdater updater; /** - * + * */ private Class<?> defaultErrorUIClass; /** @@ -283,6 +283,10 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi * */ private String[] extraImports; + /** + * + */ + private boolean nofiles; @SuppressWarnings("unchecked") @Override @@ -295,14 +299,39 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi } } - if (addSourcesToClassPath || addProjectClassPath) { - cl = initClassLoader(project, getLog()); - Thread.currentThread().setContextClassLoader(cl); - } else { - cl = getClass().getClassLoader(); - //cl = Thread.currentThread().getContextClassLoader(); + fixCompileSourceRoots(); + + if (includes == null || includes.length == 0) { + // use default includes + includes = INCLUDES; + } + updater = FileUpdaterHelper.newJaxxFileUpdater(src, outJava); + + Map<File, String[]> result = new HashMap<File, String[]>(); + getFilesToTreateForRoots(includes, excludes, Arrays.asList(src.getAbsolutePath()), result, force ? null : updater); + + this.files = result.get(src); + + nofiles = files == null || files.length == 0; + if (nofiles) { + return true; } +// if (addSourcesToClassPath || addProjectClassPath) { + cl = initClassLoader(project, + src, + addSourcesToClassPath, + testPhase, + addResourcesToClassPath, + addCompileClassPath, + addProjectClassPath); + + Thread.currentThread().setContextClassLoader(cl); +// } else { +// cl = getClass().getClassLoader(); + //cl = Thread.currentThread().getContextClassLoader(); +// } + compilerClass = (Class<? extends JAXXCompiler>) Class.forName(compilerFQN, false, cl); defaultDecoratorClass = (Class<? extends CompiledObjectDecorator>) Class.forName(defaultDecoratorFQN, false, cl); jaxxContextClass = (Class<? extends JAXXContext>) Class.forName(jaxxContextFQN, false, cl); @@ -324,25 +353,8 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi outJava.mkdirs(); } - fixCompileSourceRoots(); - - boolean noIncludes = includes == null || includes.length == 0; - - if (noIncludes) { - includes = INCLUDES; - } - updater = FileUpdaterHelper.newJaxxFileUpdater(src, outJava); - - Map<File, String[]> result = new HashMap<File, String[]>(); - getFilesToTreateForRoots(includes, excludes, Arrays.asList(src.getAbsolutePath()), result, force ? null : updater); - - this.files = result.get(src); - - if (files == null || files.length == 0) { - getLog().warn("No files to treate."); - return false; - } - + // compute extra imports (can not use java classes since some of + // imports can not be still compiled) if (extraImportList != null && !extraImportList.isEmpty()) { String[] imports = extraImportList.split(","); int i = 0; @@ -364,16 +376,22 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi @Override public void doAction() throws MojoExecutionException { - getLog().info("jaxx - detects " + this.files.length + " modify jaxx file(s). "); + if (nofiles) { + getLog().info("No files to treate."); + return; + } + + getLog().info("Detects " + files.length + " modify jaxx file(s). "); try { // force compiler init from here, not in a static block TagManager.reset(verbose); - JAXXCompilerLaunchor launchor = JAXXCompilerLaunchor.newLaunchor(src, files, this); + JAXXCompilerLaunchor launchor; + launchor = JAXXCompilerLaunchor.newLaunchor(src, files, this); boolean success = launchor.compile(); - getLog().info("jaxx - generate " + launchor.getCompilerCount() + " file(s). "); + getLog().info("Generated " + launchor.getCompilerCount() + " file(s). "); if (!success) { throw new MojoExecutionException("Aborting due to errors reported by jaxxc"); @@ -596,7 +614,7 @@ public class JaxxGeneratorMojo extends AbstractJaxxMojo implements CompilerConfi //TODO use the AbstractPublig method @SuppressWarnings({"unchecked"}) - protected URLClassLoader initClassLoader(MavenProject project, org.apache.maven.plugin.logging.Log log) throws MalformedURLException { + protected URLClassLoader initClasLoader(MavenProject project, org.apache.maven.plugin.logging.Log log) throws MalformedURLException { URLClassLoader loader = null; if (project != null) { diff --git a/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml b/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml index 5d1cc74..bb63409 100644 --- a/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml +++ b/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml @@ -17,6 +17,9 @@ <!--outResource>${basedir}/target/it-generated-sources/resources</outResource--> <jaxxContextFQN>java.lang.String</jaxxContextFQN> <force>true</force> + <includes> + <value>**/Evolution74Test/ok/*.jaxx</value> + </includes> </configuration> </plugin> </plugins> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.