Author: tchemit Date: 2009-10-07 19:37:55 +0200 (Wed, 07 Oct 2009) New Revision: 1564 Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/CompilerConfiguration.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/I18nHelper.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompilerLaunchor.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/UnsupportedAttributeException.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanDescriptor.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanInfo.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXEventSetDescriptor.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXFeatureDescriptor.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXIntrospector.java branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXPropertyDescriptor.java branches/jaxx-2.X/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/SwingUtil.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/decorator/DecoratorUtils.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/Item.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeModel.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeNode.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardOperationActionThread.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidator.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorListener.java branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorMessage.java branches/jaxx-2.X/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java branches/jaxx-2.X/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml Log: fix javadocs + improve messages in goal Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/CompilerConfiguration.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/CompilerConfiguration.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/CompilerConfiguration.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -14,73 +14,74 @@ /** * - * @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 @@ 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(); } Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/I18nHelper.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/I18nHelper.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/I18nHelper.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -7,9 +7,9 @@ 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 */ Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompilerLaunchor.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompilerLaunchor.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompilerLaunchor.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -105,7 +105,7 @@ } /** - * 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 */ Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/UnsupportedAttributeException.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/UnsupportedAttributeException.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/UnsupportedAttributeException.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -7,7 +7,7 @@ /** * 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 { Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanDescriptor.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanDescriptor.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanDescriptor.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -4,7 +4,7 @@ /** * 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 { Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanInfo.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanInfo.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXBeanInfo.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -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 { Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXEventSetDescriptor.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXEventSetDescriptor.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXEventSetDescriptor.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -5,7 +5,7 @@ /** * 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 { Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXFeatureDescriptor.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXFeatureDescriptor.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXFeatureDescriptor.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -7,7 +7,7 @@ /** * 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 { Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXIntrospector.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXIntrospector.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXIntrospector.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -24,7 +24,7 @@ * 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 { Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXPropertyDescriptor.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXPropertyDescriptor.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/beans/JAXXPropertyDescriptor.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -6,7 +6,7 @@ /** * 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 { Modified: branches/jaxx-2.X/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java =================================================================== --- branches/jaxx-2.X/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -52,7 +52,7 @@ 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 @@ try { super.run(); - //JAXXContext.get().close(); // force to kill main thread log.info(_("jaxxdemo.init.closed", new java.util.Date())); Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/SwingUtil.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/SwingUtil.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/SwingUtil.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -454,7 +454,7 @@ * * 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 @@ * @param parent * @param x * @param y - * @return + * @return the deppest component */ public static Component getDeepestObjectAt(Component parent, int x, int y) { Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/context/JAXXInitialContext.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -2,6 +2,7 @@ import java.awt.Container; import java.util.Map.Entry; +import jaxx.runtime.JAXXObject; /** * An initial context to be inject in a {@link JAXXObject}. Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/decorator/DecoratorUtils.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/decorator/DecoratorUtils.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/decorator/DecoratorUtils.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -24,11 +24,11 @@ * 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 @@ /** * 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 @@ /** * 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 Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/Item.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/Item.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/Item.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -148,7 +148,7 @@ /** * 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 @@ /** * 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; Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeModel.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeModel.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeModel.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -27,7 +27,7 @@ */ 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 @@ /** * 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 @@ * 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 @@ * 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 @@ /** * 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 @@ * 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. Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeNode.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeNode.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeNode.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -255,8 +255,8 @@ } /** - * @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(); Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardOperationActionThread.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardOperationActionThread.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardOperationActionThread.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -12,7 +12,7 @@ * 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)} * Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidator.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidator.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidator.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -328,9 +328,9 @@ * 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() { Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorListener.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorListener.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorListener.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -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 Modified: branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorMessage.java =================================================================== --- branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorMessage.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/jaxx-runtime/src/main/java/jaxx/runtime/validator/BeanValidatorMessage.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -3,7 +3,7 @@ /** * 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 @@ */ protected BeanValidator<?> validator; /** - * the field thatproduce the message + * the field that produce the message */ protected BeanValidatorField<?> field; /** Modified: branches/jaxx-2.X/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java =================================================================== --- branches/jaxx-2.X/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java 2009-10-07 17:37:55 UTC (rev 1564) @@ -53,7 +53,7 @@ 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 @@ * 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 @@ * * @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 @@ * <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 @@ */ 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 @@ * */ private String[] extraImports; + /** + * + */ + private boolean nofiles; @SuppressWarnings("unchecked") @Override @@ -295,14 +299,39 @@ } } - 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 @@ 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 @@ @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 @@ //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) { Modified: branches/jaxx-2.X/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml =================================================================== --- branches/jaxx-2.X/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml 2009-10-07 14:23:35 UTC (rev 1563) +++ branches/jaxx-2.X/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml 2009-10-07 17:37:55 UTC (rev 1564) @@ -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>