Jaxx-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
September 2009
- 2 participants
- 10 discussions
Author: tchemit
Date: 2009-09-30 15:40:43 +0200 (Wed, 30 Sep 2009)
New Revision: 1540
Modified:
trunk/jaxx-example/pom.xml
Log:
add do profile to test webstart
Modified: trunk/jaxx-example/pom.xml
===================================================================
--- trunk/jaxx-example/pom.xml 2009-09-30 13:16:10 UTC (rev 1539)
+++ trunk/jaxx-example/pom.xml 2009-09-30 13:40:43 UTC (rev 1540)
@@ -296,6 +296,88 @@
</plugins>
</build>
</profile>
+
+ <!-- by default jnlp is only perform on a release stage when using the maven-release-plugin -->
+ <profile>
+ <id>webstart-profile</id>
+ <activation>
+ <property>
+ <name>doWebstart</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.nuiton.thirdparty</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jnlp-inline</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
+ <execution>
+ <id>JnlpSun</id>
+ <phase>verify</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${jnlp.build.directory}" />
+ <copy file="${project.basedir}/src/main/jnlp/sun.jnlp" verbose="${maven.verbose}" todir="${jnlp.build.directory}" failonerror="false">
+ <filterset>
+ <filter token="lib" value="javahelp-${javahelp.version}.jar" />
+ <filter token="url" value="${jnlp.url}" />
+ </filterset>
+ </copy>
+ <copy file="${project.basedir}/src/main/jnlp/jxlayer.jnlp" verbose="${maven.verbose}" todir="${jnlp.build.directory}" failonerror="false">
+ <filterset>
+ <filter token="lib" value="jxlayer-${jxlayer.version}.jar" />
+ <filter token="url" value="${jnlp.url}" />
+ </filterset>
+ </copy>
+ <copy file="${project.build.directory}/lib/javahelp-${javahelp.version}.jar" verbose="${maven.verbose}" todir="${jnlp.build.directory}/lib" failonerror="false" />
+ <copy file="${project.build.directory}/lib/jxlayer-${jxlayer.version}.jar" verbose="${maven.verbose}" todir="${jnlp.build.directory}/lib" failonerror="false" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>JnlpToSite</id>
+ <phase>pre-site</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="target/site" />
+ <copy todir="target/site" verbose="${maven.verbose}" failonerror="false" overwrite="false">
+ <fileset dir="${jnlp.build.directory}">
+ <include name="**" />
+ </fileset>
+ </copy>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
-</project>
\ No newline at end of file
+</project>
1
0
r1539 - trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation
by sletellier@users.nuiton.org 30 Sep '09
by sletellier@users.nuiton.org 30 Sep '09
30 Sep '09
Author: sletellier
Date: 2009-09-30 15:16:10 +0200 (Wed, 30 Sep 2009)
New Revision: 1539
Modified:
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeCellRenderer.java
Log:
Hack for remove ... of node's label
Modified: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeCellRenderer.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeCellRenderer.java 2009-09-30 12:20:05 UTC (rev 1538)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeCellRenderer.java 2009-09-30 13:16:10 UTC (rev 1539)
@@ -68,7 +68,6 @@
if (minWidth != null){
if (delegate.getPreferredSize().getWidth() < minWidth) {
- log.info(minWidth);
delegate.setPreferredSize(new Dimension(minWidth, (int) delegate
.getPreferredSize().getHeight()));
}
@@ -104,7 +103,7 @@
}
/**
- * @return max width to decorate nodes
+ * @return min width to decorate nodes
*/
public Integer getMinWidth() {
return minWidth;
1
0
r1538 - trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation
by sletellier@users.nuiton.org 30 Sep '09
by sletellier@users.nuiton.org 30 Sep '09
30 Sep '09
Author: sletellier
Date: 2009-09-30 14:20:05 +0200 (Wed, 30 Sep 2009)
New Revision: 1538
Modified:
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeCellRenderer.java
Log:
Hack for remove ... of node's label
Modified: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeCellRenderer.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeCellRenderer.java 2009-09-29 14:39:02 UTC (rev 1537)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/navigation/NavigationTreeCellRenderer.java 2009-09-30 12:20:05 UTC (rev 1538)
@@ -13,6 +13,7 @@
import javax.swing.tree.TreeCellRenderer;
import javax.swing.tree.TreePath;
import java.awt.Component;
+import java.awt.Dimension;
/**
* A simple cell renderer which use the {@link NavigationTreeNode#renderer} to display node.
@@ -30,6 +31,8 @@
protected static long t = 0;
+ protected Integer minWidth = null;
+
public NavigationTreeCellRenderer(JAXXContext context) {
this.context = context;
UIManager.put("Tree.rendererFillBackground", false);
@@ -43,25 +46,35 @@
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
+ Component result = delegate;
+
TreePath path = tree.getPathForRow(row);
- if (path == null) {
- return delegate;
- }
+ if (path != null) {
- if (value != null) {
- long t0 = System.nanoTime();
- NodeRenderer renderer = getNodeRenderer(value);
- long t1 = System.nanoTime();
- if (renderer != null) {
- value = renderer.toString(context);
- long t2 = System.nanoTime();
- if (log.isDebugEnabled()) {
- log.debug("use renderer [" + (t++) + "]<" + row + ">" + renderer.decorator + " <" + StringUtil.convertTime(t0, t1) + "/" + StringUtil.convertTime(t1, t2) + ">");
+ if (value != null) {
+ long t0 = System.nanoTime();
+ NodeRenderer renderer = getNodeRenderer(value);
+ long t1 = System.nanoTime();
+ if (renderer != null) {
+ value = renderer.toString(context);
+ long t2 = System.nanoTime();
+ if (log.isDebugEnabled()) {
+ log.debug("use renderer [" + (t++) + "]<" + row + ">" + renderer.decorator + " <" + StringUtil.convertTime(t0, t1) + "/" + StringUtil.convertTime(t1, t2) + ">");
+ }
}
}
+ result = delegate.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
}
- return delegate.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
+ if (minWidth != null){
+ if (delegate.getPreferredSize().getWidth() < minWidth) {
+ log.info(minWidth);
+ delegate.setPreferredSize(new Dimension(minWidth, (int) delegate
+ .getPreferredSize().getHeight()));
+ }
+ }
+
+ return result;
}
/**
@@ -90,4 +103,20 @@
return value instanceof NavigationTreeNode ? (NavigationTreeNode) value : null;
}
+ /**
+ * @return max width to decorate nodes
+ */
+ public Integer getMinWidth() {
+ return minWidth;
+ }
+
+ /**
+ * This hack remove the ... from the node. For not use this, MinWidth can be null (by default).
+ * bugfix from http://forums.sun.com/thread.jspa?forumID=256&threadID=277338
+ * hack from : http://forums.sun.com/thread.jspa?threadID=542069&tstart=824
+ * @param min width to decorate nodes
+ */
+ public void setMinWidth(Integer minWidth) {
+ this.minWidth = minWidth;
+ }
}
1
0
Author: tchemit
Date: 2009-09-29 16:39:02 +0200 (Tue, 29 Sep 2009)
New Revision: 1537
Modified:
trunk/pom.xml
Log:
mavenpom use now maven-helper-plugin 1.1.0
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-09-29 14:09:17 UTC (rev 1536)
+++ trunk/pom.xml 2009-09-29 14:39:02 UTC (rev 1537)
@@ -329,9 +329,6 @@
<javahelp.version>2.0.02</javahelp.version>
- <!-- must be removed after mavenpom release, avoid hudson to break -->
- <helper.version>1.1.0-SNAPSHOT</helper.version>
-
</properties>
<build>
1
0
Author: tchemit
Date: 2009-09-29 16:09:17 +0200 (Tue, 29 Sep 2009)
New Revision: 1536
Added:
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxHelpGeneratorMojo.java
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/NodeItem.java
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/TemplateGenerator.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1722Test.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1750Test.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1751Test.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerValidatorTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/DecoratorTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/I18nTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/NodeItemTest.java
trunk/maven-jaxx-plugin/src/test/resources/org/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/Bug_1722.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/DemoPanel.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/JButtonDemo.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/Bug_1750.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/ComboBox.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Bug_1751.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test1.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test3.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/CSSTests.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChild.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChildButton.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Pseudoclasses.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/SimpleCSS.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ClassReferences.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ConstructorReferenceTest.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXReferenceTest.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXTest.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JavaTaist.java
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/StaticMethodTest.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/TypeReference.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClientProperty.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Errors.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Force.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Icon.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers/Initializers.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses/InnerClasses.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/NoLog.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/CurrentTime.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverriddenCurrentTime.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverridingDataBindings.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script/JScriptInitializer.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest1.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest1.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest1.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/SpecialSubclassing.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/WithLog.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/clientProperty/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/clientProperty/TestOne.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/AmbiguousName.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/BadTypeConversions.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/CellOutsideOfRow.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ChildrenInNonContainer.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ClassNotFound.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConflictingPackages.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConstraintsParseError.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DataBindingParseError.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DuplicateIDs.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/EventHandlerParseError.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidID.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidRootTag.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidXML.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemDuplicateValues.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemNoValue.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/MixedContent.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowOutsideOfTable.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowWrongChild.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptNotFound.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptParseError.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptSourceAndInline.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleNotFound.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleParseError.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleSourceAndInline.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabOutsideOfTabbedPane.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabbedPaneWrongChild.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TableWrongChild.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyCellChildren.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyScrollPaneChildren.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManySplitPaneChildren.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyTabChildren.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedAttribute.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedEvent.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedPseudoclass.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.css
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.script
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/force/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/force/JButton.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/icon/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/icon/Test1.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLog.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLogSon.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/NoLog.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/WithLog.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorErrors.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorOk.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/AutoFieldComponentNotFound.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorListModel.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorTableModel.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedFieldInSameValidator.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldBeanPropertyNotFound.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentDuplicated.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/Model.java
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/NoBean.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundBean.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorList.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorListModel.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorTable.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorTableModel.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundParentValidator.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Identity.java
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Model.java
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Validation.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/ValidationBeanClass.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/BoxedDecorator.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/Decorator.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nText.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nTitle.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nToolTipText.xml
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/text/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/text/JButton.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JDialog.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JButton.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane2.jaxx
trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane3.jaxx
Removed:
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/AbstractJaxxMojo.java
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxGeneratorMojo.java
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxHelpGeneratorMojo.java
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/NodeItem.java
trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/TemplateGenerator.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1722Test.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1750Test.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1751Test.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerValidatorTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/DecoratorTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/I18nTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/JaxxBaseTest.java
trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/NodeItemTest.java
Modified:
trunk/maven-jaxx-plugin/pom.xml
trunk/pom.xml
Log:
- use mavenpom 1.0.3, maven-helper-plugin 1.1.0, junit 4.7
- [Evolution #68] utilisation du framework mojo maven-helper-plugin
Modified: trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- trunk/maven-jaxx-plugin/pom.xml 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/pom.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -61,14 +61,14 @@
</dependency>
<!-- tests dependencies -->
-
+<!--
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
-
+-->
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
@@ -92,6 +92,11 @@
</dependency>
<dependency>
+ <groupId>org.apache.maven.plugin-testing</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.nuiton</groupId>
<artifactId>maven-helper-plugin</artifactId>
<classifier>tests</classifier>
Deleted: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/AbstractJaxxMojo.java
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/AbstractJaxxMojo.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/AbstractJaxxMojo.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,170 +0,0 @@
-/* *##%
- * Copyright (C) 2007
- * JaxxPlugin, Code Lutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *##%*/
-package org.nuiton.jaxx;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProject;
-
-import java.io.File;
-
-/**
- * Abract Jaxx Mojo.
- *
- * @author chemit
- *
- * @since 1.3
- */
-public abstract class AbstractJaxxMojo extends AbstractMojo {
-
- /**
- * Dépendance du projet.
- *
- * @parameter default-value="${project}"
- * @required
- * @readonly
- */
- protected MavenProject project;
- /**
- * Repertoire de destination des fichiers java a generer.
- *
- * @parameter expression="${jaxx.outJava}" default-value="${basedir}/target/generated-sources/java"
- */
- protected File outJava;
- /**
- * verbose flag
- *
- * @parameter expression="${jaxx.verbose}" default-value="false"
- *
- * @since 1.3
- */
- protected boolean verbose;
- /**
- * to make compiler i18nable, says add the {@link org.nuiton.i18n.I18n#_(String, Object[])} method
- * invocation on {@link jaxx.compiler.I18nHelper#I18N_ATTRIBUTES} attributes.
- *
- * @parameter expression="${jaxx.i18nable}" default-value="true"
- * @see jaxx.compiler.I18nHelper
- */
- protected boolean i18nable;
- /**
- * The store of helpIds generated by {@link JaxxGeneratorMojo}.
- * <p/>
- *
- * @parameter expression="${jaxx.helpIdStore}" default-value="target/helpIds.properties"
- * @required
- *
- * @since 1.3
- */
- protected File helpIdStore;
- /**
- * The name of the helpset to generate.
- *
- * @parameter expression="${jaxx.helpSetName}" default-value="${project.artifactId}"
- * @required
- *
- * @since 1.3
- */
- protected String helpSetName;
- /**
- * The prefix to add to i18n key for any help i18n key.
- *
- * @parameter expression="${jaxx.helpsetI18nPrefix}" default-value="${jaxx.helpSetName}.help."
- * @required
- *
- * @since 1.3
- */
- protected String helpsetI18nPrefix;
- /**
- * The suffix to add to i18n key for an help Id.
- *
- * @parameter expression="${jaxx.helpsetTitleI18nSuffix}" default-value=".title"
- * @required
- *
- * @since 1.3
- */
- protected String helpsetTitleI18nSuffix;
- /**
- * The suffix to add to i18n key for an toc Id.
- *
- * @parameter expression="${jaxx.helpsetTocI18nSuffix}" default-value=".toc"
- * @required
- *
- * @since 1.3
- */
- protected String helpsetTocI18nSuffix;
- /**
- * The suffix to add to i18n key for an toc Id.
- *
- * @parameter expression="${jaxx.helpsetIndexI18nSuffix}" default-value=".index"
- * @required
- *
- * @since 1.3
- */
- protected String helpsetIndexI18nSuffix;
- protected boolean skip = true;
- protected ClassLoader cl;
-
- public abstract void init() throws Exception;
-
- public abstract void doAction() throws Exception;
-
- @Override
- public void execute() throws MojoExecutionException, MojoFailureException {
-
- try {
- init();
- } catch (Exception e) {
- if (e instanceof MojoFailureException) {
- throw (MojoFailureException) e;
- }
- if (e instanceof MojoExecutionException) {
- throw (MojoExecutionException) e;
- }
- throw new MojoExecutionException("error in init : " + e.getMessage(), e);
- }
-
- if (skip) {
- if (verbose) {
- getLog().info("jaxx - skip!");
- }
- return;
- }
-
- try {
-
- doAction();
-
- } catch (Exception e) {
- //getLog().error(e);
- Throwable e2 = e;
- while (e2.getCause() != null) {
- e2 = e.getCause();
- }
- getLog().error(e2);
-
- throw new MojoExecutionException(e2.getMessage(), e2);
- } finally {
- System.gc();
- }
-
- }
-
-}
\ No newline at end of file
Deleted: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxGeneratorMojo.java
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxGeneratorMojo.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxGeneratorMojo.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,652 +0,0 @@
-/* *##%
- * Copyright (C) 2007
- * JaxxPlugin, Code Lutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *##%*/
-package org.nuiton.jaxx;
-
-import jaxx.beaninfos.BeanInfoUtil;
-import jaxx.compiler.CompilerOptions;
-import jaxx.compiler.JAXXCompiler;
-import jaxx.compiler.JAXXCompilerLaunchor;
-import jaxx.runtime.JAXXContext;
-import jaxx.tags.TagManager;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.nuiton.util.FileUpdaterHelper;
-import org.nuiton.util.MirroredFileUpdater;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.lang.reflect.Modifier;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import jaxx.compiler.CompiledObjectDecorator;
-import jaxx.compiler.HelpRootCompiledObjectDecorator;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.model.Resource;
-import org.apache.maven.project.MavenProject;
-
-/**
- * Classe permettant de transformer des sources jaxx vers du source java.
- *
- * @author chemit
- * @goal generate
- * @phase process-sources
- * @requiresDependencyResolution compile
- * @requiresProject
- */
-public class JaxxGeneratorMojo extends AbstractJaxxMojo {
-
- /**
- * Le compilateur à utiliser (par défaut celui de Swing)
- *
- * @parameter expression="${jaxx.compilerFQN}" default-value="jaxx.compiler.SwingCompiler"
- */
- protected String compilerFQN;
- /**
- * Le compilateur à utiliser (par défaut celui de Swing)
- *
- * @parameter expression="${jaxx.validatorFQN}" default-value="jaxx.runtime.validator.swing.SwingValidator"
- */
- protected String validatorFQN;
- /**
- * chemin du repertoire de generation des resources.
- *
- * @parameter expression="${jaxx.outResource}" default-value="${basedir}/target/generated-sources/resources"
- */
- protected File outResource;
- /**
- * chemin du repertoire de compilation des resources.
- *
- * @parameter expression="${jaxx.outClass}" default-value="${basedir}/target/classes"
- */
- protected File outClass;
- /**
- * Repertoire sources des fichiers jaxx a generer.
- *
- * @parameter expression="${jaxx.src}" default-value="${maven.src.dir}/main/java"
- */
- protected File src;
- /**
- * pour optimizer le code compile ou genere ?
- *
- * @parameter expression="${jaxx.optimize}" default-value="false"
- */
- protected boolean optimize;
- /**
- * les options de la compilation
- *
- * @parameter expression="${jaxx.javaOpts}"
- */
- protected String javaOpts = null;
- /**
- * pour filter les fichiers a traiter
- *
- * @parameter expression="${jaxx.includes}"
- */
- protected String[] includes;
- /**
- * pour filter les fichiers a ne pas traiter
- *
- * @parameter expression="${jaxx.excludes}"
- */
- protected String[] excludes;
- /**
- * flag to include in compiler classpath the java sources directories (src and outJava).
- * <p/>
- * By default, false.
- *
- * @parameter expression="${jaxx.addSourcesToClassPath}" default-value="false"
- */
- protected boolean addSourcesToClassPath;
- /**
- * flag to include in compiler classpath the java resources directories (src and outJava).
- * <p/>
- * By default, false.
- *
- * @parameter expression="${jaxx.addResourcesToClassPath}" default-value="false"
- * @since 1.6.0
- */
- protected boolean addResourcesToClassPath;
- /**
- * flag to include in compiler classpath the compile class-path (can only be used in a test phase).
- * <p/>
- * By default, false.
- *
- * @parameter expression="${jaxx.addCompileClassPath}" default-value="false"
- * @since 1.6.0
- */
- protected boolean addCompileClassPath;
- /**
- * flag to include in compiler classpath the project compile classpath.
- * <p/>
- * By default, false.
- *
- * @parameter expression="${jaxx.addProjectClassPath}" default-value="false"
- */
- protected boolean addProjectClassPath;
- /**
- * to force generation of java source for any jaxx files with no timestamp checking.
- * <p/>
- * By default, never force generation.
- *
- * @parameter expression="${jaxx.force}" default-value="false"
- */
- protected boolean force;
- /**
- * flag to add logger to each generated jaxx file.
- * <p/>
- * By default, always add it.
- *
- * @parameter expression="${jaxx.addLogger}" default-value="true"
- */
- protected boolean addLogger;
- /**
- * flag to keep compilers after the generate operation (usefull for tests.
- * <p/>
- * By default, always reset.
- *
- * @parameter expression="${jaxx.resetAfterCompile}" default-value="true"
- */
- protected boolean resetAfterCompile;
- /**
- * the name of implementation of {@link jaxx.runtime.JAXXContext}
- * to be used on {@link jaxx.runtime.JAXXObject}.
- * <p/>
- * Must not be abstract.
- *
- * @parameter expression="${jaxx.jaxxContextImplementorClass}" default-value="jaxx.runtime.DefaultJAXXContext"
- * @required
- */
- protected String jaxxContextImplementorClass;
- /**
- * extra path to be added in {@link java.beans.Introspector#setBeanInfoSearchPath(String[])}.
- * <p/>
- * add beanInfoSearchPath to be registred by {@link BeanInfoUtil#addJaxxBeanInfoPath(String[])}
- * <p/>
- * and then will be use by {@link jaxx.tags.swing.SwingInitializer#initialize()}.
- * <p/>
- * <p/>
- * This permit to use real beanInfo of imported graphic libraries.
- *
- * @parameter expression="${jaxx.beanInfoSearchPath}"
- */
- protected String[] beanInfoSearchPath;
- /**
- * list of fqn of class toimport for all generated jaxx files
- *
- * @parameter expression="${jaxx.extraImports}"
- *
- * @deprecated Prefer use of extraImportList as a string, so
- * could be use in properties section.
- */
- protected String[] extraImports;
- /**
- * list of fqn of class toimport for all generated jaxx files
- *
- * @parameter expression="${jaxx.extraImportList}"
- */
- protected String extraImportList;
- /**
- * the FQN of the ui to use for error notification.
- * <p/>
- * If not given, will use the one defined in validator
- *
- * @parameter expression="${jaxx.defaultErrorUIFQN}"
- * @see jaxx.runtime.validator.swing.SwingValidator#DEFAULT_UI_CLASS
- */
- protected String defaultErrorUIFQN;
- /**
- * the FQN of the ui to use for error notification.
- * <p/>
- * If not given, will use the one defined in validator
- *
- * @parameter expression="${jaxx.defaultDecorator}" default-value="jaxx.compiler.DefaultCompiledObjectDecorator"
- *
- * @see jaxx.compiler.CompiledObjectDecorator
- */
- protected String defaultDecoratorFQN;
- /**
- * a flag to use UIManager to retreave icons.
- *
- * @parameter expression="${jaxx.useUIManagerForIcon}" default-value="false"
- */
- protected boolean useUIManagerForIcon;
- /**
- * flag to activate profile mode.
- * <p/>
- * By default, not active.
- *
- * @parameter expression="${jaxx.profile}" default-value="false"
- */
- protected boolean profile;
- /**
- * flag to activate help generation process.
- * <p/>
- * By default, not active.
- *
- * @parameter expression="${jaxx.generateHelp}" default-value="false"
- *
- * @since 1.3
- */
- protected boolean generateHelp;
- /**
- * the FQN of help broker
- * <p/>
- * By default, none.
- *
- * @parameter expression="${jaxx.helpBrokerFQN}"
- *
- * @since 1.3
- */
- protected String helpBrokerFQN;
- /**
- * A flag to mark themojo to be used in a test phase. This will permits to add generated sources in test compile roots.
- *
- * @parameter expression="${jaxx.testPhase}" default-value="false"
- * @since 1.6.0
- */
- protected boolean testPhase;
- protected String[] files;
- private static final String[] INCLUDES = {"**\\/*.jaxx"};
- protected CompilerOptions options;
- protected MirroredFileUpdater updater;
- private Class<?> defaultErrorUIClass;
- private Class<?> validatorClass;
- private Class<? extends CompiledObjectDecorator> defaultDecoratorClass;
- private Class<? extends JAXXCompiler> compilerClass;
-
- @SuppressWarnings("unchecked")
- @Override
- public void init() throws Exception {
-
- if (project != null && ("pom".equals(project.getPackaging()) || "site".equals(project.getPackaging()))) {
- // nothing to be done for this type of packaging
- skip = true;
- getLog().info("skip generate goal for packaging " + project.getPackaging());
- return;
- }
-
- if (generateHelp) {
- // check there is some bundle
- if (helpIdStore == null) {
- throw new MojoFailureException("you must set the helpIdStore property.");
- }
- }
- skip = false;
-
- checkJaxxContextImplementorClass();
-
- if (beanInfoSearchPath != null && beanInfoSearchPath.length > 0) {
- // register extra path
- BeanInfoUtil.addJaxxBeanInfoPath(beanInfoSearchPath);
- }
- if (!outResource.exists()) {
- outResource.mkdirs();
- }
-
- if (!outJava.exists()) {
- outJava.mkdirs();
- }
-
- fixCompileSourceRoots();
-
- if (addSourcesToClassPath || addProjectClassPath) {
- cl = initClassLoader(project, getLog());
- 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);
-
- // check the validator class is correct
- validatorClass = Class.forName(validatorFQN, false, cl);
-
- if (defaultErrorUIFQN != null && !defaultErrorUIFQN.trim().isEmpty()) {
- defaultErrorUIClass = Class.forName(defaultErrorUIFQN, false, cl);
- }
-
- DirectoryScanner ds;
- ds = new DirectoryScanner();
- ds.setBasedir(src);
- boolean noIncludes = includes == null || includes.length == 0;
- ds.setIncludes(noIncludes ? INCLUDES : includes);
-
- if (excludes != null && excludes.length > 0) {
- ds.setExcludes(excludes);
- }
-
- ds.scan();
- String[] filesFind = ds.getIncludedFiles();
- if (verbose) {
- getLog().info("jaxx - discover " + filesFind.length + " jaxx file(s). ");
- }
-
- updater = FileUpdaterHelper.newJaxxFileUpdater(src, outJava);
-
- if (force) {
- // we will regenerate all files
- this.files = filesFind;
- } else {
- // filter files
- List<String> listFiles = new ArrayList<String>();
-
- for (String file : filesFind) {
- if (updater.isFileUpToDate(new File(src, file))) {
- if (verbose) {
- getLog().info("jaxx - skip file [" + file + "].");
- }
- } else {
- if (verbose) {
- getLog().info("jaxx - detect modify file [" + file + "].");
- }
- listFiles.add(file);
- }
- }
- this.files = listFiles.toArray(new String[listFiles.size()]);
- }
-
- if (extraImportList != null && !extraImportList.isEmpty()) {
- String[] imports = extraImportList.split(",");
- int i = 0;
- for (String importS : imports) {
- imports[i++] = importS.trim();
- }
- if (verbose) {
- getLog().info("extra imports " + java.util.Arrays.toString(imports));
- }
- extraImports = imports;
-
- }
- options = toCompilerOptions();
-
- if (verbose) {
- printInit();
- }
-
- }
-
- @Override
- public void doAction() throws MojoExecutionException {
- getLog().info("jaxx - detects " + this.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, options);
- boolean success = launchor.compile();
- getLog().info("jaxx - generate " + launchor.getCompilerCount() + " file(s). ");
-
- if (!success) {
- throw new MojoExecutionException("Aborting due to errors reported by jaxxc");
- }
-
- if (generateHelp) {
- // generate help
- generateHelp();
- }
-
- } catch (MojoExecutionException e) {
- getLog().error(e);
- throw e;
- } catch (Exception e) {
- //getLog().error(e);
- Throwable e2 = e;
- while (e2.getCause() != null) {
- e2 = e.getCause();
- }
- getLog().error(e2);
-
- throw new MojoExecutionException(e2.getMessage(), e2);
- }
- }
-
- public CompilerOptions toCompilerOptions() {
- CompilerOptions result = new CompilerOptions();
- result.setClassPath(src.getPath());
- if (javaOpts != null && !"".equals(javaOpts)) {
- result.setJavacOpts(javaOpts);
- }
- result.setCompilerClass(compilerClass);
- result.setValidatorFQN(validatorFQN);
- result.setValidatorClass(validatorClass);
- result.setKeepJavaFiles(true);
- result.setOptimize(optimize);
- result.setJavacTargetDirectory(outClass);
- result.setTargetDirectory(outJava);
- result.setVerbose(verbose);
- result.setI18nable(i18nable);
- result.setAddLogger(addLogger);
- result.setProfile(profile);
- result.setResetAfterCompile(resetAfterCompile);
- result.setJaxxContextImplementorClass(jaxxContextImplementorClass);
- result.setExtraImports(extraImports);
- result.setDefaultErrorUI(defaultErrorUIClass);
- result.setUseUIManagerForIcon(useUIManagerForIcon);
- result.setDefaultDecoratorClass(defaultDecoratorClass);
- result.setGenerateHelp(generateHelp);
- result.setHelpBrokerFQN(helpBrokerFQN);
- result.setHelpsetTitleI18nSuffix(helpsetTitleI18nSuffix);
- result.setHelpsetIndexI18nSuffix(helpsetIndexI18nSuffix);
- result.setHelpsetTocI18nSuffix(helpsetTocI18nSuffix);
- result.setHelpSetName(helpSetName);
- result.setHelpsetI18nPrefix(helpsetI18nPrefix);
-
- if (cl != null) {
- result.setClassLoader(cl);
- }
- return result;
- }
-
- protected void fixCompileSourceRoots() {
-// //fixme should remove this silly test when we will make real maven plugin tests :)
-// if (project != null) {
-// if (!project.getCompileSourceRoots().contains(outJava.getPath())) {
-// project.addCompileSourceRoot(outJava.getPath());
-// }
-// }
- if (project == null) {
- // no project defined, can not fix anything
- // this case could appears if we wanted to do some tests of the plugin
- return;
- }
-
- if (testPhase) {
- if (!project.getTestCompileSourceRoots().contains(
- outJava.getPath())) {
- getLog().info("Add test compile source root : " + outJava);
- project.addTestCompileSourceRoot(outJava.getPath());
- }
- } else {
- if (!project.getCompileSourceRoots().contains(outJava.getPath())) {
- getLog().info("Add compile source root : " + outJava);
- project.addCompileSourceRoot(outJava.getPath());
- }
- }
- }
-
- protected void printInit() {
- getLog().info(options.toString());
- getLog().info("includes : " + Arrays.toString(includes));
- for (String file : files) {
- getLog().info("will generate " + file);
- }
-
- ClassLoader threadLoader = Thread.currentThread().getContextClassLoader();
- getLog().info(threadLoader.toString());
- if (threadLoader.getClass().getSimpleName().equals("RealmClassLoader")) {
- try {
- java.lang.reflect.Method m = threadLoader.getClass().getDeclaredMethod("getURLs");
- m.setAccessible(true);
- URL[] urls = (URL[]) m.invoke(threadLoader);
-
- for (URL url : urls) {
- getLog().info("url in class loader " + url);
- }
- } catch (Exception e) {
- getLog().warn("??? : " + e.getMessage(), e);
- }
- }
-
- //fixme should remove this silly test when we will make real maven plugin tests :)
- if (getPluginContext() != null) {
- for (Object e : getPluginContext().keySet()) {
- getLog().info("pluginContext " + e + " : " + getPluginContext().get(e));
- }
- }
- }
-
- protected void checkJaxxContextImplementorClass() {
- if (jaxxContextImplementorClass == null) {
- throw new IllegalArgumentException("jaxxContextImplementor can not be null");
- }
- try {
- Class<?> jaxxContextImplementor = Class.forName(jaxxContextImplementorClass);
- if (!JAXXContext.class.isAssignableFrom(jaxxContextImplementor)) {
- throw new IllegalArgumentException("jaxxContextImplementor '" + jaxxContextImplementor + "' does not implements " + JAXXContext.class);
- }
- if (Modifier.isAbstract(jaxxContextImplementor.getModifiers())) {
- throw new IllegalArgumentException("jaxxContextImplementor '" + jaxxContextImplementor + "' can not be abstract.");
-
- }
- } catch (ClassNotFoundException e) {
- throw new IllegalArgumentException("could not find jaxxContextImplementor class : " + jaxxContextImplementorClass);
- }
- }
-
- protected void generateHelp() throws IOException {
- Set<String> helpIds = HelpRootCompiledObjectDecorator.getHelpIds();
- if (helpIds.isEmpty()) {
- if (verbose) {
- // no ids detected in this compilation round
- getLog().info("no helpIds detected.");
- }
- return;
- }
-
- if (!helpIdStore.getParentFile().exists()) {
- helpIdStore.getParentFile().mkdirs();
- }
-
- Properties p = new Properties();
-
- for (String helpId : helpIds) {
- String path = helpId.replaceAll("\\.", File.separator);
- path = removeQuote(path) + ".html";
- p.put(removeQuote(helpId), path);
- }
-
- FileOutputStream w = new FileOutputStream(helpIdStore);
-
- try {
- p.store(w, null);
- } finally {
- w.close();
- }
-
- getLog().info("helpIdStore generated in " + helpIdStore);
-
- helpIds.clear();
- }
-
- @SuppressWarnings({"unchecked"})
- protected URLClassLoader initClassLoader(MavenProject project, org.apache.maven.plugin.logging.Log log) throws MalformedURLException {
- URLClassLoader loader = null;
- if (project != null) {
-
- URLClassLoader result;
- try {
-
- List<URL> lUrls = new ArrayList<URL>();
- List<String> sources = project.getCompileSourceRoots();
-
- if (addSourcesToClassPath) {
- for (String source : sources) {
- lUrls.add(new File(source).toURI().toURL());
- }
- if (testPhase) {
- for (Object source : project.getTestCompileSourceRoots()) {
- lUrls.add(new File(source.toString()).toURI().toURL());
- }
- }
- }
- if (addResourcesToClassPath) {
- for (Object source : project.getResources()) {
- Resource r = (Resource) source;
- lUrls.add(new File(r.getDirectory()).toURI().toURL());
- }
- }
- if (testPhase && addCompileClassPath) {
- if (project != null) {
- lUrls.add(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
- }
- }
- if (addProjectClassPath) {
- getLog().info("use project compile scope class-path");
- // add also all dependencies of the project in compile scope
- Set<?> artifacts = project.getArtifacts();
- for (Object o : artifacts) {
- Artifact a = (Artifact) o;
- lUrls.add(a.getFile().toURI().toURL());
- }
- }
-
- result = new URLClassLoader(lUrls.toArray(new URL[lUrls.size()]), getClass().getClassLoader());
-
- } catch (IOException e) {
- throw new RuntimeException("Can't create ClassLoader for reason " + e.getMessage(), e);
- }
- loader = result;
- } else {
- List<URL> lUrls = new ArrayList<URL>();
- if (addSourcesToClassPath) {
- lUrls.add(src.toURI().toURL());
- }
- loader = new URLClassLoader(lUrls.toArray(new URL[lUrls.size()]), getClass().getClassLoader());
- }
- if (verbose) {
- for (URL entry : loader.getURLs()) {
- log.info("classpath : " + entry);
- }
- }
- return loader;
- }
-
- protected String removeQuote(String txt) {
- if (txt.startsWith("\"")) {
- txt = txt.substring(1);
- }
- if (txt.endsWith("\"")) {
- txt = txt.substring(0, txt.length() - 1);
- }
- return txt;
- }
-}
Deleted: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxHelpGeneratorMojo.java
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxHelpGeneratorMojo.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxHelpGeneratorMojo.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,791 +0,0 @@
-/* *##%
- * Copyright (C) 2007
- * JaxxPlugin, Code Lutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *##%*/
-package org.nuiton.jaxx;
-
-import org.apache.maven.plugin.MojoFailureException;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Stack;
-import org.apache.maven.model.Resource;
-import org.nuiton.i18n.I18n;
-import org.nuiton.util.FileUtil;
-import org.nuiton.util.SortedProperties;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
-import static org.nuiton.i18n.I18n._;
-
-/**
- * Mojo to generate javax help stuff for your project.
- *
- * HelpIds should have been discovered by the JaxxMojo.
- *
- * @author chemit
- * @goal generate-help
- * @phase process-sources
- *
- * @requiresProject
- * @requiresDependencyResolution compile
- * @since 1.3
- */
-public class JaxxHelpGeneratorMojo extends AbstractJaxxMojo {
-
- /**
- * The directory where to generate javaHelp skeleton files.
- * <p/>
- * Is required if generateHelp is on.
- *
- * @parameter expression="${jaxx.helpTarget}" alias="target" default-value="${maven.src.dir}/main/help"
- * @required
- *
- * @since 1.3
- */
- protected File target;
- /**
- * The locale to generate for help.
- *
- * By default, stay in France.
- *
- * @parameter expression="${jaxx.locale}" default-value="fr"
- * @required
- *
- * @since 1.3
- */
- protected String locale;
- /**
- * The package where to generate i18n java file.
- *
- * @parameter expression="${jaxx.packageName}" default-value="${project.groupId}"
- * @required
- *
- * @since 1.3
- */
- protected String packageName;
- /**
- * The file name of the helpset to generate.
- *
- * @parameter expression="${jaxx.helpSetFileName}" default-value="${jaxx.helpSetName}.hs"
- * @required
- *
- * @since 1.3
- */
- protected String helpsetFileName;
- /**
- * The file name of the helpset map to generate.
- *
- * @parameter expression="${jaxx.mapFileName}" default-value="${jaxx.helpSetName}Map.jhm"
- * @required
- *
- * @since 1.3
- */
- protected String mapFileName;
- /**
- * The file name of the helpset index to generate.
- *
- * @parameter expression="${jaxx.indexFileName}" default-value="${jaxx.helpSetName}Index.xml"
- * @required
- *
- * @since 1.3
- */
- protected String indexFileName;
- /**
- * The file name of the helpset toc to generate.
- *
- * @parameter expression="${jaxx.tocFileName}" default-value="${jaxx.helpSetName}TOC.xml"
- * @required
- *
- * @since 1.3
- */
- protected String tocFileName;
- /**
- * The file name of the i18n java file to generate.
- *
- * @parameter expression="${jaxx.i8nFileName}" default-value="${jaxx.helpSetName}I18n.java"
- * @required
- *
- * @since 1.3
- */
- protected String i8nFileName;
- /**
- * The template used to generate helpset file.
- *
- * Must be an existing file or a ressource in classp-ath
- *
- * @parameter expression="${jaxx.helpSetTemplate}" default-value="/defaultHelpSet.hs.vm"
- * @required
- *
- * @since 1.3
- */
- protected File helpSetTemplate;
- /**
- * The template used to generate helpset map file.
- *
- * Must be an existing file or a ressource in classp-ath
- *
- * @parameter expression="${jaxx.mapTemplate}" default-value="/defaultMap.jhm.vm"
- * @required
- *
- * @since 1.3
- */
- protected File mapTemplate;
- /**
- * The template used to generate helpset index file.
- *
- * Must be an existing file or a ressource in classp-ath
- *
- * @parameter expression="${jaxx.indexTemplate}" default-value="/defaultIndex.xml.vm"
- * @required
- *
- * @since 1.3
- */
- protected File indexTemplate;
- /**
- * The template used to generate helpset toc file.
- *
- * Must be an existing file or a ressource in classp-ath
- *
- * @parameter expression="${jaxx.tocTemplate}" default-value="/defaultToc.xml.vm"
- * @required
- *
- * @since 1.3
- */
- protected File tocTemplate;
- /**
- * The template used to generate helpset content file.
- *
- * Must be an existing file or a ressource in classp-ath
- *
- * @parameter expression="${jaxx.contentTemplate}" default-value="/defaultContent.html.vm"
- * @required
- *
- * @since 1.3
- */
- protected File contentTemplate;
- /**
- * The template used to generate helpset content file.
- *
- * Must be an existing file or a ressource in classp-ath
- *
- * @parameter expression="${jaxx.i18nTemplate}" default-value="/defaultI18n.java.vm"
- * @required
- *
- * @since 1.3
- */
- protected File i18nTemplate;
- /**
- * The help ids discovered by Jaxx compilation
- */
- protected Properties helpIds;
- private static final String AUTOREMOVE_LINE = "REMOVE THS LINE TO DISABLE AUTO-REGENERATE THE FILE";
-
- @Override
- public void init() throws Exception {
-
- if (project != null && ("pom".equals(project.getPackaging()) || "site".equals(project.getPackaging()))) {
- // nothing to be done for this type of packaging
- skip = true;
- getLog().info("skip generate goal for packaging " + project.getPackaging());
- return;
- }
-
- if (!helpIdStore.exists()) {
- skip = true;
- getLog().info("no helpIdStore to react at " + helpIdStore);
- return;
- }
-
- // check there is some bundle
- if (locale == null) {
- throw new MojoFailureException("you must set the bundles property.");
- }
- // check there is some bundle
- if (target == null) {
- throw new MojoFailureException("you must set the target property.");
- }
- // check ressources
- checkResource(helpSetTemplate);
- checkResource(mapTemplate);
- checkResource(indexTemplate);
- checkResource(tocTemplate);
- checkResource(contentTemplate);
-
- if (!target.exists()) {
- getLog().info("mkdir " + target);
- target.mkdirs();
- }
-
-
- helpIds = new SortedProperties();
-
- InputStream stream = new FileInputStream(helpIdStore);
-
- helpIds.load(stream);
-
- stream.close();
-
- if (helpIds.isEmpty()) {
-
- // no ids detected
- getLog().warn("no helpIds detected, will skip.");
- skip = true;
- return;
- }
-
- skip = false;
- }
-
- @Override
- public void doAction() throws Exception {
-
- if (i18nable) {
-
- List<URL> lUrls = new java.util.ArrayList<URL>();
- List resources = project.getResources();
- for (Object o : resources) {
- Resource resource = (Resource) o;
- lUrls.add(new File(resource.getDirectory()).toURI().toURL());
- }
- I18n.setExtraURL(lUrls.toArray(new URL[lUrls.size()]));
- I18n.init(locale, null);
- }
-
- File file;
-
- Properties env = new Properties();
-
- env.put("helpSetName", helpSetName);
- env.put("helpSetFileName", helpsetFileName);
- env.put("mapFileName", mapFileName);
- env.put("indexFileName", indexFileName);
- env.put("tocFileName", tocFileName);
- env.put("separator", " ");
- env.put("autoremoveLine", AUTOREMOVE_LINE);
-
-
- int touchedFiles = 0;
-
- // ---------------------------------------------------------------
- // --- main helpset file -----------------------------------------
- // ---------------------------------------------------------------
-
-
- file = new File(target, helpsetFileName);
-
- boolean doCreate = generateHelSetFile(file, env);
-
- if (doCreate) {
- touchedFiles++;
- }
-
- // ---------------------------------------------------------------
- // --- helpset map file ------------------------------------------
- // ---------------------------------------------------------------
-
- file = new File(target, mapFileName);
-
- Properties mergedHelpIds = generateMapFile(file, env);
- touchedFiles++;
-
- // ---------------------------------------------------------------
- // --- helpset index file ----------------------------------------
- // ---------------------------------------------------------------
-
- file = new File(target, indexFileName);
-
- NodeItem indexRootItem = generateIndexFile(file, env);
- touchedFiles++;
-
- // ---------------------------------------------------------------
- // --- helpset toc file ------------------------------------------
- // ---------------------------------------------------------------
-
- file = new File(target, tocFileName);
-
- NodeItem tocRootItem = generateTocFile(file, env);
- touchedFiles++;
-
- // ---------------------------------------------------------------
- // --- helpset content files -------------------------------------
- // ---------------------------------------------------------------
-
- TemplateGenerator gen = prepareGenerator(contentTemplate);
-
- Enumeration keys = helpIds.keys();
-
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- String url = (String) helpIds.get(key);
- url = helpSetName + File.separator + url;
-
- File f = new File(target, url);
-
- boolean exist = f.exists();
-
- if (exist) {
- // check if there is a autoremoveLine in content
- String content = FileUtil.readAsString(f);
- if (!content.contains(AUTOREMOVE_LINE)) {
- // no regenerate marker detected, so skip this file
- if (verbose) {
- getLog().debug("skip existing file " + f);
- }
- continue;
- }
- }
-
- f.getParentFile().mkdirs();
-
- if (verbose) {
- if (exist) {
- getLog().info("regenerate content file " + f);
- } else {
- getLog().info("generate content file " + f);
- }
- }
-
- env.put("helpId", key);
- String i18n = helpsetI18nPrefix + key + helpsetTitleI18nSuffix;
- env.put("helpIdTitle", _(i18n));
- env.put("helpIdUrl", url);
-
- gen.generate(env, f);
- touchedFiles++;
- }
-
- // ---------------------------------------------------------------
- // --- i18n file -------------------------------------------------
- // ---------------------------------------------------------------
-
- String path = packageName.replaceAll("\\.", File.separator);
- path += File.separator + i8nFileName;
- file = new File(outJava, path);
- generateI18nFile(file, env, mergedHelpIds, indexRootItem, tocRootItem);
- touchedFiles++;
-
- getLog().info(touchedFiles + " file(s) treated.");
- }
-
- protected void generateI18nFile(File file, Properties env, Properties mergedHelpIds, NodeItem indexRootItem, NodeItem tocRootItem) throws Exception {
-
- boolean create = !file.exists();
-
- if (!file.getParentFile().exists()) {
- file.getParentFile().mkdirs();
- }
-
- Set<String> keys = new java.util.HashSet<String>();
-
- for (Object k : mergedHelpIds.keySet()) {
- String key = helpsetI18nPrefix + k + helpsetTitleI18nSuffix;
- keys.add(key);
- }
- indexRootItem.extractI18n(keys, helpsetI18nPrefix, helpsetIndexI18nSuffix);
- tocRootItem.extractI18n(keys, helpsetI18nPrefix, helpsetTocI18nSuffix);
-
- env.put("keys", keys);
- env.put("packageName", packageName);
- String className = file.getName();
- int index = className.lastIndexOf(".");
- className = className.substring(0, index);
- env.put("className", className);
-
- if (verbose) {
- if (create) {
- getLog().info("generate i18n java file " + file);
- } else {
- getLog().info("udpate i18n java file " + file);
- }
- }
-
- doGen(i18nTemplate, file, env);
-
- }
-
- protected boolean generateHelSetFile(File file, Properties env) throws Exception {
-
- if (file.exists()) {
- // check the auto removeline presence
- String content = FileUtil.readAsString(file);
- if (!content.contains(AUTOREMOVE_LINE)) {
- // no regenerate marker detected, so skip this file
- if (verbose) {
- getLog().info("skip existing helpset main file " + file);
- }
- return false;
- }
- }
-
- if (verbose) {
- if (file.exists()) {
- getLog().info("regenerate helpset main file " + file);
- } else {
- getLog().info("generate helpset main file " + file);
- }
- }
- doGen(helpSetTemplate, file, env);
- return true;
- }
-
- protected Properties generateMapFile(File file, Properties env) throws Exception {
-
- boolean create;
-
- Properties mergedHelpIds = null;
- if (file.exists()) {
-
- // get back the exisiting data and merge it with incoming ones
-
- if (verbose) {
- getLog().info("loading existing helpset map file " + file);
- }
-
- mergedHelpIds = getExistingHelpIds(file);
- create = false;
-
- } else {
-
- mergedHelpIds = new SortedProperties();
- create = true;
- }
-
- // inject new helpIds
-
- for (Object k : helpIds.keySet()) {
- mergedHelpIds.put(k, helpSetName + "/" + helpIds.get(k));
- }
-
- if (!mergedHelpIds.contains("top")) {
- // on ajoute une entree vers le root du helpset
-
- String topUrl = helpSetName + ".html";
- helpIds.put("top", topUrl);
- mergedHelpIds.put("top", helpSetName + "/" + topUrl);
- if (verbose) {
- getLog().debug("add top entry with url " + topUrl);
- }
- }
-
- if (verbose) {
- if (create) {
- getLog().info("generate helpset map file " + file);
- } else {
- getLog().info("udpate helpset map file " + file);
- }
- }
-
- env.put("helpIds", mergedHelpIds);
- doGen(mapTemplate, file, env);
- env.remove("helpIds");
- return mergedHelpIds;
- }
-
- protected NodeItem generateIndexFile(File file, Properties env) throws Exception {
- NodeItem rootItem = null;
-
- boolean create;
-
- if (file.exists()) {
-
- create = false;
-
- rootItem = getExistingItems("indexitem", file);
- } else {
- create = true;
- }
-
- if (rootItem == null) {
- rootItem = new NodeItem("top", helpSetName);
- }
-
- // inject new index entries
-
- for (Object k : helpIds.keySet()) {
- NodeItem toc = rootItem.findChild(k + "");
- if (verbose) {
- getLog().debug("index " + k + " : " + toc);
- }
- }
-
- //String prefix = helpsetI18nPrefix;
- //String prefix = helpsetI18nPrefix + helpSetName + ".";
- rootItem.applyI18n(helpsetI18nPrefix, helpsetIndexI18nSuffix);
-
- if (verbose) {
- if (create) {
- getLog().info("generate helpset index file " + file);
- } else {
- getLog().info("udpate helpset index file " + file);
- }
- }
-
- env.put("rootItem", rootItem);
- doGen(indexTemplate, file, env);
- env.remove("rootItem");
- return rootItem;
- }
-
- protected NodeItem generateTocFile(File file, Properties env) throws Exception {
- NodeItem rootItem = null;
-
- boolean create;
-
- if (file.exists()) {
-
- create = false;
-
- rootItem = getExistingItems("tocitem", file);
- } else {
- create = true;
- }
-
- if (rootItem == null) {
- rootItem = new NodeItem("top", helpSetName);
- }
- // inject new toc entries
-
- for (Object k : helpIds.keySet()) {
- NodeItem toc = rootItem.findChild(k + "");
- if (verbose) {
- getLog().debug("toc " + k + " : " + toc);
- }
- }
-
- //String prefix = helpsetI18nPrefix + helpSetName + ".";
- rootItem.applyI18n(helpsetI18nPrefix, helpsetTocI18nSuffix);
-
- if (verbose) {
- if (create) {
- getLog().info("generate helpset toc file " + file);
- } else {
- getLog().info("udpate helpset toc file " + file);
- }
- }
-
- env.put("rootItem", rootItem);
- doGen(tocTemplate, file, env);
- env.remove("rootItem");
- return rootItem;
- }
-
- protected void doGen(File template, File f, Properties env) throws Exception {
- TemplateGenerator gen = prepareGenerator(template);
- gen.generate(env, f);
- }
-
- protected TemplateGenerator prepareGenerator(File template) throws Exception {
- URL templateURL = getTemplate(template);
-
- if (verbose) {
- getLog().info("using template " + templateURL);
- }
- TemplateGenerator gen = new TemplateGenerator(project, templateURL);
- return gen;
- }
-
- protected URL getTemplate(File f) throws IOException {
- URL r = null;
- if (f.exists()) {
- r = f.toURI().toURL();
- } else {
- r = getClass().getResource(f.toString());
- }
- return r;
- }
-
- protected void checkResource(File f) throws MojoFailureException {
- if (!f.exists()) {
- // test in classPath
- InputStream r = getClass().getResourceAsStream(f.toString());
- if (r == null) {
- throw new MojoFailureException("could not find ressource " + f);
- }
- }
- }
-
- protected Properties getExistingHelpIds(File file) throws SAXException, IOException {
-
- final Properties result = new SortedProperties();
-
- XMLReader parser = XMLReaderFactory.createXMLReader();
-
- parser.setContentHandler(new ContentHandlerAdapter() {
-
- String target;
- String url;
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- if ("mapID".equals(localName)) {
- target = atts.getValue("target");
- url = atts.getValue("url");
- if (verbose) {
- getLog().debug("detect map entry : " + target + " : " + url);
- }
- result.put(target, url);
- }
- }
- });
-
- InputStream s = new FileInputStream(file);
- try {
- parser.parse(new InputSource(s));
- } finally {
- s.close();
- }
- return result;
- }
-
- protected NodeItem getExistingItems(String tagName, File file) throws SAXException, IOException {
-
- XMLReader parser = XMLReaderFactory.createXMLReader();
- NodeItemHandler handler = new NodeItemHandler(tagName);
-
- parser.setContentHandler(handler);
-
- NodeItem rootItem = null;
- InputStream s = new FileInputStream(file);
- try {
- parser.parse(new InputSource(s));
- rootItem = handler.rootItem;
- } finally {
- s.close();
- }
- return rootItem;
- }
-
- static class NodeItemHandler extends ContentHandlerAdapter {
-
- NodeItem rootItem;
- NodeItem currentItem;
- final Stack<NodeItem> stack;
- final String tagName;
-
- public NodeItemHandler(String tagName) {
- this.tagName = tagName;
- this.stack = new Stack<NodeItem>();
- }
-
- @Override
- public void startDocument() throws SAXException {
- rootItem = new NodeItem("top", null);
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- if (tagName.equals(localName)) {
-
- String target = atts.getValue("target");
- String text = atts.getValue("text");
-
- // debut d'un item
- if (currentItem == null) {
- // premier item
- if (rootItem.getTarget().equals(target)) {
- // le premier item est bien top
- //rootItem.setText(text);
- currentItem = rootItem;
- } else {
- // le premier noeud n'est pas top
- // en l'encapsule
- stack.push(rootItem);
- currentItem = new NodeItem(target, text);
- rootItem.addChild(currentItem);
- }
- } else {
- NodeItem newItem = new NodeItem(target, text);
- currentItem.addChild(newItem);
- currentItem = newItem;
- }
- currentItem.adjustTarget();
- stack.push(currentItem);
-
- }
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
- if (tagName.equals(localName)) {
- // fin d'un item
- stack.pop();
- if (!stack.isEmpty()) {
- currentItem = stack.peek();
- }
- }
- }
- }
-
- static class ContentHandlerAdapter implements ContentHandler {
-
- @Override
- public void setDocumentLocator(Locator locator) {
- }
-
- @Override
- public void startDocument() throws SAXException {
- }
-
- @Override
- public void endDocument() throws SAXException {
- }
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- }
-
- @Override
- public void endPrefixMapping(String prefix) throws SAXException {
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
- }
-
- @Override
- public void characters(char[] ch, int start, int length) throws SAXException {
- }
-
- @Override
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- }
-
- @Override
- public void processingInstruction(String target, String data) throws SAXException {
- }
-
- @Override
- public void skippedEntity(String name) throws SAXException {
- }
- }
-}
\ No newline at end of file
Deleted: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/NodeItem.java
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/NodeItem.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/NodeItem.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,137 +0,0 @@
-package org.nuiton.jaxx;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import static org.nuiton.i18n.I18n._;
-
-public class NodeItem {
-
- String absoluteTarget;
- private String target;
- private String text;
- private List<NodeItem> childs;
-
- public NodeItem(String target, String text) {
- this.target = target;
- this.absoluteTarget = target;
-
- this.text = text;
- }
-
- public String getTarget() {
- return target;
- }
-
- public String getAbsoluteTarget() {
- return absoluteTarget;
- }
-
- public String getText() {
- return text;
- }
-
- public List<NodeItem> getChilds() {
- return childs;
- }
-
- public NodeItem findChild(String path) {
- NodeItem result = null;
- String[] paths = path.split("\\.");
- for (int i = 0, j = paths.length; i < j; i++) {
- String p = paths[i];
- if (result == null) {
-
- // first node
- if (target.equals(p)) {
- result = this;
- continue;
- }
- result = getChild(p);
- if (result == null) {
- result = new NodeItem(p, null);
- addChild(result);
- adjutsAbsoluteTarget(result);
- }
- continue;
- }
- NodeItem child = result.getChild(p);
- if (child == null) {
- child = new NodeItem(p, null);
- result.addChild(child);
- result.adjutsAbsoluteTarget(child);
- result = child;
- } else {
- result = child;
- }
- }
- return result;
- }
-
- public NodeItem getChild(int index) {
- return childs.get(index);
- }
-
- public NodeItem getChild(String target) {
- if (isLeaf()) {
- return null;
- }
- for (NodeItem i : childs) {
- if (i.target.equals(target)) {
- return i;
- }
- }
- return null;
- }
-
- public void addChild(NodeItem child) {
- if (childs == null) {
- childs = new ArrayList<NodeItem>();
- }
-
- childs.add(child);
- }
-
- public void adjutsAbsoluteTarget(NodeItem child) {
- if (!"top".equals(target)) {
- // on ne prefixe pas les fils direct du root
- child.absoluteTarget = absoluteTarget + "." + child.target;
- }
- }
-
- public void adjustTarget() {
- int index = target.lastIndexOf(".");
- if (index > -1) {
- target = target.substring(index + 1);
- }
- }
-
- public boolean isLeaf() {
- return childs == null || childs.isEmpty();
- }
-
- public void applyI18n(String prefix, String suffix) {
- String key = prefix + getAbsoluteTarget() + suffix;
- text = _(key);
- if (!isLeaf()) {
- for (NodeItem i : getChilds()) {
- i.applyI18n(prefix, suffix);
- }
- }
- }
-
- public void extractI18n(Set<String> keys, String prefix, String suffix) {
- String key = prefix + getAbsoluteTarget() + suffix;
- keys.add(key);
- if (!isLeaf()) {
- for (NodeItem i : getChilds()) {
- i.extractI18n(keys, prefix, suffix);
- }
- }
- }
-
- @Override
- public String toString() {
- return super.toString() + "<target:" + target + ", text:" + text + ", nbChilds:" + (isLeaf() ? 0 : childs.size()) + ">";
- }
-}
Deleted: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/TemplateGenerator.java
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/TemplateGenerator.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/TemplateGenerator.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,142 +0,0 @@
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License" );
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.nuiton.jaxx;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.apache.maven.project.MavenProject;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
-
-/**
- * Generator of template base on velocity.
- *
- * @author chemit
- * @since 1.3
- *
- */
-public class TemplateGenerator {
-
- protected VelocityEngine engine;
- protected final MavenProject mavenProject;
- protected Template velocityTemplate;
-
- protected TemplateGenerator(MavenProject mavenProject, URL template) throws URISyntaxException {
-
- if (mavenProject == null) {
- throw new IllegalArgumentException("mavenProject must not be null");
- }
-
- if (template == null) {
- throw new IllegalArgumentException("template must not be null");
- }
-
- this.mavenProject = mavenProject;
-
- Properties props = new Properties();
-
- String templateName;
-
- if (template.toURI().isOpaque()) {
-
- // template is in a jar
-
- props = new Properties();
- props.setProperty("resource.loader", "jar");
- props.setProperty("jar.resource.loader.description", "Jar resource loader for default webstart templates");
- props.setProperty("jar.resource.loader.class", "org.apache.velocity.runtime.resource.loader.JarResourceLoader");
-
- // obtain the jar url
-
- String url = template.toString();
- int i = url.indexOf("!");
- templateName = url.substring(i + 2);
-
- props.setProperty("jar.resource.loader.path", url.substring(0, i + 2));
-
- } else {
-
-
- templateName = new File(template.getFile()).getName();
-
- //props.setProperty(VelocityEngine.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.NullLogSystem");
- props.setProperty("file.resource.loader.path", template.getFile());
-
- }
-
- try {
- engine = new VelocityEngine();
- //engine.setProperty("runtime.log.logsystem", new NullLogSystem());
- engine.init(props);
- } catch (Exception e) {
- IllegalArgumentException iae = new IllegalArgumentException("Could not initialise Velocity");
- iae.initCause(e);
- throw iae;
- }
-
- try {
- this.velocityTemplate = engine.getTemplate(templateName);
- } catch (Exception e) {
- IllegalArgumentException iae =
- new IllegalArgumentException("Could not load the template file from '" + template + "'");
- iae.initCause(e);
- throw iae;
- }
- }
-
- public void generate(Properties context, File outputFile) throws Exception {
-
-
- VelocityContext vcontext = new VelocityContext();
-
- // Note: properties that contain dots will not be properly parsed by Velocity. Should we replace dots with underscores ?
- addPropertiesToContext(System.getProperties(), vcontext);
-
- addPropertiesToContext(mavenProject.getProperties(), vcontext);
- addPropertiesToContext(context, vcontext);
-
- vcontext.put("project", mavenProject.getModel());
-
- vcontext.put("outputFile", outputFile.getName());
-
- FileWriter writer = new FileWriter(outputFile);
-
- try {
- velocityTemplate.merge(vcontext, writer);
- writer.flush();
- } catch (Exception e) {
- throw new Exception("Could not generate the template " + velocityTemplate.getName() + ": " + e.getMessage(), e);
- } finally {
- writer.close();
- }
- }
-
- protected void addPropertiesToContext(Properties properties, VelocityContext context) {
-
- for (Iterator<?> iter = properties.keySet().iterator(); iter.hasNext();) {
- String key = (String) iter.next();
- Object value = properties.get(key);
- context.put(key, value);
- }
-
- }
-}
Copied: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java (from rev 1534, trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/AbstractJaxxMojo.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,187 @@
+/* *##%
+ * Copyright (C) 2007
+ * JaxxPlugin, Code Lutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *##%*/
+package org.nuiton.jaxx.plugin;
+
+import org.apache.maven.project.MavenProject;
+
+import java.io.File;
+import org.nuiton.plugin.AbstractPlugin;
+
+/**
+ * Abract Jaxx Mojo.
+ *
+ * @author chemit
+ *
+ * @since 1.3
+ */
+public abstract class AbstractJaxxMojo extends AbstractPlugin {
+
+ /**
+ * Dépendance du projet.
+ *
+ * @parameter default-value="${project}"
+ * @required
+ * @readonly
+ */
+ protected MavenProject project;
+ /**
+ * Repertoire de destination des fichiers java a generer.
+ *
+ * @parameter expression="${jaxx.outJava}" default-value="${basedir}/target/generated-sources/java"
+ */
+ protected File outJava;
+ /**
+ * verbose flag
+ *
+ * @parameter expression="${jaxx.verbose}" default-value="false"
+ *
+ * @since 1.3
+ */
+ protected boolean verbose;
+ /**
+ * to make compiler i18nable, says add the {@link org.nuiton.i18n.I18n#_(String, Object[])} method
+ * invocation on {@link jaxx.compiler.I18nHelper#I18N_ATTRIBUTES} attributes.
+ *
+ * @parameter expression="${jaxx.i18nable}" default-value="true"
+ * @see jaxx.compiler.I18nHelper
+ */
+ protected boolean i18nable;
+ /**
+ * The store of helpIds generated by {@link JaxxGeneratorMojo}.
+ * <p/>
+ *
+ * @parameter expression="${jaxx.helpIdStore}" default-value="target/helpIds.properties"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected File helpIdStore;
+ /**
+ * The name of the helpset to generate.
+ *
+ * @parameter expression="${jaxx.helpSetName}" default-value="${project.artifactId}"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String helpSetName;
+ /**
+ * The prefix to add to i18n key for any help i18n key.
+ *
+ * @parameter expression="${jaxx.helpsetI18nPrefix}" default-value="${jaxx.helpSetName}.help."
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String helpsetI18nPrefix;
+ /**
+ * The suffix to add to i18n key for an help Id.
+ *
+ * @parameter expression="${jaxx.helpsetTitleI18nSuffix}" default-value=".title"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String helpsetTitleI18nSuffix;
+ /**
+ * The suffix to add to i18n key for an toc Id.
+ *
+ * @parameter expression="${jaxx.helpsetTocI18nSuffix}" default-value=".toc"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String helpsetTocI18nSuffix;
+ /**
+ * The suffix to add to i18n key for an toc Id.
+ *
+ * @parameter expression="${jaxx.helpsetIndexI18nSuffix}" default-value=".index"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String helpsetIndexI18nSuffix;
+ protected boolean skip;
+ protected ClassLoader cl;
+
+ @Override
+ protected boolean checkPackaging() {
+ return project != null && !"pom".equals(project.getPackaging()) && !"site".equals(project.getPackaging());
+ }
+// @Override
+// public void execute() throws MojoExecutionException, MojoFailureException {
+//
+// try {
+// init();
+// } catch (Exception e) {
+// if (e instanceof MojoFailureException) {
+// throw (MojoFailureException) e;
+// }
+// if (e instanceof MojoExecutionException) {
+// throw (MojoExecutionException) e;
+// }
+// throw new MojoExecutionException("error in init : " + e.getMessage(), e);
+// }
+//
+// if (skip) {
+// if (verbose) {
+// getLog().info("jaxx - skip!");
+// }
+// return;
+// }
+//
+// try {
+//
+// doAction();
+//
+// } catch (Exception e) {
+// //getLog().error(e);
+// Throwable e2 = e;
+// while (e2.getCause() != null) {
+// e2 = e.getCause();
+// }
+// getLog().error(e2);
+//
+// throw new MojoExecutionException(e2.getMessage(), e2);
+// } finally {
+// System.gc();
+// }
+//
+// }
+
+ @Override
+ public MavenProject getProject() {
+ return project;
+ }
+
+ @Override
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ @Override
+ public void setProject(MavenProject project) {
+ this.project = project;
+ }
+
+ @Override
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+}
Property changes on: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java (from rev 1534, trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxGeneratorMojo.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,663 @@
+/* *##%
+ * Copyright (C) 2007
+ * JaxxPlugin, Code Lutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *##%*/
+package org.nuiton.jaxx.plugin;
+
+import jaxx.beaninfos.BeanInfoUtil;
+import jaxx.compiler.CompilerOptions;
+import jaxx.compiler.JAXXCompiler;
+import jaxx.compiler.JAXXCompilerLaunchor;
+import jaxx.runtime.JAXXContext;
+import jaxx.tags.TagManager;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.codehaus.plexus.util.DirectoryScanner;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Modifier;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import jaxx.compiler.CompiledObjectDecorator;
+import jaxx.compiler.HelpRootCompiledObjectDecorator;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Resource;
+import org.apache.maven.project.MavenProject;
+import org.nuiton.io.FileUpdaterHelper;
+import org.nuiton.io.MirroredFileUpdater;
+
+/**
+ * Classe permettant de transformer des sources jaxx vers du source java.
+ *
+ * @author chemit
+ * @goal generate
+ * @phase process-sources
+ * @requiresDependencyResolution compile
+ * @requiresProject
+ */
+public class JaxxGeneratorMojo extends AbstractJaxxMojo {
+
+ /**
+ * Le compilateur à utiliser (par défaut celui de Swing)
+ *
+ * @parameter expression="${jaxx.compilerFQN}" default-value="jaxx.compiler.SwingCompiler"
+ */
+ protected String compilerFQN;
+ /**
+ * Le compilateur à utiliser (par défaut celui de Swing)
+ *
+ * @parameter expression="${jaxx.validatorFQN}" default-value="jaxx.runtime.validator.swing.SwingValidator"
+ */
+ protected String validatorFQN;
+ /**
+ * chemin du repertoire de generation des resources.
+ *
+ * @parameter expression="${jaxx.outResource}" default-value="${basedir}/target/generated-sources/resources"
+ */
+ protected File outResource;
+ /**
+ * chemin du repertoire de compilation des resources.
+ *
+ * @parameter expression="${jaxx.outClass}" default-value="${basedir}/target/classes"
+ */
+ protected File outClass;
+ /**
+ * Repertoire sources des fichiers jaxx a generer.
+ *
+ * @parameter expression="${jaxx.src}" default-value="${maven.src.dir}/main/java"
+ */
+ protected File src;
+ /**
+ * pour optimizer le code compile ou genere ?
+ *
+ * @parameter expression="${jaxx.optimize}" default-value="false"
+ */
+ protected boolean optimize;
+ /**
+ * les options de la compilation
+ *
+ * @parameter expression="${jaxx.javaOpts}"
+ */
+ protected String javaOpts = null;
+ /**
+ * pour filter les fichiers a traiter
+ *
+ * @parameter expression="${jaxx.includes}"
+ */
+ protected String[] includes;
+ /**
+ * pour filter les fichiers a ne pas traiter
+ *
+ * @parameter expression="${jaxx.excludes}"
+ */
+ protected String[] excludes;
+ /**
+ * flag to include in compiler classpath the java sources directories (src and outJava).
+ * <p/>
+ * By default, false.
+ *
+ * @parameter expression="${jaxx.addSourcesToClassPath}" default-value="false"
+ */
+ protected boolean addSourcesToClassPath;
+ /**
+ * flag to include in compiler classpath the java resources directories (src and outJava).
+ * <p/>
+ * By default, false.
+ *
+ * @parameter expression="${jaxx.addResourcesToClassPath}" default-value="false"
+ * @since 1.6.0
+ */
+ protected boolean addResourcesToClassPath;
+ /**
+ * flag to include in compiler classpath the compile class-path (can only be used in a test phase).
+ * <p/>
+ * By default, false.
+ *
+ * @parameter expression="${jaxx.addCompileClassPath}" default-value="false"
+ * @since 1.6.0
+ */
+ protected boolean addCompileClassPath;
+ /**
+ * flag to include in compiler classpath the project compile classpath.
+ * <p/>
+ * By default, false.
+ *
+ * @parameter expression="${jaxx.addProjectClassPath}" default-value="false"
+ */
+ protected boolean addProjectClassPath;
+ /**
+ * to force generation of java source for any jaxx files with no timestamp checking.
+ * <p/>
+ * By default, never force generation.
+ *
+ * @parameter expression="${jaxx.force}" default-value="false"
+ */
+ protected boolean force;
+ /**
+ * flag to add logger to each generated jaxx file.
+ * <p/>
+ * By default, always add it.
+ *
+ * @parameter expression="${jaxx.addLogger}" default-value="true"
+ */
+ protected boolean addLogger;
+ /**
+ * flag to keep compilers after the generate operation (usefull for tests.
+ * <p/>
+ * By default, always reset.
+ *
+ * @parameter expression="${jaxx.resetAfterCompile}" default-value="true"
+ */
+ protected boolean resetAfterCompile;
+ /**
+ * the name of implementation of {@link jaxx.runtime.JAXXContext}
+ * to be used on {@link jaxx.runtime.JAXXObject}.
+ * <p/>
+ * Must not be abstract.
+ *
+ * @parameter expression="${jaxx.jaxxContextImplementorClass}" default-value="jaxx.runtime.DefaultJAXXContext"
+ * @required
+ */
+ protected String jaxxContextImplementorClass;
+ /**
+ * extra path to be added in {@link java.beans.Introspector#setBeanInfoSearchPath(String[])}.
+ * <p/>
+ * add beanInfoSearchPath to be registred by {@link BeanInfoUtil#addJaxxBeanInfoPath(String[])}
+ * <p/>
+ * and then will be use by {@link jaxx.tags.swing.SwingInitializer#initialize()}.
+ * <p/>
+ * <p/>
+ * This permit to use real beanInfo of imported graphic libraries.
+ *
+ * @parameter expression="${jaxx.beanInfoSearchPath}"
+ */
+ protected String[] beanInfoSearchPath;
+ /**
+ * list of fqn of class toimport for all generated jaxx files
+ *
+ * @parameter expression="${jaxx.extraImports}"
+ *
+ * @deprecated Prefer use of extraImportList as a string, so
+ * could be use in properties section.
+ */
+ protected String[] extraImports;
+ /**
+ * list of fqn of class toimport for all generated jaxx files
+ *
+ * @parameter expression="${jaxx.extraImportList}"
+ */
+ protected String extraImportList;
+ /**
+ * the FQN of the ui to use for error notification.
+ * <p/>
+ * If not given, will use the one defined in validator
+ *
+ * @parameter expression="${jaxx.defaultErrorUIFQN}"
+ * @see jaxx.runtime.validator.swing.SwingValidator#DEFAULT_UI_CLASS
+ */
+ protected String defaultErrorUIFQN;
+ /**
+ * the FQN of the ui to use for error notification.
+ * <p/>
+ * If not given, will use the one defined in validator
+ *
+ * @parameter expression="${jaxx.defaultDecorator}" default-value="jaxx.compiler.DefaultCompiledObjectDecorator"
+ *
+ * @see jaxx.compiler.CompiledObjectDecorator
+ */
+ protected String defaultDecoratorFQN;
+ /**
+ * a flag to use UIManager to retreave icons.
+ *
+ * @parameter expression="${jaxx.useUIManagerForIcon}" default-value="false"
+ */
+ protected boolean useUIManagerForIcon;
+ /**
+ * flag to activate profile mode.
+ * <p/>
+ * By default, not active.
+ *
+ * @parameter expression="${jaxx.profile}" default-value="false"
+ */
+ protected boolean profile;
+ /**
+ * flag to activate help generation process.
+ * <p/>
+ * By default, not active.
+ *
+ * @parameter expression="${jaxx.generateHelp}" default-value="false"
+ *
+ * @since 1.3
+ */
+ protected boolean generateHelp;
+ /**
+ * the FQN of help broker
+ * <p/>
+ * By default, none.
+ *
+ * @parameter expression="${jaxx.helpBrokerFQN}"
+ *
+ * @since 1.3
+ */
+ protected String helpBrokerFQN;
+ /**
+ * A flag to mark themojo to be used in a test phase. This will permits to add generated sources in test compile roots.
+ *
+ * @parameter expression="${jaxx.testPhase}" default-value="false"
+ * @since 1.6.0
+ */
+ protected boolean testPhase;
+ protected String[] files;
+ private static final String[] INCLUDES = {"**\\/*.jaxx"};
+ protected CompilerOptions options;
+ protected MirroredFileUpdater updater;
+ private Class<?> defaultErrorUIClass;
+ private Class<?> validatorClass;
+ private Class<? extends CompiledObjectDecorator> defaultDecoratorClass;
+ private Class<? extends JAXXCompiler> compilerClass;
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public boolean init() throws Exception {
+ if (skip) {
+ return true;
+ }
+//
+// if (project != null && ("pom".equals(project.getPackaging()) || "site".equals(project.getPackaging()))) {
+// // nothing to be done for this type of packaging
+// skip = true;
+// getLog().info("skip generate goal for packaging " + project.getPackaging());
+// return true;
+// }
+
+ if (generateHelp) {
+ // check there is some bundle
+ if (helpIdStore == null) {
+ throw new MojoFailureException("you must set the helpIdStore property.");
+ }
+ }
+ skip = false;
+
+ checkJaxxContextImplementorClass();
+
+ if (beanInfoSearchPath != null && beanInfoSearchPath.length > 0) {
+ // register extra path
+ BeanInfoUtil.addJaxxBeanInfoPath(beanInfoSearchPath);
+ }
+ if (!outResource.exists()) {
+ outResource.mkdirs();
+ }
+
+ if (!outJava.exists()) {
+ outJava.mkdirs();
+ }
+
+ fixCompileSourceRoots();
+
+ if (addSourcesToClassPath || addProjectClassPath) {
+ cl = initClassLoader(project, getLog());
+ 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);
+
+ // check the validator class is correct
+ validatorClass = Class.forName(validatorFQN, false, cl);
+
+ if (defaultErrorUIFQN != null && !defaultErrorUIFQN.trim().isEmpty()) {
+ defaultErrorUIClass = Class.forName(defaultErrorUIFQN, false, cl);
+ }
+
+ DirectoryScanner ds;
+ ds = new DirectoryScanner();
+ ds.setBasedir(src);
+ boolean noIncludes = includes == null || includes.length == 0;
+ ds.setIncludes(noIncludes ? INCLUDES : includes);
+
+ if (excludes != null && excludes.length > 0) {
+ ds.setExcludes(excludes);
+ }
+
+ ds.scan();
+ String[] filesFind = ds.getIncludedFiles();
+ if (verbose) {
+ getLog().info("jaxx - discover " + filesFind.length + " jaxx file(s). ");
+ }
+
+ updater = FileUpdaterHelper.newJaxxFileUpdater(src, outJava);
+
+ if (force) {
+ // we will regenerate all files
+ this.files = filesFind;
+ } else {
+ // filter files
+ List<String> listFiles = new ArrayList<String>();
+
+ for (String file : filesFind) {
+ if (updater.isFileUpToDate(new File(src, file))) {
+ if (verbose) {
+ getLog().info("jaxx - skip file [" + file + "].");
+ }
+ } else {
+ if (verbose) {
+ getLog().info("jaxx - detect modify file [" + file + "].");
+ }
+ listFiles.add(file);
+ }
+ }
+ this.files = listFiles.toArray(new String[listFiles.size()]);
+ }
+
+ if (extraImportList != null && !extraImportList.isEmpty()) {
+ String[] imports = extraImportList.split(",");
+ int i = 0;
+ for (String importS : imports) {
+ imports[i++] = importS.trim();
+ }
+ if (verbose) {
+ getLog().info("extra imports " + java.util.Arrays.toString(imports));
+ }
+ extraImports = imports;
+
+ }
+ options = toCompilerOptions();
+
+ if (verbose) {
+ printInit();
+ }
+ return true;
+ }
+
+ @Override
+ public void doAction() throws MojoExecutionException {
+ if (skip) {
+ if (verbose) {
+ getLog().info("jaxx - skip!");
+ }
+ return;
+ }
+ getLog().info("jaxx - detects " + this.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, options);
+ boolean success = launchor.compile();
+ getLog().info("jaxx - generate " + launchor.getCompilerCount() + " file(s). ");
+
+ if (!success) {
+ throw new MojoExecutionException("Aborting due to errors reported by jaxxc");
+ }
+
+ if (generateHelp) {
+ // generate help
+ generateHelp();
+ }
+
+ } catch (MojoExecutionException e) {
+ getLog().error(e);
+ throw e;
+ } catch (Exception e) {
+ //getLog().error(e);
+ Throwable e2 = e;
+ while (e2.getCause() != null) {
+ e2 = e.getCause();
+ }
+ getLog().error(e2);
+
+ throw new MojoExecutionException(e2.getMessage(), e2);
+ }
+ }
+
+ public CompilerOptions toCompilerOptions() {
+ CompilerOptions result = new CompilerOptions();
+ result.setClassPath(src.getPath());
+ if (javaOpts != null && !"".equals(javaOpts)) {
+ result.setJavacOpts(javaOpts);
+ }
+ result.setCompilerClass(compilerClass);
+ result.setValidatorFQN(validatorFQN);
+ result.setValidatorClass(validatorClass);
+ result.setKeepJavaFiles(true);
+ result.setOptimize(optimize);
+ result.setJavacTargetDirectory(outClass);
+ result.setTargetDirectory(outJava);
+ result.setVerbose(verbose);
+ result.setI18nable(i18nable);
+ result.setAddLogger(addLogger);
+ result.setProfile(profile);
+ result.setResetAfterCompile(resetAfterCompile);
+ result.setJaxxContextImplementorClass(jaxxContextImplementorClass);
+ result.setExtraImports(extraImports);
+ result.setDefaultErrorUI(defaultErrorUIClass);
+ result.setUseUIManagerForIcon(useUIManagerForIcon);
+ result.setDefaultDecoratorClass(defaultDecoratorClass);
+ result.setGenerateHelp(generateHelp);
+ result.setHelpBrokerFQN(helpBrokerFQN);
+ result.setHelpsetTitleI18nSuffix(helpsetTitleI18nSuffix);
+ result.setHelpsetIndexI18nSuffix(helpsetIndexI18nSuffix);
+ result.setHelpsetTocI18nSuffix(helpsetTocI18nSuffix);
+ result.setHelpSetName(helpSetName);
+ result.setHelpsetI18nPrefix(helpsetI18nPrefix);
+
+ if (cl != null) {
+ result.setClassLoader(cl);
+ }
+ return result;
+ }
+
+ //TODO use the AbstractPublig method
+ protected void fixCompileSourceRoots() {
+// //fixme should remove this silly test when we will make real maven plugin tests :)
+// if (project != null) {
+// if (!project.getCompileSourceRoots().contains(outJava.getPath())) {
+// project.addCompileSourceRoot(outJava.getPath());
+// }
+// }
+ if (project == null) {
+ // no project defined, can not fix anything
+ // this case could appears if we wanted to do some tests of the plugin
+ return;
+ }
+
+ if (testPhase) {
+ if (!project.getTestCompileSourceRoots().contains(
+ outJava.getPath())) {
+ getLog().info("Add test compile source root : " + outJava);
+ project.addTestCompileSourceRoot(outJava.getPath());
+ }
+ } else {
+ if (!project.getCompileSourceRoots().contains(outJava.getPath())) {
+ getLog().info("Add compile source root : " + outJava);
+ project.addCompileSourceRoot(outJava.getPath());
+ }
+ }
+ }
+
+ protected void printInit() {
+ getLog().info(options.toString());
+ getLog().info("includes : " + Arrays.toString(includes));
+ for (String file : files) {
+ getLog().info("will generate " + file);
+ }
+
+ ClassLoader threadLoader = Thread.currentThread().getContextClassLoader();
+ getLog().info(threadLoader.toString());
+ if (threadLoader.getClass().getSimpleName().equals("RealmClassLoader")) {
+ try {
+ java.lang.reflect.Method m = threadLoader.getClass().getDeclaredMethod("getURLs");
+ m.setAccessible(true);
+ URL[] urls = (URL[]) m.invoke(threadLoader);
+
+ for (URL url : urls) {
+ getLog().info("url in class loader " + url);
+ }
+ } catch (Exception e) {
+ getLog().warn("??? : " + e.getMessage(), e);
+ }
+ }
+
+ //fixme should remove this silly test when we will make real maven plugin tests :)
+ if (getPluginContext() != null) {
+ for (Object e : getPluginContext().keySet()) {
+ getLog().info("pluginContext " + e + " : " + getPluginContext().get(e));
+ }
+ }
+ }
+
+ protected void checkJaxxContextImplementorClass() {
+ if (jaxxContextImplementorClass == null) {
+ throw new IllegalArgumentException("jaxxContextImplementor can not be null");
+ }
+ try {
+ Class<?> jaxxContextImplementor = Class.forName(jaxxContextImplementorClass);
+ if (!JAXXContext.class.isAssignableFrom(jaxxContextImplementor)) {
+ throw new IllegalArgumentException("jaxxContextImplementor '" + jaxxContextImplementor + "' does not implements " + JAXXContext.class);
+ }
+ if (Modifier.isAbstract(jaxxContextImplementor.getModifiers())) {
+ throw new IllegalArgumentException("jaxxContextImplementor '" + jaxxContextImplementor + "' can not be abstract.");
+
+ }
+ } catch (ClassNotFoundException e) {
+ throw new IllegalArgumentException("could not find jaxxContextImplementor class : " + jaxxContextImplementorClass);
+ }
+ }
+
+ protected void generateHelp() throws IOException {
+ Set<String> helpIds = HelpRootCompiledObjectDecorator.getHelpIds();
+ if (helpIds.isEmpty()) {
+ if (verbose) {
+ // no ids detected in this compilation round
+ getLog().info("no helpIds detected.");
+ }
+ return;
+ }
+
+ if (!helpIdStore.getParentFile().exists()) {
+ helpIdStore.getParentFile().mkdirs();
+ }
+
+ Properties p = new Properties();
+
+ for (String helpId : helpIds) {
+ String path = helpId.replaceAll("\\.", File.separator);
+ path = removeQuote(path) + ".html";
+ p.put(removeQuote(helpId), path);
+ }
+
+ FileOutputStream w = new FileOutputStream(helpIdStore);
+
+ try {
+ p.store(w, null);
+ } finally {
+ w.close();
+ }
+
+ getLog().info("helpIdStore generated in " + helpIdStore);
+
+ helpIds.clear();
+ }
+
+ //TODO use the AbstractPublig method
+ @SuppressWarnings({"unchecked"})
+ protected URLClassLoader initClassLoader(MavenProject project, org.apache.maven.plugin.logging.Log log) throws MalformedURLException {
+ URLClassLoader loader = null;
+ if (project != null) {
+
+ URLClassLoader result;
+ try {
+
+ List<URL> lUrls = new ArrayList<URL>();
+ List<String> sources = project.getCompileSourceRoots();
+
+ if (addSourcesToClassPath) {
+ for (String source : sources) {
+ lUrls.add(new File(source).toURI().toURL());
+ }
+ if (testPhase) {
+ for (Object source : project.getTestCompileSourceRoots()) {
+ lUrls.add(new File(source.toString()).toURI().toURL());
+ }
+ }
+ }
+ if (addResourcesToClassPath) {
+ for (Object source : project.getResources()) {
+ Resource r = (Resource) source;
+ lUrls.add(new File(r.getDirectory()).toURI().toURL());
+ }
+ }
+ if (testPhase && addCompileClassPath) {
+ if (project != null) {
+ lUrls.add(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
+ }
+ }
+ if (addProjectClassPath) {
+ getLog().info("use project compile scope class-path");
+ // add also all dependencies of the project in compile scope
+ Set<?> artifacts = project.getArtifacts();
+ for (Object o : artifacts) {
+ Artifact a = (Artifact) o;
+ lUrls.add(a.getFile().toURI().toURL());
+ }
+ }
+
+ result = new URLClassLoader(lUrls.toArray(new URL[lUrls.size()]), getClass().getClassLoader());
+
+ } catch (IOException e) {
+ throw new RuntimeException("Can't create ClassLoader for reason " + e.getMessage(), e);
+ }
+ loader = result;
+ } else {
+ List<URL> lUrls = new ArrayList<URL>();
+ if (addSourcesToClassPath) {
+ lUrls.add(src.toURI().toURL());
+ }
+ loader = new URLClassLoader(lUrls.toArray(new URL[lUrls.size()]), getClass().getClassLoader());
+ }
+ if (verbose) {
+ for (URL entry : loader.getURLs()) {
+ log.info("classpath : " + entry);
+ }
+ }
+ return loader;
+ }
+
+ protected String removeQuote(String txt) {
+ if (txt.startsWith("\"")) {
+ txt = txt.substring(1);
+ }
+ if (txt.endsWith("\"")) {
+ txt = txt.substring(0, txt.length() - 1);
+ }
+ return txt;
+ }
+}
Property changes on: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxGeneratorMojo.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxHelpGeneratorMojo.java (from rev 1534, trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/JaxxHelpGeneratorMojo.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxHelpGeneratorMojo.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxHelpGeneratorMojo.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,795 @@
+/* *##%
+ * Copyright (C) 2007
+ * JaxxPlugin, Code Lutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *##%*/
+package org.nuiton.jaxx.plugin;
+
+import org.apache.maven.plugin.MojoFailureException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Stack;
+import org.apache.maven.model.Resource;
+import org.nuiton.i18n.I18n;
+import org.nuiton.util.FileUtil;
+import org.nuiton.util.SortedProperties;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * Mojo to generate javax help stuff for your project.
+ *
+ * HelpIds should have been discovered by the JaxxMojo.
+ *
+ * @author chemit
+ * @goal generate-help
+ * @phase process-sources
+ *
+ * @requiresProject
+ * @requiresDependencyResolution compile
+ * @since 1.3
+ */
+public class JaxxHelpGeneratorMojo extends AbstractJaxxMojo {
+
+ /**
+ * The directory where to generate javaHelp skeleton files.
+ * <p/>
+ * Is required if generateHelp is on.
+ *
+ * @parameter expression="${jaxx.helpTarget}" alias="target" default-value="${maven.src.dir}/main/help"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected File target;
+ /**
+ * The locale to generate for help.
+ *
+ * By default, stay in France.
+ *
+ * @parameter expression="${jaxx.locale}" default-value="fr"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String locale;
+ /**
+ * The package where to generate i18n java file.
+ *
+ * @parameter expression="${jaxx.packageName}" default-value="${project.groupId}"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String packageName;
+ /**
+ * The file name of the helpset to generate.
+ *
+ * @parameter expression="${jaxx.helpSetFileName}" default-value="${jaxx.helpSetName}.hs"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String helpsetFileName;
+ /**
+ * The file name of the helpset map to generate.
+ *
+ * @parameter expression="${jaxx.mapFileName}" default-value="${jaxx.helpSetName}Map.jhm"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String mapFileName;
+ /**
+ * The file name of the helpset index to generate.
+ *
+ * @parameter expression="${jaxx.indexFileName}" default-value="${jaxx.helpSetName}Index.xml"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String indexFileName;
+ /**
+ * The file name of the helpset toc to generate.
+ *
+ * @parameter expression="${jaxx.tocFileName}" default-value="${jaxx.helpSetName}TOC.xml"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String tocFileName;
+ /**
+ * The file name of the i18n java file to generate.
+ *
+ * @parameter expression="${jaxx.i8nFileName}" default-value="${jaxx.helpSetName}I18n.java"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected String i8nFileName;
+ /**
+ * The template used to generate helpset file.
+ *
+ * Must be an existing file or a ressource in classp-ath
+ *
+ * @parameter expression="${jaxx.helpSetTemplate}" default-value="/defaultHelpSet.hs.vm"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected File helpSetTemplate;
+ /**
+ * The template used to generate helpset map file.
+ *
+ * Must be an existing file or a ressource in classp-ath
+ *
+ * @parameter expression="${jaxx.mapTemplate}" default-value="/defaultMap.jhm.vm"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected File mapTemplate;
+ /**
+ * The template used to generate helpset index file.
+ *
+ * Must be an existing file or a ressource in classp-ath
+ *
+ * @parameter expression="${jaxx.indexTemplate}" default-value="/defaultIndex.xml.vm"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected File indexTemplate;
+ /**
+ * The template used to generate helpset toc file.
+ *
+ * Must be an existing file or a ressource in classp-ath
+ *
+ * @parameter expression="${jaxx.tocTemplate}" default-value="/defaultToc.xml.vm"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected File tocTemplate;
+ /**
+ * The template used to generate helpset content file.
+ *
+ * Must be an existing file or a ressource in classp-ath
+ *
+ * @parameter expression="${jaxx.contentTemplate}" default-value="/defaultContent.html.vm"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected File contentTemplate;
+ /**
+ * The template used to generate helpset content file.
+ *
+ * Must be an existing file or a ressource in classp-ath
+ *
+ * @parameter expression="${jaxx.i18nTemplate}" default-value="/defaultI18n.java.vm"
+ * @required
+ *
+ * @since 1.3
+ */
+ protected File i18nTemplate;
+ /**
+ * The help ids discovered by Jaxx compilation
+ */
+ protected Properties helpIds;
+ private static final String AUTOREMOVE_LINE = "REMOVE THS LINE TO DISABLE AUTO-REGENERATE THE FILE";
+
+ @Override
+ public boolean init() throws Exception {
+
+ if (skip) {
+ return true;
+ }
+
+ if (!helpIdStore.exists()) {
+ skip = true;
+ getLog().info("no helpIdStore to react at " + helpIdStore);
+ return false;
+ }
+
+ // check there is some bundle
+ if (locale == null) {
+ throw new MojoFailureException("you must set the bundles property.");
+ }
+ // check there is some bundle
+ if (target == null) {
+ throw new MojoFailureException("you must set the target property.");
+ }
+ // check ressources
+ checkResource(helpSetTemplate);
+ checkResource(mapTemplate);
+ checkResource(indexTemplate);
+ checkResource(tocTemplate);
+ checkResource(contentTemplate);
+
+ if (!target.exists()) {
+ getLog().info("mkdir " + target);
+ target.mkdirs();
+ }
+
+
+ helpIds = new SortedProperties();
+
+ InputStream stream = new FileInputStream(helpIdStore);
+
+ helpIds.load(stream);
+
+ stream.close();
+
+ if (helpIds.isEmpty()) {
+
+ // no ids detected
+ getLog().warn("no helpIds detected, will skip.");
+ skip = true;
+ return false;
+ }
+
+ skip = false;
+ return true;
+ }
+
+ @Override
+ public void doAction() throws Exception {
+
+ if (skip) {
+ if (verbose) {
+ getLog().info("jaxx - skip!");
+ }
+ return;
+ }
+
+ if (i18nable) {
+
+ List<URL> lUrls = new java.util.ArrayList<URL>();
+ List<?> resources = project.getResources();
+ for (Object o : resources) {
+ Resource resource = (Resource) o;
+ lUrls.add(new File(resource.getDirectory()).toURI().toURL());
+ }
+ I18n.setExtraURL(lUrls.toArray(new URL[lUrls.size()]));
+ I18n.init(locale, null);
+ }
+
+ File file;
+
+ Properties env = new Properties();
+
+ env.put("helpSetName", helpSetName);
+ env.put("helpSetFileName", helpsetFileName);
+ env.put("mapFileName", mapFileName);
+ env.put("indexFileName", indexFileName);
+ env.put("tocFileName", tocFileName);
+ env.put("separator", " ");
+ env.put("autoremoveLine", AUTOREMOVE_LINE);
+
+
+ int touchedFiles = 0;
+
+ // ---------------------------------------------------------------
+ // --- main helpset file -----------------------------------------
+ // ---------------------------------------------------------------
+
+
+ file = new File(target, helpsetFileName);
+
+ boolean doCreate = generateHelSetFile(file, env);
+
+ if (doCreate) {
+ touchedFiles++;
+ }
+
+ // ---------------------------------------------------------------
+ // --- helpset map file ------------------------------------------
+ // ---------------------------------------------------------------
+
+ file = new File(target, mapFileName);
+
+ Properties mergedHelpIds = generateMapFile(file, env);
+ touchedFiles++;
+
+ // ---------------------------------------------------------------
+ // --- helpset index file ----------------------------------------
+ // ---------------------------------------------------------------
+
+ file = new File(target, indexFileName);
+
+ NodeItem indexRootItem = generateIndexFile(file, env);
+ touchedFiles++;
+
+ // ---------------------------------------------------------------
+ // --- helpset toc file ------------------------------------------
+ // ---------------------------------------------------------------
+
+ file = new File(target, tocFileName);
+
+ NodeItem tocRootItem = generateTocFile(file, env);
+ touchedFiles++;
+
+ // ---------------------------------------------------------------
+ // --- helpset content files -------------------------------------
+ // ---------------------------------------------------------------
+
+ TemplateGenerator gen = prepareGenerator(contentTemplate);
+
+ Enumeration<?> keys = helpIds.keys();
+
+ while (keys.hasMoreElements()) {
+ String key = (String) keys.nextElement();
+ String url = (String) helpIds.get(key);
+ url = helpSetName + File.separator + url;
+
+ File f = new File(target, url);
+
+ boolean exist = f.exists();
+
+ if (exist) {
+ // check if there is a autoremoveLine in content
+ String content = FileUtil.readAsString(f);
+ if (!content.contains(AUTOREMOVE_LINE)) {
+ // no regenerate marker detected, so skip this file
+ if (verbose) {
+ getLog().debug("skip existing file " + f);
+ }
+ continue;
+ }
+ }
+
+ f.getParentFile().mkdirs();
+
+ if (verbose) {
+ if (exist) {
+ getLog().info("regenerate content file " + f);
+ } else {
+ getLog().info("generate content file " + f);
+ }
+ }
+
+ env.put("helpId", key);
+ String i18n = helpsetI18nPrefix + key + helpsetTitleI18nSuffix;
+ env.put("helpIdTitle", _(i18n));
+ env.put("helpIdUrl", url);
+
+ gen.generate(env, f);
+ touchedFiles++;
+ }
+
+ // ---------------------------------------------------------------
+ // --- i18n file -------------------------------------------------
+ // ---------------------------------------------------------------
+
+ String path = packageName.replaceAll("\\.", File.separator);
+ path += File.separator + i8nFileName;
+ file = new File(outJava, path);
+ generateI18nFile(file, env, mergedHelpIds, indexRootItem, tocRootItem);
+ touchedFiles++;
+
+ getLog().info(touchedFiles + " file(s) treated.");
+ }
+
+ protected void generateI18nFile(File file, Properties env, Properties mergedHelpIds, NodeItem indexRootItem, NodeItem tocRootItem) throws Exception {
+
+ boolean create = !file.exists();
+
+ if (!file.getParentFile().exists()) {
+ file.getParentFile().mkdirs();
+ }
+
+ Set<String> keys = new java.util.HashSet<String>();
+
+ for (Object k : mergedHelpIds.keySet()) {
+ String key = helpsetI18nPrefix + k + helpsetTitleI18nSuffix;
+ keys.add(key);
+ }
+ indexRootItem.extractI18n(keys, helpsetI18nPrefix, helpsetIndexI18nSuffix);
+ tocRootItem.extractI18n(keys, helpsetI18nPrefix, helpsetTocI18nSuffix);
+
+ env.put("keys", keys);
+ env.put("packageName", packageName);
+ String className = file.getName();
+ int index = className.lastIndexOf(".");
+ className = className.substring(0, index);
+ env.put("className", className);
+
+ if (verbose) {
+ if (create) {
+ getLog().info("generate i18n java file " + file);
+ } else {
+ getLog().info("udpate i18n java file " + file);
+ }
+ }
+
+ doGen(i18nTemplate, file, env);
+
+ }
+
+ protected boolean generateHelSetFile(File file, Properties env) throws Exception {
+
+ if (file.exists()) {
+ // check the auto removeline presence
+ String content = FileUtil.readAsString(file);
+ if (!content.contains(AUTOREMOVE_LINE)) {
+ // no regenerate marker detected, so skip this file
+ if (verbose) {
+ getLog().info("skip existing helpset main file " + file);
+ }
+ return false;
+ }
+ }
+
+ if (verbose) {
+ if (file.exists()) {
+ getLog().info("regenerate helpset main file " + file);
+ } else {
+ getLog().info("generate helpset main file " + file);
+ }
+ }
+ doGen(helpSetTemplate, file, env);
+ return true;
+ }
+
+ protected Properties generateMapFile(File file, Properties env) throws Exception {
+
+ boolean create;
+
+ Properties mergedHelpIds = null;
+ if (file.exists()) {
+
+ // get back the exisiting data and merge it with incoming ones
+
+ if (verbose) {
+ getLog().info("loading existing helpset map file " + file);
+ }
+
+ mergedHelpIds = getExistingHelpIds(file);
+ create = false;
+
+ } else {
+
+ mergedHelpIds = new SortedProperties();
+ create = true;
+ }
+
+ // inject new helpIds
+
+ for (Object k : helpIds.keySet()) {
+ mergedHelpIds.put(k, helpSetName + "/" + helpIds.get(k));
+ }
+
+ if (!mergedHelpIds.contains("top")) {
+ // on ajoute une entree vers le root du helpset
+
+ String topUrl = helpSetName + ".html";
+ helpIds.put("top", topUrl);
+ mergedHelpIds.put("top", helpSetName + "/" + topUrl);
+ if (verbose) {
+ getLog().debug("add top entry with url " + topUrl);
+ }
+ }
+
+ if (verbose) {
+ if (create) {
+ getLog().info("generate helpset map file " + file);
+ } else {
+ getLog().info("udpate helpset map file " + file);
+ }
+ }
+
+ env.put("helpIds", mergedHelpIds);
+ doGen(mapTemplate, file, env);
+ env.remove("helpIds");
+ return mergedHelpIds;
+ }
+
+ protected NodeItem generateIndexFile(File file, Properties env) throws Exception {
+ NodeItem rootItem = null;
+
+ boolean create;
+
+ if (file.exists()) {
+
+ create = false;
+
+ rootItem = getExistingItems("indexitem", file);
+ } else {
+ create = true;
+ }
+
+ if (rootItem == null) {
+ rootItem = new NodeItem("top", helpSetName);
+ }
+
+ // inject new index entries
+
+ for (Object k : helpIds.keySet()) {
+ NodeItem toc = rootItem.findChild(k + "");
+ if (verbose) {
+ getLog().debug("index " + k + " : " + toc);
+ }
+ }
+
+ //String prefix = helpsetI18nPrefix;
+ //String prefix = helpsetI18nPrefix + helpSetName + ".";
+ rootItem.applyI18n(helpsetI18nPrefix, helpsetIndexI18nSuffix);
+
+ if (verbose) {
+ if (create) {
+ getLog().info("generate helpset index file " + file);
+ } else {
+ getLog().info("udpate helpset index file " + file);
+ }
+ }
+
+ env.put("rootItem", rootItem);
+ doGen(indexTemplate, file, env);
+ env.remove("rootItem");
+ return rootItem;
+ }
+
+ protected NodeItem generateTocFile(File file, Properties env) throws Exception {
+ NodeItem rootItem = null;
+
+ boolean create;
+
+ if (file.exists()) {
+
+ create = false;
+
+ rootItem = getExistingItems("tocitem", file);
+ } else {
+ create = true;
+ }
+
+ if (rootItem == null) {
+ rootItem = new NodeItem("top", helpSetName);
+ }
+ // inject new toc entries
+
+ for (Object k : helpIds.keySet()) {
+ NodeItem toc = rootItem.findChild(k + "");
+ if (verbose) {
+ getLog().debug("toc " + k + " : " + toc);
+ }
+ }
+
+ //String prefix = helpsetI18nPrefix + helpSetName + ".";
+ rootItem.applyI18n(helpsetI18nPrefix, helpsetTocI18nSuffix);
+
+ if (verbose) {
+ if (create) {
+ getLog().info("generate helpset toc file " + file);
+ } else {
+ getLog().info("udpate helpset toc file " + file);
+ }
+ }
+
+ env.put("rootItem", rootItem);
+ doGen(tocTemplate, file, env);
+ env.remove("rootItem");
+ return rootItem;
+ }
+
+ protected void doGen(File template, File f, Properties env) throws Exception {
+ TemplateGenerator gen = prepareGenerator(template);
+ gen.generate(env, f);
+ }
+
+ protected TemplateGenerator prepareGenerator(File template) throws Exception {
+ URL templateURL = getTemplate(template);
+
+ if (verbose) {
+ getLog().info("using template " + templateURL);
+ }
+ TemplateGenerator gen = new TemplateGenerator(project, templateURL);
+ return gen;
+ }
+
+// protected URL getTemplate(File f) throws IOException {
+// URL r = null;
+// if (f.exists()) {
+// r = f.toURI().toURL();
+// } else {
+// r = getClass().getResource(f.toString());
+// }
+// return r;
+// }
+//
+// protected void checkResource(File f) throws MojoFailureException {
+// if (!f.exists()) {
+// // test in classPath
+// InputStream r = getClass().getResourceAsStream(f.toString());
+// if (r == null) {
+// throw new MojoFailureException("could not find ressource " + f);
+// }
+// }
+// }
+ protected Properties getExistingHelpIds(File file) throws SAXException, IOException {
+
+ final Properties result = new SortedProperties();
+
+ XMLReader parser = XMLReaderFactory.createXMLReader();
+
+ parser.setContentHandler(new ContentHandlerAdapter() {
+
+ String target;
+ String url;
+
+ @Override
+ public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
+ if ("mapID".equals(localName)) {
+ target = atts.getValue("target");
+ url = atts.getValue("url");
+ if (verbose) {
+ getLog().debug("detect map entry : " + target + " : " + url);
+ }
+ result.put(target, url);
+ }
+ }
+ });
+
+ InputStream s = new FileInputStream(file);
+ try {
+ parser.parse(new InputSource(s));
+ } finally {
+ s.close();
+ }
+ return result;
+ }
+
+ protected NodeItem getExistingItems(String tagName, File file) throws SAXException, IOException {
+
+ XMLReader parser = XMLReaderFactory.createXMLReader();
+ NodeItemHandler handler = new NodeItemHandler(tagName);
+
+ parser.setContentHandler(handler);
+
+ NodeItem rootItem = null;
+ InputStream s = new FileInputStream(file);
+ try {
+ parser.parse(new InputSource(s));
+ rootItem = handler.rootItem;
+ } finally {
+ s.close();
+ }
+ return rootItem;
+ }
+
+ static class NodeItemHandler extends ContentHandlerAdapter {
+
+ NodeItem rootItem;
+ NodeItem currentItem;
+ final Stack<NodeItem> stack;
+ final String tagName;
+
+ public NodeItemHandler(String tagName) {
+ this.tagName = tagName;
+ this.stack = new Stack<NodeItem>();
+ }
+
+ @Override
+ public void startDocument() throws SAXException {
+ rootItem = new NodeItem("top", null);
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
+ if (tagName.equals(localName)) {
+
+ String target = atts.getValue("target");
+ String text = atts.getValue("text");
+
+ // debut d'un item
+ if (currentItem == null) {
+ // premier item
+ if (rootItem.getTarget().equals(target)) {
+ // le premier item est bien top
+ //rootItem.setText(text);
+ currentItem = rootItem;
+ } else {
+ // le premier noeud n'est pas top
+ // en l'encapsule
+ stack.push(rootItem);
+ currentItem = new NodeItem(target, text);
+ rootItem.addChild(currentItem);
+ }
+ } else {
+ NodeItem newItem = new NodeItem(target, text);
+ currentItem.addChild(newItem);
+ currentItem = newItem;
+ }
+ currentItem.adjustTarget();
+ stack.push(currentItem);
+
+ }
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ if (tagName.equals(localName)) {
+ // fin d'un item
+ stack.pop();
+ if (!stack.isEmpty()) {
+ currentItem = stack.peek();
+ }
+ }
+ }
+ }
+
+ static class ContentHandlerAdapter implements ContentHandler {
+
+ @Override
+ public void setDocumentLocator(Locator locator) {
+ }
+
+ @Override
+ public void startDocument() throws SAXException {
+ }
+
+ @Override
+ public void endDocument() throws SAXException {
+ }
+
+ @Override
+ public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ }
+
+ @Override
+ public void endPrefixMapping(String prefix) throws SAXException {
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ }
+
+ @Override
+ public void characters(char[] ch, int start, int length) throws SAXException {
+ }
+
+ @Override
+ public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
+ }
+
+ @Override
+ public void processingInstruction(String target, String data) throws SAXException {
+ }
+
+ @Override
+ public void skippedEntity(String name) throws SAXException {
+ }
+ }
+}
Property changes on: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/JaxxHelpGeneratorMojo.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/NodeItem.java (from rev 1534, trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/NodeItem.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/NodeItem.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/NodeItem.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,137 @@
+package org.nuiton.jaxx.plugin;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import static org.nuiton.i18n.I18n._;
+
+public class NodeItem {
+
+ String absoluteTarget;
+ private String target;
+ private String text;
+ private List<NodeItem> childs;
+
+ public NodeItem(String target, String text) {
+ this.target = target;
+ this.absoluteTarget = target;
+
+ this.text = text;
+ }
+
+ public String getTarget() {
+ return target;
+ }
+
+ public String getAbsoluteTarget() {
+ return absoluteTarget;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public List<NodeItem> getChilds() {
+ return childs;
+ }
+
+ public NodeItem findChild(String path) {
+ NodeItem result = null;
+ String[] paths = path.split("\\.");
+ for (int i = 0, j = paths.length; i < j; i++) {
+ String p = paths[i];
+ if (result == null) {
+
+ // first node
+ if (target.equals(p)) {
+ result = this;
+ continue;
+ }
+ result = getChild(p);
+ if (result == null) {
+ result = new NodeItem(p, null);
+ addChild(result);
+ adjutsAbsoluteTarget(result);
+ }
+ continue;
+ }
+ NodeItem child = result.getChild(p);
+ if (child == null) {
+ child = new NodeItem(p, null);
+ result.addChild(child);
+ result.adjutsAbsoluteTarget(child);
+ result = child;
+ } else {
+ result = child;
+ }
+ }
+ return result;
+ }
+
+ public NodeItem getChild(int index) {
+ return childs.get(index);
+ }
+
+ public NodeItem getChild(String target) {
+ if (isLeaf()) {
+ return null;
+ }
+ for (NodeItem i : childs) {
+ if (i.target.equals(target)) {
+ return i;
+ }
+ }
+ return null;
+ }
+
+ public void addChild(NodeItem child) {
+ if (childs == null) {
+ childs = new ArrayList<NodeItem>();
+ }
+
+ childs.add(child);
+ }
+
+ public void adjutsAbsoluteTarget(NodeItem child) {
+ if (!"top".equals(target)) {
+ // on ne prefixe pas les fils direct du root
+ child.absoluteTarget = absoluteTarget + "." + child.target;
+ }
+ }
+
+ public void adjustTarget() {
+ int index = target.lastIndexOf(".");
+ if (index > -1) {
+ target = target.substring(index + 1);
+ }
+ }
+
+ public boolean isLeaf() {
+ return childs == null || childs.isEmpty();
+ }
+
+ public void applyI18n(String prefix, String suffix) {
+ String key = prefix + getAbsoluteTarget() + suffix;
+ text = _(key);
+ if (!isLeaf()) {
+ for (NodeItem i : getChilds()) {
+ i.applyI18n(prefix, suffix);
+ }
+ }
+ }
+
+ public void extractI18n(Set<String> keys, String prefix, String suffix) {
+ String key = prefix + getAbsoluteTarget() + suffix;
+ keys.add(key);
+ if (!isLeaf()) {
+ for (NodeItem i : getChilds()) {
+ i.extractI18n(keys, prefix, suffix);
+ }
+ }
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + "<target:" + target + ", text:" + text + ", nbChilds:" + (isLeaf() ? 0 : childs.size()) + ">";
+ }
+}
Property changes on: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/NodeItem.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/TemplateGenerator.java (from rev 1534, trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/TemplateGenerator.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/TemplateGenerator.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/TemplateGenerator.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License" );
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.nuiton.jaxx.plugin;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+
+/**
+ * Generator of template base on velocity.
+ *
+ * @author chemit
+ * @since 1.3
+ *
+ */
+public class TemplateGenerator {
+
+ protected VelocityEngine engine;
+ protected final MavenProject mavenProject;
+ protected Template velocityTemplate;
+
+ protected TemplateGenerator(MavenProject mavenProject, URL template) throws URISyntaxException {
+
+ if (mavenProject == null) {
+ throw new IllegalArgumentException("mavenProject must not be null");
+ }
+
+ if (template == null) {
+ throw new IllegalArgumentException("template must not be null");
+ }
+
+ this.mavenProject = mavenProject;
+
+ Properties props = new Properties();
+
+ String templateName;
+
+ if (template.toURI().isOpaque()) {
+
+ // template is in a jar
+
+ props = new Properties();
+ props.setProperty("resource.loader", "jar");
+ props.setProperty("jar.resource.loader.description", "Jar resource loader for default webstart templates");
+ props.setProperty("jar.resource.loader.class", "org.apache.velocity.runtime.resource.loader.JarResourceLoader");
+
+ // obtain the jar url
+
+ String url = template.toString();
+ int i = url.indexOf("!");
+ templateName = url.substring(i + 2);
+
+ props.setProperty("jar.resource.loader.path", url.substring(0, i + 2));
+
+ } else {
+
+
+ templateName = new File(template.getFile()).getName();
+
+ //props.setProperty(VelocityEngine.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.NullLogSystem");
+ props.setProperty("file.resource.loader.path", template.getFile());
+
+ }
+
+ try {
+ engine = new VelocityEngine();
+ //engine.setProperty("runtime.log.logsystem", new NullLogSystem());
+ engine.init(props);
+ } catch (Exception e) {
+ IllegalArgumentException iae = new IllegalArgumentException("Could not initialise Velocity");
+ iae.initCause(e);
+ throw iae;
+ }
+
+ try {
+ this.velocityTemplate = engine.getTemplate(templateName);
+ } catch (Exception e) {
+ IllegalArgumentException iae =
+ new IllegalArgumentException("Could not load the template file from '" + template + "'");
+ iae.initCause(e);
+ throw iae;
+ }
+ }
+
+ public void generate(Properties context, File outputFile) throws Exception {
+
+
+ VelocityContext vcontext = new VelocityContext();
+
+ // Note: properties that contain dots will not be properly parsed by Velocity. Should we replace dots with underscores ?
+ addPropertiesToContext(System.getProperties(), vcontext);
+
+ addPropertiesToContext(mavenProject.getProperties(), vcontext);
+ addPropertiesToContext(context, vcontext);
+
+ vcontext.put("project", mavenProject.getModel());
+
+ vcontext.put("outputFile", outputFile.getName());
+
+ FileWriter writer = new FileWriter(outputFile);
+
+ try {
+ velocityTemplate.merge(vcontext, writer);
+ writer.flush();
+ } catch (Exception e) {
+ throw new Exception("Could not generate the template " + velocityTemplate.getName() + ": " + e.getMessage(), e);
+ } finally {
+ writer.close();
+ }
+ }
+
+ protected void addPropertiesToContext(Properties properties, VelocityContext context) {
+
+ for (Iterator<?> iter = properties.keySet().iterator(); iter.hasNext();) {
+ String key = (String) iter.next();
+ Object value = properties.get(key);
+ context.put(key, value);
+ }
+
+ }
+}
Property changes on: trunk/maven-jaxx-plugin/src/main/java/org/nuiton/jaxx/plugin/TemplateGenerator.java
___________________________________________________________________
Added: svn:mergeinfo
+
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1722Test.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1722Test.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1722Test.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,12 +0,0 @@
-package org.nuiton.jaxx;
-
-/** @author chemit */
-public class Bug1722Test extends JaxxBaseTest {
-
- public void testBug_1722() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(2);
- }
-
-
-}
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1750Test.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1750Test.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1750Test.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,44 +0,0 @@
-package org.nuiton.jaxx;
-
-import jaxx.Base64Coder;
-import jaxx.compiler.JAXXCompiler;
-import jaxx.compiler.JAXXCompilerLaunchor;
-import jaxx.runtime.JAXXObjectDescriptor;
-import jaxx.runtime.Util;
-
-/** @author chemit */
-public class Bug1750Test extends JaxxBaseTest {
-
- public void testBug_1750() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(1);
-
- JAXXCompiler compiler = JAXXCompilerLaunchor.get().getJAXXCompiler("testcases.bug_1750.ComboBox");
- assertNotNull(compiler);
-
- JAXXObjectDescriptor descriptor = compiler.getJAXXObjectDescriptor();
- assertNotNull(descriptor);
-
- String data = Base64Coder.serialize(descriptor, false);
-
- JAXXObjectDescriptor descriptor2 = (JAXXObjectDescriptor) Base64Coder.deserialize(data, false);
- assertNotNull(descriptor2);
- assertEquals(descriptor.toString(), descriptor2.toString());
-
- descriptor2 = Util.decodeJAXXObjectDescriptor(data);
- assertNotNull(descriptor2);
- assertEquals(descriptor.toString(), descriptor2.toString());
-
- data = Base64Coder.serialize(descriptor, true);
-
- descriptor2 = (JAXXObjectDescriptor) Base64Coder.deserialize(data, true);
- assertNotNull(descriptor2);
- assertEquals(descriptor.toString(), descriptor2.toString());
-
- descriptor2 = Util.decodeCompressedJAXXObjectDescriptor(data);
- assertNotNull(descriptor2);
- assertEquals(descriptor.toString(), descriptor2.toString());
-
- }
-
-}
\ No newline at end of file
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1751Test.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1751Test.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1751Test.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,14 +0,0 @@
-package org.nuiton.jaxx;
-
-/** @author chemit */
-public class Bug1751Test extends JaxxBaseTest {
-
- public void testBug_1751() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(3);
-
- checkPattern(mojo, "implements java.io.Serializable", true);
- checkPattern(mojo, "label.setText(_(\"test\"))", true);
- }
-
-}
\ No newline at end of file
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerTest.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerTest.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,227 +0,0 @@
-package org.nuiton.jaxx;
-
-import jaxx.compiler.JAXXCompiler;
-import jaxx.compiler.JAXXCompilerLaunchor;
-import jaxx.runtime.DefaultJAXXContext;
-import jaxx.runtime.JAXXContext;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.logging.SystemStreamLog;
-
-import java.io.File;
-import java.lang.reflect.Field;
-import java.util.Map;
-
-public class CompilerTest extends JaxxBaseTest {
-
- public void testInnerClasses() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(1);
- }
-
- public void testIcon() throws Exception {
- mojo.execute();
- checkPattern(mojo, ".createImageIcon(\"myIcon.png\")", true);
- checkPattern(mojo, ".createActionIcon(\"myActionIcon.png\")", true);
- checkPattern(mojo, ".getUIManagerIcon(\"myIcon.png\")", false);
- checkPattern(mojo, ".getUIManagerActionIcon(\"myActionIcon.png\")", false);
- assertNumberJaxxFiles(1);
- mojo.useUIManagerForIcon = true;
- mojo.execute();
- checkPattern(mojo, ".createImageIcon(\"myIcon.png\")", false);
- checkPattern(mojo, ".createActionIcon(\"myActionIcon.png\")", false);
- checkPattern(mojo, ".getUIManagerIcon(\"myIcon.png\")", true);
- checkPattern(mojo, ".getUIManagerActionIcon(\"myActionIcon.png\")", true);
- }
-
- public void testClientProperty() throws Exception {
- mojo.execute();
- checkPattern(mojo, ".putClientProperty(\"testOne\", \"oneTest\")", true);
- checkPattern(mojo, ".putClientProperty(\"testTwo\", \"anotherTest\")", true);
- }
-
- public void testSpecialSubclassing() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(7);
- }
-
- public void testCSSTests() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(7);
- }
-
- public void testWithLog() throws Exception {
- mojo.execute();
- String[] files = mojo.files;
- assertNumberJaxxFiles(2);
-
- String withLogFile;
- String withnoLogFile;
- if (files[0].endsWith("WithLog.jaxx")) {
- withLogFile = files[0];
- withnoLogFile = files[1];
- } else {
- withLogFile = files[1];
- withnoLogFile = files[0];
- }
- checkPattern(mojo, "Log log = LogFactory.getLog(", true, withLogFile);
- checkPattern(mojo, "import org.apache.commons.logging.Log;", true, withLogFile);
- checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", true, withLogFile);
-
- checkPattern(mojo, "Log log = LogFactory.getLog(", false, withnoLogFile);
- checkPattern(mojo, "import org.apache.commons.logging.Log;", false, withnoLogFile);
- checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", false, withnoLogFile);
- }
-
- public void testNoLog() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(2);
- checkPattern(mojo, "Log log = LogFactory.getLog(", false);
- checkPattern(mojo, "import org.apache.commons.logging.Log;", false);
- checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", false);
- }
-
- @SuppressWarnings({"unchecked"})
- public void testErrors() throws Exception {
- // init mojo to get alls files to treate
- mojo.init();
-
- assertNumberJaxxFiles(34);
- mojo.setLog(new SystemStreamLog() {
-
- @Override
- public boolean isErrorEnabled() {
- return false;
- }
-
- @Override
- public void error(Throwable error) {
- //do nothing
- }
-
- @Override
- public void error(CharSequence content) {
- //do nothing
- }
-
- @Override
- public void error(CharSequence content, Throwable error) {
- //do nothing
- }
- });
- Field fieldCompilers = JAXXCompilerLaunchor.class.getDeclaredField("compilers");
- Field fieldErrorCount = JAXXCompilerLaunchor.class.getDeclaredField("errorCount");
-
- fieldCompilers.setAccessible(true);
- fieldErrorCount.setAccessible(true);
-
- // execute mjo on each jaxx file to produce the error
- for (String file : mojo.files) {
- getLog().info("test bad file " + file);
- mojo.files = new String[]{file};
- try {
- mojo.doAction();
- // should never pass
- fail();
- } catch (MojoExecutionException e) {
- // ok jaxx compiler failed
- assertTrue(true);
-
- JAXXCompilerLaunchor launchor = JAXXCompilerLaunchor.get();
- Map<String, JAXXCompiler> compilers = (Map<String, JAXXCompiler>) fieldCompilers.get(launchor);
- assertEquals(1, compilers.size());
- //JAXXCompiler compiler;
- //compiler = compilers.values().iterator().next();
- Integer nberrors = (Integer) fieldErrorCount.get(launchor);
- assertTrue(nberrors != null && nberrors > 0);
- }
- }
- }
-
- public void testInitializers() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(1);
- }
-
- public void testErrorJaxxContextImplementorClass() throws Exception {
- mojo.jaxxContextImplementorClass = null;
- try {
- mojo.init();
- fail();
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
-
- mojo.jaxxContextImplementorClass = String.class.getName();
- try {
- mojo.init();
- fail();
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
-
- mojo.jaxxContextImplementorClass = JAXXContext.class.getName();
- try {
- mojo.init();
- fail();
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
-
- mojo.jaxxContextImplementorClass = DefaultJAXXContext.class.getName();
- mojo.init();
- assertTrue(true);
-
- }
-
- public void testScript() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(1);
- }
-
- public void testOverridingDataBindings() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(3);
- }
-
- public void testClassReferences() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(6);
- }
-
- public void testForce() throws Exception {
-
- // first round, with force option so will generate theonly JButton.jaxx file
- mojo.execute();
- String[] files = mojo.files;
- assertNumberJaxxFiles(1);
-
- File srcFile = new File(mojo.src, files[0]);
-
- File dstFile = mojo.updater.getMirrorFile(srcFile);
-
- long oldTime = dstFile.lastModified();
- // second round, no force so will not the file
- mojo.force = false;
- mojo.execute();
- assertNumberJaxxFiles(0);
-
- Thread.sleep(1000);
-
- assertEquals(oldTime, mojo.updater.getMirrorFile(srcFile).lastModified());
-
- // three round : modify a source with no force option
- if (!srcFile.setLastModified(System.currentTimeMillis())) {
- log.warn("failed to set LastModified for file " + srcFile);
- }
-
- mojo.execute();
- assertNumberJaxxFiles(1);
- assertTrue(mojo.updater.getMirrorFile(srcFile).lastModified() > oldTime);
-
- // last round, reforce file generation for an no modify source
- mojo.force = true;
- mojo.execute();
- assertNumberJaxxFiles(1);
- assertTrue(mojo.updater.getMirrorFile(srcFile).lastModified() > oldTime);
- }
-}
\ No newline at end of file
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerValidatorTest.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerValidatorTest.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerValidatorTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,72 +0,0 @@
-package org.nuiton.jaxx;
-
-import jaxx.compiler.JAXXCompilerLaunchor;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.logging.SystemStreamLog;
-
-import java.lang.reflect.Field;
-import java.util.Map;
-
-public class CompilerValidatorTest extends JaxxBaseTest {
-
- public void testValidatorOk() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(2);
-
- }
-
- @SuppressWarnings({"unchecked"})
- public void testValidatorErrors() throws Exception {
- // init mojo to get alls files to treate
- mojo.init();
- String[] files = mojo.files;
- assertNumberJaxxFiles(19);
- mojo.setLog(new SystemStreamLog() {
- @Override
- public boolean isErrorEnabled() {
- return false;
- }
-
- @Override
- public void error(Throwable error) {
- //do nothing
- }
-
- @Override
- public void error(CharSequence content) {
- //do nothing
- }
-
- @Override
- public void error(CharSequence content, Throwable error) {
- //do nothing
- }
- });
- Field fieldCompilers = JAXXCompilerLaunchor.class.getDeclaredField("compilers");
- Field fieldErrorCount = JAXXCompilerLaunchor.class.getDeclaredField("errorCount");
-
- fieldCompilers.setAccessible(true);
- fieldErrorCount.setAccessible(true);
-
- // execute mjo on each jaxx file to produce the error
- for (String file : files) {
- getLog().info("test bad file " + file);
- mojo.files = new String[]{file};
- try {
- mojo.doAction();
- // should never pass
- fail("for file " + file);
- } catch (MojoExecutionException e) {
- // ok jaxx compiler failed
- assertTrue(true);
- JAXXCompilerLaunchor launchor = JAXXCompilerLaunchor.get();
- Map<String, Compiler> compilers = (Map<String, Compiler>) fieldCompilers.get(launchor);
- assertEquals(1, compilers.size());
- //Compiler compiler = compilers.values().iterator().next();
- Integer nberrors = (Integer) fieldErrorCount.get(launchor);
- assertEquals(1, nberrors.intValue());
- }
- }
- }
-
-}
\ No newline at end of file
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/DecoratorTest.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/DecoratorTest.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/DecoratorTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,11 +0,0 @@
-package org.nuiton.jaxx;
-
-public class DecoratorTest extends JaxxBaseTest {
-
- public void testDecorator() throws Exception {
- mojo.execute();
- assertNumberJaxxFiles(1);
- checkPattern(mojo, "root.add(jaxx.runtime.SwingUtil.boxComponentWithJxLayer(boxedButton))", true);
- }
-
-}
\ No newline at end of file
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/I18nTest.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/I18nTest.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/I18nTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,39 +0,0 @@
-package org.nuiton.jaxx;
-
-public class I18nTest extends JaxxBaseTest {
-
- public void testI18nText() throws Exception {
- mojo.i18nable = false;
- mojo.execute();
- checkPattern(mojo, "testId.setText(_(\"test.text\"));", false);
-
- mojo.i18nable = true;
- mojo.execute();
- checkPattern(mojo, "testId.setText(_(\"test.text\"));", true);
- checkPattern(mojo, "\"_(\\\"test.text\\\")\"", false);
- }
-
- public void testI18nTitle() throws Exception {
- mojo.i18nable = false;
- mojo.execute();
- checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", false);
-
- mojo.i18nable = true;
- mojo.execute();
- checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", true);
- checkPattern(mojo, "\"_(\\\"test.title\\\")\"", false);
- }
-
- public void testI18nToolTipText() throws Exception {
- mojo.i18nable = false;
- mojo.execute();
- checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", false);
-
- mojo.i18nable = true;
- mojo.execute();
- checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", true);
- checkPattern(mojo, "\"_(\\\"test.toolTipText\\\")\"", false);
- }
-
-
-}
\ No newline at end of file
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/JaxxBaseTest.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/JaxxBaseTest.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/JaxxBaseTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,85 +0,0 @@
-package org.nuiton.jaxx;
-
-import jaxx.runtime.DefaultJAXXContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.nuiton.util.FileUtil;
-
-import java.io.File;
-import java.io.IOException;
-
-/** @author chemit */
-public abstract class JaxxBaseTest extends AbstractMojoTestCase {
-
- protected static final String DEFALUT_PREFIX = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "testcases" + File.separator;
-
- /** log */
- protected Log log;
-
- protected JaxxGeneratorMojo mojo;
-
- protected File pomFile;
-
- public String getPrefix() {
- return DEFALUT_PREFIX;
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- getLog().info(getName());
- pomFile = getPomFile();
- mojo = (JaxxGeneratorMojo) lookupMojo("generate", pomFile);
- mojo.jaxxContextImplementorClass = DefaultJAXXContext.class.getName();
- mojo.compilerFQN = jaxx.compiler.SwingCompiler.class.getName();
- mojo.validatorFQN = jaxx.runtime.validator.swing.SwingValidator.class.getName();
- mojo.defaultDecoratorFQN = jaxx.compiler.DefaultCompiledObjectDecorator.class.getName();
- assertNotNull(mojo);
- }
-
- protected File getPomFile() {
- return new File(getBasedir(), getPrefix() + getName().substring(4) + ".xml");
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- if (mojo != null) {
- mojo = null;
- }
- if (pomFile != null) {
- pomFile = null;
- }
- }
-
- protected void checkPattern(JaxxGeneratorMojo mojo, String pattern, boolean required, String... files) throws IOException {
- if (files.length == 0) {
- files = mojo.files;
- }
- for (String file : files) {
- // check we have a the required/forbidden pattern
- File f = new File(mojo.outJava, file.substring(0, file.length() - 4) + "java");
- if (mojo.verbose) {
- getLog().info("check generated file " + f);
- }
-
- assertTrue("generated file " + f + " was not found...", f.exists());
- String content = FileUtil.readAsString(f);
-
- String errorMessage = required ? "could not find the pattern : " : "should not have found pattern :";
- assertEquals(errorMessage + pattern + " in file " + f, required, content.contains(pattern));
- }
- }
-
- protected Log getLog() {
- if (log == null) {
- log = LogFactory.getLog(getClass());
- }
- return log;
- }
-
- protected void assertNumberJaxxFiles(int expectedNbFiles) {
- assertEquals(expectedNbFiles, mojo.files.length);
- }
-}
Deleted: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/NodeItemTest.java
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/NodeItemTest.java 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/NodeItemTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -1,54 +0,0 @@
-package org.nuiton.jaxx;
-
-import org.junit.Assert;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-/**
- *
- * @author tony
- */
-public class NodeItemTest {
-
- @Test
- public void testFindChild() {
- System.out.println("findChild");
- String path = "a";
- NodeItem instance = new NodeItem("a", "rootItem text");
- NodeItem expResult = new NodeItem("a", "rootItem text");
- NodeItem result = instance.findChild(path);
- assertTocItemEquals(expResult, result);
-
- path = "a.b";
- expResult = new NodeItem("b", null);
- result = instance.findChild(path);
- assertTocItemEquals(expResult, result);
- assertTrue(instance.getChild("b") == result);
- assertTrue(instance.findChild("b") == result);
-
- NodeItem b = result;
-
- path = "ab";
- expResult = new NodeItem("ab", null);
- result = instance.findChild(path);
- assertTocItemEquals(expResult, result);
- assertTrue(instance.getChild("ab") == result);
- assertTrue(instance.findChild("ab") == result);
-
- path = "a.b.cd";
- expResult = new NodeItem("cd", null);
- result = instance.findChild(path);
- assertTocItemEquals(expResult, result);
- assertTrue(b.getChild("cd") == result);
- assertTrue(b.findChild("b.cd") == result);
- assertTrue(b.findChild("cd") == result);
- assertTrue(instance.findChild("b.cd") == result);
- assertTrue(instance.findChild("a.b.cd") == result);
- }
-
- protected void assertTocItemEquals(NodeItem t, NodeItem t2) {
- Assert.assertEquals(t.getTarget(), t2.getTarget());
- Assert.assertEquals(t.getText(), t2.getText());
-
- }
-}
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1722Test.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1722Test.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1722Test.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1722Test.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,15 @@
+package org.nuiton.jaxx.plugin;
+
+import org.junit.Test;
+
+/** @author chemit */
+public class Bug1722Test extends JaxxBaseTest {
+
+ @Test
+ public void Bug_1722() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(2);
+ }
+
+
+}
Property changes on: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1722Test.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1750Test.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1750Test.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1750Test.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1750Test.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,47 @@
+package org.nuiton.jaxx.plugin;
+
+import jaxx.Base64Coder;
+import jaxx.compiler.JAXXCompiler;
+import jaxx.compiler.JAXXCompilerLaunchor;
+import jaxx.runtime.JAXXObjectDescriptor;
+import jaxx.runtime.Util;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/** @author chemit */
+public class Bug1750Test extends JaxxBaseTest {
+
+ @Test
+ public void Bug_1750() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(1);
+
+ JAXXCompiler compiler = JAXXCompilerLaunchor.get().getJAXXCompiler("org.nuiton.jaxx.plugin.Bug1750Test.ComboBox");
+ assertNotNull(compiler);
+
+ JAXXObjectDescriptor descriptor = compiler.getJAXXObjectDescriptor();
+ assertNotNull(descriptor);
+
+ String data = Base64Coder.serialize(descriptor, false);
+
+ JAXXObjectDescriptor descriptor2 = (JAXXObjectDescriptor) Base64Coder.deserialize(data, false);
+ assertNotNull(descriptor2);
+ assertEquals(descriptor.toString(), descriptor2.toString());
+
+ descriptor2 = Util.decodeJAXXObjectDescriptor(data);
+ assertNotNull(descriptor2);
+ assertEquals(descriptor.toString(), descriptor2.toString());
+
+ data = Base64Coder.serialize(descriptor, true);
+
+ descriptor2 = (JAXXObjectDescriptor) Base64Coder.deserialize(data, true);
+ assertNotNull(descriptor2);
+ assertEquals(descriptor.toString(), descriptor2.toString());
+
+ descriptor2 = Util.decodeCompressedJAXXObjectDescriptor(data);
+ assertNotNull(descriptor2);
+ assertEquals(descriptor.toString(), descriptor2.toString());
+
+ }
+}
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1751Test.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/Bug1751Test.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1751Test.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/Bug1751Test.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,18 @@
+package org.nuiton.jaxx.plugin;
+
+import org.junit.Test;
+
+/** @author chemit */
+public class Bug1751Test extends JaxxBaseTest {
+
+ @Test
+ public void Bug_1751() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.execute();
+ assertNumberJaxxFiles(3);
+
+ checkPattern(mojo, "implements java.io.Serializable", true);
+ checkPattern(mojo, "label.setText(_(\"test\"))", true);
+ }
+
+}
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerTest.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerTest.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerTest.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,251 @@
+package org.nuiton.jaxx.plugin;
+
+import jaxx.compiler.JAXXCompiler;
+import jaxx.compiler.JAXXCompilerLaunchor;
+import jaxx.runtime.DefaultJAXXContext;
+import jaxx.runtime.JAXXContext;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+
+import java.io.File;
+import java.lang.reflect.Field;
+import java.util.Map;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+public class CompilerTest extends JaxxBaseTest {
+
+ @Test
+ public void InnerClasses() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(1);
+ }
+
+ @Test
+ public void Icon() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.execute();
+ checkPattern(mojo, ".createImageIcon(\"myIcon.png\")", true);
+ checkPattern(mojo, ".createActionIcon(\"myActionIcon.png\")", true);
+ checkPattern(mojo, ".getUIManagerIcon(\"myIcon.png\")", false);
+ checkPattern(mojo, ".getUIManagerActionIcon(\"myActionIcon.png\")", false);
+ assertNumberJaxxFiles(1);
+ mojo.useUIManagerForIcon = true;
+ mojo.execute();
+ checkPattern(mojo, ".createImageIcon(\"myIcon.png\")", false);
+ checkPattern(mojo, ".createActionIcon(\"myActionIcon.png\")", false);
+ checkPattern(mojo, ".getUIManagerIcon(\"myIcon.png\")", true);
+ checkPattern(mojo, ".getUIManagerActionIcon(\"myActionIcon.png\")", true);
+ }
+
+ @Test
+ public void ClientProperty() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.execute();
+ checkPattern(mojo, ".putClientProperty(\"testOne\", \"oneTest\")", true);
+ checkPattern(mojo, ".putClientProperty(\"testTwo\", \"anotherTest\")", true);
+ }
+
+ @Test
+ public void SpecialSubclassing() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(7);
+ }
+
+ @Test
+ public void CSSTests() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(7);
+ }
+
+ @Test
+ public void WithLog() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.execute();
+ String[] files = mojo.files;
+ assertNumberJaxxFiles(2);
+
+ String withLogFile;
+ String withnoLogFile;
+ if (files[0].endsWith("WithLog.jaxx")) {
+ withLogFile = files[0];
+ withnoLogFile = files[1];
+ } else {
+ withLogFile = files[1];
+ withnoLogFile = files[0];
+ }
+ checkPattern(mojo, "Log log = LogFactory.getLog(", true, withLogFile);
+ checkPattern(mojo, "import org.apache.commons.logging.Log;", true, withLogFile);
+ checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", true, withLogFile);
+
+ checkPattern(mojo, "Log log = LogFactory.getLog(", false, withnoLogFile);
+ checkPattern(mojo, "import org.apache.commons.logging.Log;", false, withnoLogFile);
+ checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", false, withnoLogFile);
+ }
+
+ @Test
+ public void NoLog() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.execute();
+ assertNumberJaxxFiles(2);
+ checkPattern(mojo, "Log log = LogFactory.getLog(", false);
+ checkPattern(mojo, "import org.apache.commons.logging.Log;", false);
+ checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", false);
+ }
+
+ @SuppressWarnings({"unchecked"})
+ @Test
+ public void Errors() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ // init mojo to get alls files to treate
+ mojo.init();
+
+ assertNumberJaxxFiles(34);
+ mojo.setLog(new SystemStreamLog() {
+
+ @Override
+ public boolean isErrorEnabled() {
+ return false;
+ }
+
+ @Override
+ public void error(Throwable error) {
+ //do nothing
+ }
+
+ @Override
+ public void error(CharSequence content) {
+ //do nothing
+ }
+
+ @Override
+ public void error(CharSequence content, Throwable error) {
+ //do nothing
+ }
+ });
+ Field fieldCompilers = JAXXCompilerLaunchor.class.getDeclaredField("compilers");
+ Field fieldErrorCount = JAXXCompilerLaunchor.class.getDeclaredField("errorCount");
+
+ fieldCompilers.setAccessible(true);
+ fieldErrorCount.setAccessible(true);
+
+ // execute mjo on each jaxx file to produce the error
+ for (String file : mojo.files) {
+ log.info("test bad file " + file);
+ mojo.files = new String[]{file};
+ try {
+ mojo.doAction();
+ // should never pass
+ fail();
+ } catch (MojoExecutionException e) {
+ // ok jaxx compiler failed
+ assertTrue(true);
+
+ JAXXCompilerLaunchor launchor = JAXXCompilerLaunchor.get();
+ Map<String, JAXXCompiler> compilers = (Map<String, JAXXCompiler>) fieldCompilers.get(launchor);
+ assertEquals(1, compilers.size());
+ //JAXXCompiler compiler;
+ //compiler = compilers.values().iterator().next();
+ Integer nberrors = (Integer) fieldErrorCount.get(launchor);
+ assertTrue(nberrors != null && nberrors > 0);
+ }
+ }
+ }
+
+ @Test
+ public void Initializers() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(1);
+ }
+
+ @Test
+ public void ErrorJaxxContextImplementorClass() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.jaxxContextImplementorClass = null;
+ try {
+ mojo.init();
+ fail();
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
+
+ mojo.jaxxContextImplementorClass = String.class.getName();
+ try {
+ mojo.init();
+ fail();
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
+
+ mojo.jaxxContextImplementorClass = JAXXContext.class.getName();
+ try {
+ mojo.init();
+ fail();
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
+
+ mojo.jaxxContextImplementorClass = DefaultJAXXContext.class.getName();
+ mojo.init();
+ assertTrue(true);
+
+ }
+
+ @Test
+ public void Script() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(1);
+ }
+
+ @Test
+ public void OverridingDataBindings() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(3);
+ }
+
+ @Test
+ public void ClassReferences() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(6);
+ }
+
+ @Test
+ public void Force() throws Exception {
+
+ // first round, with force option so will generate theonly JButton.jaxx file
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.execute();
+ String[] files = mojo.files;
+ assertNumberJaxxFiles(1);
+
+ File srcFile = new File(mojo.src, files[0]);
+
+ File dstFile = mojo.updater.getMirrorFile(srcFile);
+
+ long oldTime = dstFile.lastModified();
+ // second round, no force so will not the file
+ mojo.force = false;
+ mojo.execute();
+ assertNumberJaxxFiles(0);
+
+ Thread.sleep(1000);
+
+ assertEquals(oldTime, mojo.updater.getMirrorFile(srcFile).lastModified());
+
+ // three round : modify a source with no force option
+ if (!srcFile.setLastModified(System.currentTimeMillis())) {
+ log.warn("failed to set LastModified for file " + srcFile);
+ }
+
+ mojo.execute();
+ assertNumberJaxxFiles(1);
+ assertTrue(mojo.updater.getMirrorFile(srcFile).lastModified() > oldTime);
+
+ // last round, reforce file generation for an no modify source
+ mojo.force = true;
+ mojo.execute();
+ assertNumberJaxxFiles(1);
+ assertTrue(mojo.updater.getMirrorFile(srcFile).lastModified() > oldTime);
+ }
+}
Property changes on: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerTest.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerValidatorTest.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/CompilerValidatorTest.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerValidatorTest.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/CompilerValidatorTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,79 @@
+package org.nuiton.jaxx.plugin;
+
+import jaxx.compiler.JAXXCompilerLaunchor;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+
+import java.lang.reflect.Field;
+import java.util.Map;
+
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+public class CompilerValidatorTest extends JaxxBaseTest {
+
+ @Test
+ public void ValidatorOk() throws Exception {
+ getMojo().execute();
+ assertNumberJaxxFiles(2);
+
+ }
+
+ @Test
+ @SuppressWarnings({"unchecked"})
+ public void ValidatorErrors() throws Exception {
+ // init mojo to get alls files to treate
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.init();
+ String[] files = mojo.files;
+ assertNumberJaxxFiles(19);
+ mojo.setLog(new SystemStreamLog() {
+ @Override
+ public boolean isErrorEnabled() {
+ return false;
+ }
+
+ @Override
+ public void error(Throwable error) {
+ //do nothing
+ }
+
+ @Override
+ public void error(CharSequence content) {
+ //do nothing
+ }
+
+ @Override
+ public void error(CharSequence content, Throwable error) {
+ //do nothing
+ }
+ });
+ Field fieldCompilers = JAXXCompilerLaunchor.class.getDeclaredField("compilers");
+ Field fieldErrorCount = JAXXCompilerLaunchor.class.getDeclaredField("errorCount");
+
+ fieldCompilers.setAccessible(true);
+ fieldErrorCount.setAccessible(true);
+
+ // execute mjo on each jaxx file to produce the error
+ for (String file : files) {
+ log.info("test bad file " + file);
+ mojo.files = new String[]{file};
+ try {
+ mojo.doAction();
+ // should never pass
+ fail("for file " + file);
+ } catch (MojoExecutionException e) {
+ // ok jaxx compiler failed
+ assertTrue(true);
+ JAXXCompilerLaunchor launchor = JAXXCompilerLaunchor.get();
+ Map<String, Compiler> compilers = (Map<String, Compiler>) fieldCompilers.get(launchor);
+ assertEquals(1, compilers.size());
+ //Compiler compiler = compilers.values().iterator().next();
+ Integer nberrors = (Integer) fieldErrorCount.get(launchor);
+ assertEquals(1, nberrors.intValue());
+ }
+ }
+ }
+
+}
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/DecoratorTest.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/DecoratorTest.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/DecoratorTest.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/DecoratorTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,15 @@
+package org.nuiton.jaxx.plugin;
+
+import org.junit.Test;
+
+public class DecoratorTest extends JaxxBaseTest {
+
+ @Test
+ public void Decorator() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.execute();
+ assertNumberJaxxFiles(1);
+ checkPattern(mojo, "root.add(jaxx.runtime.SwingUtil.boxComponentWithJxLayer(boxedButton))", true);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/DecoratorTest.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/I18nTest.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/I18nTest.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/I18nTest.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/I18nTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,45 @@
+package org.nuiton.jaxx.plugin;
+
+import org.junit.Test;
+
+public class I18nTest extends JaxxBaseTest {
+
+ @Test
+ public void I18nText() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.i18nable = false;
+ mojo.execute();
+ checkPattern(mojo, "testId.setText(_(\"test.text\"));", false);
+
+ mojo.i18nable = true;
+ mojo.execute();
+ checkPattern(mojo, "testId.setText(_(\"test.text\"));", true);
+ checkPattern(mojo, "\"_(\\\"test.text\\\")\"", false);
+ }
+
+ @Test
+ public void I18nTitle() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.i18nable = false;
+ mojo.execute();
+ checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", false);
+
+ mojo.i18nable = true;
+ mojo.execute();
+ checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", true);
+ checkPattern(mojo, "\"_(\\\"test.title\\\")\"", false);
+ }
+
+ @Test
+ public void I18nToolTipText() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo();
+ mojo.i18nable = false;
+ mojo.execute();
+ checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", false);
+
+ mojo.i18nable = true;
+ mojo.execute();
+ checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", true);
+ checkPattern(mojo, "\"_(\\\"test.toolTipText\\\")\"", false);
+ }
+}
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/JaxxBaseTest.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,57 @@
+package org.nuiton.jaxx.plugin;
+
+import jaxx.runtime.DefaultJAXXContext;
+import org.nuiton.util.FileUtil;
+
+import java.io.File;
+import java.io.IOException;
+import org.nuiton.plugin.AbstractMojoTest;
+import static org.junit.Assert.*;
+
+/** Base test case for a jaxx:generate goal.
+ *
+ * Use {@link AbstractMojoTest} from {@code maven-helper-plugin}.
+ *
+ * @author chemit
+ * @see AbstractMojoTest
+ * @see JaxxGeneratorMojo
+ */
+public abstract class JaxxBaseTest extends AbstractMojoTest<JaxxGeneratorMojo> {
+
+ @Override
+ protected String getGoalName(String methodName) {
+ return "generate";
+ }
+
+ @Override
+ protected void setUpMojo(JaxxGeneratorMojo mojo, File pomFile) throws Exception {
+ super.setUpMojo(mojo, pomFile);
+ mojo.jaxxContextImplementorClass = DefaultJAXXContext.class.getName();
+ mojo.compilerFQN = jaxx.compiler.SwingCompiler.class.getName();
+ mojo.validatorFQN = jaxx.runtime.validator.swing.SwingValidator.class.getName();
+ mojo.defaultDecoratorFQN = jaxx.compiler.DefaultCompiledObjectDecorator.class.getName();
+ }
+
+ protected void checkPattern(JaxxGeneratorMojo mojo, String pattern, boolean required, String... files) throws IOException {
+ if (files.length == 0) {
+ files = mojo.files;
+ }
+ for (String file : files) {
+ // check we have a the required/forbidden pattern
+ File f = new File(mojo.outJava, file.substring(0, file.length() - 4) + "java");
+ if (mojo.verbose) {
+ log.info("check generated file " + f);
+ }
+
+ assertTrue("generated file " + f + " was not found...", f.exists());
+ String content = FileUtil.readAsString(f);
+
+ String errorMessage = required ? "could not find the pattern : " : "should not have found pattern :";
+ assertEquals(errorMessage + pattern + " in file " + f, required, content.contains(pattern));
+ }
+ }
+
+ protected void assertNumberJaxxFiles(int expectedNbFiles) {
+ assertEquals(expectedNbFiles, getMojo().files.length);
+ }
+}
Property changes on: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/NodeItemTest.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/NodeItemTest.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/NodeItemTest.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/NodeItemTest.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,54 @@
+package org.nuiton.jaxx.plugin;
+
+import org.junit.Assert;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author tony
+ */
+public class NodeItemTest {
+
+ @Test
+ public void testFindChild() {
+ System.out.println("findChild");
+ String path = "a";
+ NodeItem instance = new NodeItem("a", "rootItem text");
+ NodeItem expResult = new NodeItem("a", "rootItem text");
+ NodeItem result = instance.findChild(path);
+ assertTocItemEquals(expResult, result);
+
+ path = "a.b";
+ expResult = new NodeItem("b", null);
+ result = instance.findChild(path);
+ assertTocItemEquals(expResult, result);
+ assertTrue(instance.getChild("b") == result);
+ assertTrue(instance.findChild("b") == result);
+
+ NodeItem b = result;
+
+ path = "ab";
+ expResult = new NodeItem("ab", null);
+ result = instance.findChild(path);
+ assertTocItemEquals(expResult, result);
+ assertTrue(instance.getChild("ab") == result);
+ assertTrue(instance.findChild("ab") == result);
+
+ path = "a.b.cd";
+ expResult = new NodeItem("cd", null);
+ result = instance.findChild(path);
+ assertTocItemEquals(expResult, result);
+ assertTrue(b.getChild("cd") == result);
+ assertTrue(b.findChild("b.cd") == result);
+ assertTrue(b.findChild("cd") == result);
+ assertTrue(instance.findChild("b.cd") == result);
+ assertTrue(instance.findChild("a.b.cd") == result);
+ }
+
+ protected void assertTocItemEquals(NodeItem t, NodeItem t2) {
+ Assert.assertEquals(t.getTarget(), t2.getTarget());
+ Assert.assertEquals(t.getText(), t2.getText());
+
+ }
+}
Property changes on: trunk/maven-jaxx-plugin/src/test/java/org/nuiton/jaxx/plugin/NodeItemTest.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/Bug_1722.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Bug_1722.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/Bug_1722.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/Bug_1722.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <verbose>true</verbose>
+ <includes>
+ <value>**/Bug1722Test/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/DemoPanel.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/DemoPanel.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/DemoPanel.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/DemoPanel.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,7 @@
+<JTabbedPane id='top'>
+ <tab title='Title'>
+ <JPanel id='demoPanel'>
+ <JLabel text='override'/>
+ </JPanel>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/JButtonDemo.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/JButtonDemo.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/JButtonDemo.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/JButtonDemo.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<DemoPanel>
+ <JPanel id='demoPanel'>
+ <JLabel text='override'/>
+ </JPanel>
+</DemoPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1722Test/JButtonDemo.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/Bug_1750.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Bug_1750.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/Bug_1750.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/Bug_1750.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <verbose>true</verbose>
+ <resetAfterCompile>false</resetAfterCompile>
+ <includes>
+ <value>**/Bug1750Test/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/ComboBox.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1750/ComboBox.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/ComboBox.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/ComboBox.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,18 @@
+<Table>
+
+ <!-- selectedItem state -->
+ <Object id='selectedItem' javaBean=''/>
+
+ <!-- check state -->
+ <Boolean id='check' constructorParams='false' javaBean=''/>
+
+ <row>
+ <cell>
+ <JComboBox id='combobox' selectedItem='{getSelectedItem()}'
+ onItemStateChanged='setSelectedItem(combobox.getSelectedItem())'/>
+ </cell>
+ <cell>
+ <JCheckBox id='checkbox' selected='{isCheck()}' onActionPerformed='setCheck(checkbox.isSelected())'/>
+ </cell>
+ </row>
+</Table>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1750Test/ComboBox.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Bug_1751.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Bug_1751.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Bug_1751.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Bug_1751.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <i18nable>true</i18nable>
+ <force>true</force>
+ <verbose>true</verbose>
+ <resetAfterCompile>false</resetAfterCompile>
+ <includes>
+ <value>**/Bug1751Test/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test1.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1751/Test1.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test1.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test1.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JLabel id='label' implements="java.io.Serializable" text='test'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test1.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1751/Test2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JLabel id='label' text='test' implements="java.io.Serializable"/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test3.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1751/Test3.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test3.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test3.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JLabel implements="java.io.Serializable" text='test' id='label'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/Bug1751Test/Test3.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/CSSTests.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests/CSSTests.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/CSSTests.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/CSSTests.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,24 @@
+<Application title='CSSTests'>
+ <style>
+ Application { lookAndFeel: {lookAndFeel.getSelectedValue()}; }
+ </style>
+
+ <JMenuBar>
+ <JMenu text='View'>
+ <JMenu text='Look and Feel'>
+ <JRadioButtonMenuItem text='Ocean' value='cross_platform' buttonGroup='lookAndFeel' selected='true'/>
+ <JRadioButtonMenuItem text='System' value='system' buttonGroup='lookAndFeel'/>
+ </JMenu>
+ </JMenu>
+ </JMenuBar>
+
+ <JTabbedPane>
+ <tab title='Simple Tests'>
+ <SimpleCSS/>
+ </tab>
+
+ <tab title='Pseudoclasses'>
+ <Pseudoclasses/>
+ </tab>
+ </JTabbedPane>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/CSSTests.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests/Child.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JButton styleClass='yellow' id='child'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests/Child2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JButton foreground='#ffcccc'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Child2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChild.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests/GrandChild.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChild.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChild.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,28 @@
+<JPanel layout='{new BorderLayout()}'>
+ <script>
+ public String getText() {
+ return grandChild.getText();
+ }
+
+
+ public void setText(String Text) {
+ grandChild.setText(Text);
+ }
+
+
+ public Color getForeground() {
+ if (grandChild != null)
+ return grandChild.getForeground();
+ else
+ return Color.BLACK;
+ }
+
+
+ public void setForeground(Color foreground) {
+ if (grandChild != null)
+ grandChild.setForeground(foreground);
+ }
+ </script>
+
+ <GrandChildButton id='grandChild'/>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChild.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChildButton.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests/GrandChildButton.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChildButton.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChildButton.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JButton/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/GrandChildButton.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Pseudoclasses.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests/Pseudoclasses.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Pseudoclasses.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Pseudoclasses.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,99 @@
+<JPanel layout='{new GridLayout(0, 2, 6, 6)}'>
+ <!-- each checkbox has both its own test and all of the ones that came before in order
+ to make sure that all of the pseudoclass overrides works properly - only the last
+ pair should have any effect -->
+ <style>
+ #test1:enabled { text: "Enabled"; }
+ #test1:disabled { text: "Disabled"; }
+
+ #test2:enabled { text: "Enabled"; }
+ #test2:disabled { text: "Disabled"; }
+ #test2:focused { text: "Focused"; }
+ #test2:unfocused { text: "Unfocused"; }
+
+ #test3:enabled { text: "Enabled"; }
+ #test3:disabled { text: "Disabled"; }
+ #test3:focused { text: "Focused"; }
+ #test3:unfocused { text: "Unfocused"; }
+ #test3:selected { text: "Selected"; }
+ #test3:deselected { text: "Deselected"; }
+
+ #test4:enabled { text: "Enabled"; }
+ #test4:disabled { text: "Disabled"; }
+ #test4:focused { text: "Focused"; }
+ #test4:unfocused { text: "Unfocused"; }
+ #test4:selected { text: "Selected"; }
+ #test4:deselected { text: "Deselected"; }
+ #test4:mouseover { text: "Mouseover"; }
+ #test4:mouseout { text: "Mouseout"; }
+
+ #test5:enabled { text: "Enabled"; }
+ #test5:disabled { text: "Disabled"; }
+ #test5:focused { text: "Focused"; }
+ #test5:unfocused { text: "Unfocused"; }
+ #test5:selected { text: "Selected"; }
+ #test5:deselected { text: "Deselected"; }
+ #test5:mouseover { text: "Mouseover"; }
+ #test5:mouseout { text: "Mouseout"; }
+ #test5:mousedown { text: "Mousedown"; }
+ #test5:mouseup { text: "Mouseup"; }
+
+ #test6:{object.isSelected()} { text: "Selected"; }
+
+ #test7:selected { text: { "you shouldn't see this".toUpperCase() } }
+ #test7:selected { text: { currentTime }; }
+
+ #test8:mouseover { text: { test8Field.getText() }; }
+ </style>
+
+ <script>
+ import java.text.*;
+ import javax.swing.Timer;
+
+ DateFormat dateFormat = DateFormat.getTimeInstance();
+ String currentTime = dateFormat.format(new Date());
+
+ Timer timer = new Timer(1000, new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ currentTime = dateFormat.format(new Date());
+ }
+ });
+
+ timer.start();
+ </script>
+
+ <JPanel border='{BorderFactory.createTitledBorder("Enabled/Disabled")}'>
+ <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test1'/>
+ </JPanel>
+
+ <JPanel border='{BorderFactory.createTitledBorder("Focused/Unfocused")}'>
+ <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test2'/>
+ </JPanel>
+
+ <JPanel border='{BorderFactory.createTitledBorder("Selected/Deselected")}'>
+ <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test3'/>
+ </JPanel>
+
+ <JPanel border='{BorderFactory.createTitledBorder("Mouseover/Mouseout")}'>
+ <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test4'/>
+ </JPanel>
+
+ <JPanel border='{BorderFactory.createTitledBorder("Mouseup/Mousedown")}'>
+ <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test5'/>
+ </JPanel>
+
+ <JPanel border='{BorderFactory.createTitledBorder("Programmatic Selected")}'>
+ <JCheckBox text='Unselected' enabled='{enabledCB.isSelected()}' id='test6'/>
+ </JPanel>
+
+ <JPanel border='{BorderFactory.createTitledBorder("Pseudoclass Data Binding")}'>
+ <JCheckBox text='Select to see current time' enabled='{enabledCB.isSelected()}' id='test7'/>
+ </JPanel>
+
+ <VBox border='{BorderFactory.createTitledBorder("Pseudoclass Proxy Data Binding")}'>
+ <JCheckBox text='Mouse over to see the below text' enabled='{enabledCB.isSelected()}' id='test8'/>
+ <JTextField id='test8Field'/>
+ </VBox>
+
+ <JCheckBox text='Enable checkboxes' id='enabledCB' selected='true'/>
+</JPanel>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/Pseudoclasses.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/SimpleCSS.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests/SimpleCSS.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/SimpleCSS.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/SimpleCSS.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,29 @@
+<VBox>
+ <JPanel layout='{new GridLayout(0, 1, 6, 6)}'>
+ <style>
+ JPanel { border: {null}; font-size: 18; }
+
+ JButton { foreground: red }
+ JButton.green { foreground: green; }
+ AbstractButton.blue { foreground: blue }
+ .blue { foreground: white; }
+ #B4:enabled { foreground: { Color.orange } }
+ .yellow { foreground: yellow; }
+ #child.idTest { foreground: white }
+ #B7:{true} { foreground: cyan; }
+ #B8 { foreground: black }
+ #B8.yellow { foreground: { new Color(0, 0, 0) } }
+ </style>
+
+ <JButton id='B1' text='Red'/>
+ <JButton id='B2' text='Green' styleClass='green'/>
+ <JButton id='B3' text='Blue' styleClass='blue'/>
+ <GrandChild id='B4' text='Orange'/>
+ <Child id='B5' text='Yellow'/>
+ <Child id='B6' text='White' styleClass='idTest'/>
+ <Child id='B7' text='Cyan'/>
+ <Child2 id='B8' text='Pink' styleClass='yellow'/>
+ <Child2 id='B9' text='Purple' foreground='#aa20ff'/>
+ <GrandChild text='Red'/>
+ </JPanel>
+</VBox>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests/SimpleCSS.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <i18nable>false</i18nable>
+ <includes>
+ <value>**/CompilerTest/CSSTests/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/CSSTests.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ClassReferences.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences/ClassReferences.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ClassReferences.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ClassReferences.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,18 @@
+<Application>
+ <script>
+ Object ref1 = new ConstructorReferenceTest();
+ box.add(new JLabel(ref1.toString()));
+
+ TypeReference ref2; // this line only compiles if TypeReference.jaxx gets compiled due to this reference
+ box.add(new JLabel("Type reference worked"));
+
+ box.add(new JLabel(StaticMethodTest.getText()));
+ </script>
+
+ <VBox id='box'>
+ <!-- TODO Ce cas ne fonctionne plus (il faut posséder cette classe compilée ? -->
+ <!--ClassTest customProperty='Compiled class file worked'/-->
+ <JAXXTest customProperty='Uncompiled JAXX file worked'/>
+ <JavaTaist customProperty='Uncompiled Java file worked'/>
+ </VBox>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ClassReferences.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ConstructorReferenceTest.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences/ConstructorReferenceTest.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ConstructorReferenceTest.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ConstructorReferenceTest.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,7 @@
+<Object>
+ <script>
+ public String toString() {
+ return "Constructor reference worked";
+ }
+ </script>
+</Object>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/ConstructorReferenceTest.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXReferenceTest.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences/JAXXReferenceTest.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXReferenceTest.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXReferenceTest.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,7 @@
+<JLabel>
+ <script>
+ public void setCustomProperty(String label) {
+ setText(label);
+ }
+ </script>
+</JLabel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXReferenceTest.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXTest.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences/JAXXTest.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXTest.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXTest.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,7 @@
+<JLabel>
+ <script>
+ public void setCustomProperty(String label) {
+ setText(label);
+ }
+ </script>
+</JLabel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JAXXTest.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JavaTaist.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences/JavaTaist.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JavaTaist.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JavaTaist.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,9 @@
+package testcases.ClassReferences;
+
+import javax.swing.*;
+
+public class JavaTaist extends JLabel {
+ public void setCustomProperty(String label) {
+ setText(label);
+ }
+}
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/JavaTaist.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/StaticMethodTest.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences/StaticMethodTest.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/StaticMethodTest.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/StaticMethodTest.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,7 @@
+<Object>
+ <script>
+ public static String getText() {
+ return "Static method reference worked";
+ }
+ </script>
+</Object>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/StaticMethodTest.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/TypeReference.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences/TypeReference.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/TypeReference.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/TypeReference.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<Object/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences/TypeReference.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/CompilerTest/ClassReferences/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClassReferences.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClientProperty.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ClientProperty.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClientProperty.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClientProperty.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <addLogger>false</addLogger>
+ <includes>
+ <value>**/CompilerTest/clientProperty/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ClientProperty.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ErrorJaxxContextImplementorClass.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/ErrorJaxxContextImplementorClass.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <jaxxContextImplementorClass>java.lang.String</jaxxContextImplementorClass>
+ <force>true</force>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Errors.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Errors.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Errors.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/CompilerTest/errors/*.jaxx</value>
+ </includes>
+ <excludes>
+ <value>**/CompilerTest/validator/errors/*.jaxx</value>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Errors.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Force.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Force.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Force.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Force.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/CompilerTest/force/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Force.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Icon.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Icon.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Icon.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Icon.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <i18nable>false</i18nable>
+ <force>true</force>
+ <verbose>true</verbose>
+ <resetAfterCompile>true</resetAfterCompile>
+ <includes>
+ <value>**/CompilerTest/icon/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers/Initializers.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Initializers/Initializers.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers/Initializers.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers/Initializers.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,37 @@
+<Application>
+ <script>
+ private static String staticInitializerText = "Static initializer FAILED";
+
+ static {
+ staticInitializerText = "Static initializer worked!";
+ }
+
+ { initializerTest.setText("Initializer worked!"); }
+
+ public Initializers(String label) {
+ this(1, "Custom constructor test 2 worked!");
+ constructorTest1.setText(label);
+ }
+
+
+ public Initializers(int dummy, String label) {
+ super("Test 3 worked! "+dummy);
+ constructorTest2.setText(label);
+ }
+
+
+ public static void main(String[] arg) { // test custom main method
+ Initializers test = new Initializers("Custom constructor test 1 worked!");
+ test.mainTest.setText("Custom main method worked!");
+ test.setVisible(true);
+ }
+ </script>
+
+ <VBox>
+ <JLabel id='mainTest' text='Custom main method FAILED'/>
+ <JLabel id='constructorTest1' text='Custom constructor TEST 1 FAILED'/>
+ <JLabel id='constructorTest2' text='Custom constructor TEST 2 FAILED'/>
+ <JLabel id='initializerTest' text='Initializer FAILED'/>
+ <JLabel id='staticInitializerTest' text='{Initializers.staticInitializerText}'/>
+ </VBox>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers/Initializers.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Initializers.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/CompilerTest/Initializers/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Initializers.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses/InnerClasses.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/InnerClasses/InnerClasses.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses/InnerClasses.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses/InnerClasses.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,17 @@
+<Application>
+ <JMenuBar>
+ <JMenu text='Test'>
+ <JMenuItem text='1'/>
+ <JPopupMenu.Separator/>
+ <JMenuItem text='2'/>
+ <javax.swing.JPopupMenu.Separator/>
+ <JMenuItem text='3'/>
+ <JPopupMenu.Separator xmlns="javax.swing.*"/>
+ <JMenuItem text='4'/>
+ <swing:JPopupMenu.Separator xmlns:swing="javax.swing.*"/>
+ <JMenuItem text='5'/>
+ <swing:javax.swing.JPopupMenu.Separator xmlns:swing="javax.swing.*"/>
+ <JMenuItem text='6'/>
+ </JMenu>
+ </JMenuBar>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses/InnerClasses.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/InnerClasses.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/CompilerTest/InnerClasses/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/InnerClasses.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/NoLog.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/NoLog.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/NoLog.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/NoLog.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <addLogger>false</addLogger>
+ <includes>
+ <value>**/CompilerTest/log/nolog/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/NoLog.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/CurrentTime.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/OverridingDataBindings/CurrentTime.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/CurrentTime.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/CurrentTime.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,17 @@
+<JLabel text='{currentTime}' foreground='blue'>
+ <script>
+ import java.text.*;
+ import javax.swing.Timer;
+
+ DateFormat dateFormat = DateFormat.getTimeInstance();
+ String currentTime = dateFormat.format(new Date());
+
+ Timer timer = new Timer(1000, new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ currentTime = dateFormat.format(new Date());
+ }
+ });
+
+ timer.start();
+ </script>
+</JLabel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/CurrentTime.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverriddenCurrentTime.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/OverridingDataBindings/OverriddenCurrentTime.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverriddenCurrentTime.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverriddenCurrentTime.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<CurrentTime text='Parent Working'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverriddenCurrentTime.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverridingDataBindings.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/OverridingDataBindings/OverridingDataBindings.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverridingDataBindings.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverridingDataBindings.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,12 @@
+<Application>
+ <VBox>
+ <JLabel text='The text below should display the time'/>
+ <CurrentTime/>
+
+ <JLabel text='The text below should read "Child Working"'/>
+ <CurrentTime text='Child Working'/>
+
+ <JLabel text='The text below should read "Parent Working"'/>
+ <OverriddenCurrentTime/>
+ </VBox>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings/OverridingDataBindings.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/OverridingDataBindings.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/CompilerTest/OverridingDataBindings/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/OverridingDataBindings.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script/JScriptInitializer.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Script/JScriptInitializer.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script/JScriptInitializer.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script/JScriptInitializer.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,19 @@
+<JDialog>
+ <script>
+ protected boolean value
+ </script>
+ <script>
+ value=false
+ </script>
+
+ <script>
+ value=getOk();
+
+ public boolean getOk() {
+ return true;
+ }
+ </script>
+ <VBox>
+ <JButton text='close' onActionPerformed="dispose()"/>
+ </VBox>
+</JDialog>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script/JScriptInitializer.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Script.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/CompilerTest/Script/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/Script.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest1.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing/JComboBoxTest1.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest1.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest1.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JComboBox>
+ <item value='Working' selected='true'/>
+</JComboBox>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest1.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing/JComboBoxTest2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JComboBox>
+ <item value='Failed!'/>
+</JComboBox>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JComboBoxTest2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest1.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing/JListTest1.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest1.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest1.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JList>
+ <item value='Working' selected='true'/>
+</JList>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest1.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing/JListTest2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JList>
+ <item value='Failed!'/>
+</JList>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JListTest2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest1.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing/JTreeTest1.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest1.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest1.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JTree>
+ <item value='Working' selected='true'/>
+</JTree>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest1.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing/JTreeTest2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JTree>
+ <item value='Failed!'/>
+</JTree>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/JTreeTest2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/SpecialSubclassing.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing/SpecialSubclassing.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/SpecialSubclassing.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/SpecialSubclassing.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,26 @@
+<Application title='Special Subclassing'>
+ <VBox>
+ <JComboBoxTest1/>
+ <JComboBoxTest2>
+ <item value='Working' selected='true'/>
+ </JComboBoxTest2>
+
+ <JScrollPane>
+ <JListTest1/>
+ </JScrollPane>
+ <JScrollPane>
+ <JListTest2>
+ <item value='Working' selected='true'/>
+ </JListTest2>
+ </JScrollPane>
+
+ <JScrollPane width='80' height='80'>
+ <JTreeTest1/>
+ </JScrollPane>
+ <JScrollPane width='80' height='80'>
+ <JTreeTest2>
+ <item value='Working' selected='true'/>
+ </JTreeTest2>
+ </JScrollPane>
+ </VBox>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing/SpecialSubclassing.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/CompilerTest/SpecialSubclassing/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/SpecialSubclassing.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/WithLog.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/WithLog.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/WithLog.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/WithLog.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <addLogger>true</addLogger>
+ <includes>
+ <value>**/CompilerTest/log/withlog/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/clientProperty/TestOne.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/clientProperty/TestOne.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/clientProperty/TestOne.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/clientProperty/TestOne.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JPanel id='root'>
+ <JButton id='boxedButton' _testOne='"oneTest"' _testTwo='{"anotherTest"}'/>
+</JPanel>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/clientProperty/TestOne.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/AmbiguousName.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/AmbiguousName.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/AmbiguousName.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/AmbiguousName.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,10 @@
+<JPanel>
+ <script>
+ import java.awt.*;
+ import java.sql.*;
+ import java.util.*;
+ </script>
+
+ <List/>
+ <Date/>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/AmbiguousName.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/BadTypeConversions.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/BadTypeConversions.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/BadTypeConversions.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/BadTypeConversions.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<JButton opaque='yellow'
+ margin='42, 1, 7'
+ mnemonic='AX'
+ border='true'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/BadTypeConversions.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/CellOutsideOfRow.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/CellOutsideOfRow.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/CellOutsideOfRow.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/CellOutsideOfRow.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<JPanel>
+ <cell><JButton/></cell>
+
+ <cell><JLabel/></cell>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/CellOutsideOfRow.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ChildrenInNonContainer.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ChildrenInNonContainer.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ChildrenInNonContainer.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ChildrenInNonContainer.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<JButton>
+ <JPanel/>
+ <JMenuBar/>
+</JButton>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ChildrenInNonContainer.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ClassNotFound.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ClassNotFound.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ClassNotFound.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ClassNotFound.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Frame>
+ <Glob/>
+</Frame>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ClassNotFound.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConflictingPackages.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ConflictingPackages.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConflictingPackages.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConflictingPackages.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<awt:javax.swing.JFrame xmlns:awt='java.awt.*'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConflictingPackages.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConstraintsParseError.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ConstraintsParseError.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConstraintsParseError.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConstraintsParseError.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+ <JLabel constraints='BorderLayout*%NORTH'/>
+ <JButton constraints='BorderLayout.SOUTH'/>
+ <JTabbedPane constraints='BorderLayout(CENTER'/>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ConstraintsParseError.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DataBindingParseError.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/DataBindingParseError.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DataBindingParseError.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DataBindingParseError.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,6 @@
+<JPanel>
+ <JButton text='{"Missing right brace"'/>
+ <JLabel text='{Math.PI + Math.E ~= Math.PIE}'/>
+ <JToolBar visible='{I like pie}'/>
+ <JButton text='{"This should compile"}}'/>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DataBindingParseError.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DuplicateIDs.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/DuplicateIDs.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DuplicateIDs.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DuplicateIDs.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<JPanel id='duplicate'>
+ <JPanel id='duplicate'/>
+ <JColorChooser id='duplicate'/>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/DuplicateIDs.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/EventHandlerParseError.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/EventHandlerParseError.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/EventHandlerParseError.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/EventHandlerParseError.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<JPanel>
+ <JButton onActionPerformed='!*'/>
+ <JPanel onMouseEntered='{System.out.println("Remember kids, only use curly braces where appropriate!")}'/>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/EventHandlerParseError.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidID.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/InvalidID.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidID.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidID.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Application id='1'>
+ <JButton id='Hello-'/>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidID.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidRootTag.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/InvalidRootTag.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidRootTag.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidRootTag.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<style source='test.css'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidRootTag.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidXML.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/InvalidXML.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidXML.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidXML.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<begin>
+ <valid/>
+ <so.is.this/>
+</end>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/InvalidXML.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemDuplicateValues.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ItemDuplicateValues.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemDuplicateValues.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemDuplicateValues.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,8 @@
+<JList>
+ <item value='1'/>
+ <item value='2'/>
+ <item value='2'/>
+ <item value='3'/>
+ <item value='3'/>
+ <item value='3'/>
+</JList>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemDuplicateValues.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemNoValue.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ItemNoValue.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemNoValue.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemNoValue.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<JList>
+ <item label='This item doesn&t have a value'/>
+ <item label='Neither does this one'/>
+</JList>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ItemNoValue.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/MixedContent.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/MixedContent.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/MixedContent.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/MixedContent.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,19 @@
+<JPanel>
+ mixed1
+
+ <Table>
+ <row>
+ mixed2
+
+ <cell>mixed3</cell>
+ </row>
+ </Table>
+
+ <JList>
+ <item>mixed4</item>
+ </JList>
+
+ <JTabbedPane>
+ <tab>mixed5</tab>
+ </JTabbedPane>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/MixedContent.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowOutsideOfTable.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/RowOutsideOfTable.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowOutsideOfTable.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowOutsideOfTable.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,9 @@
+<JPanel>
+ <row>
+ <cell><JButton/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel/></cell>
+ </row>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowOutsideOfTable.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowWrongChild.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/RowWrongChild.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowWrongChild.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowWrongChild.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,9 @@
+<Table>
+ <row>
+ <JPanel/>
+ </row>
+
+ <row>
+ <JScrollPane/>
+ </row>
+</Table>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/RowWrongChild.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptNotFound.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ScriptNotFound.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptNotFound.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptNotFound.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<script source='notfound.script'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptNotFound.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptParseError.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ScriptParseError.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptParseError.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptParseError.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,6 @@
+<JFileChooser>
+ <script>
+ System.err.println("this is a valid line");
+ System.err.println("this is an unclosed string literal);
+ </script>
+</JFileChooser>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptParseError.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptSourceAndInline.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/ScriptSourceAndInline.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptSourceAndInline.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptSourceAndInline.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<script source='dependencies/test.script'>
+ System.err.println("This should not compile");
+</script>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/ScriptSourceAndInline.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleNotFound.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/StyleNotFound.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleNotFound.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleNotFound.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<style source='notfound.css'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleNotFound.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleParseError.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/StyleParseError.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleParseError.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleParseError.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,9 @@
+<JFileChooser>
+ <style>
+ JButton {
+ foreground: blue;
+ label: "Parse error on next line";
+ *: false;
+ }
+ </style>
+</JFileChooser>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleParseError.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleSourceAndInline.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/StyleSourceAndInline.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleSourceAndInline.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleSourceAndInline.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<style source='dependencies/test.css'>
+ JLabel { text: "this should not compile" }
+</style>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/StyleSourceAndInline.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabOutsideOfTabbedPane.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/TabOutsideOfTabbedPane.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabOutsideOfTabbedPane.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabOutsideOfTabbedPane.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,9 @@
+<JPanel>
+ <tab>
+ <JButton/>
+ </tab>
+
+ <tab>
+ <JLabel/>
+ </tab>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabOutsideOfTabbedPane.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabbedPaneWrongChild.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/TabbedPaneWrongChild.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabbedPaneWrongChild.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabbedPaneWrongChild.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,6 @@
+<Application>
+ <JTabbedPane>
+ <JPanel/>
+ <JScrollPane/>
+ </JTabbedPane>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TabbedPaneWrongChild.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TableWrongChild.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/TableWrongChild.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TableWrongChild.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TableWrongChild.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,6 @@
+<Application>
+ <Table>
+ <JPanel/>
+ <JScrollPane/>
+ </Table>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TableWrongChild.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyCellChildren.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/TooManyCellChildren.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyCellChildren.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyCellChildren.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,15 @@
+<Application>
+ <Table>
+ <row>
+ <cell>
+ <JButton/>
+ <JButton/>
+ </cell>
+
+ <cell>
+ <JPanel/>
+ <JToolBar/>
+ </cell>
+ </row>
+ </Table>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyCellChildren.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyScrollPaneChildren.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/TooManyScrollPaneChildren.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyScrollPaneChildren.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyScrollPaneChildren.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<JScrollPane>
+ <JButton/>
+ <JToolBar/>
+ <JPanel/>
+</JScrollPane>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyScrollPaneChildren.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManySplitPaneChildren.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/TooManySplitPaneChildren.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManySplitPaneChildren.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManySplitPaneChildren.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,7 @@
+<Application>
+ <JSplitPane>
+ <JButton text='one'/>
+ <JButton text='two'/>
+ <JButton text='three'/>
+ </JSplitPane>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManySplitPaneChildren.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyTabChildren.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/TooManyTabChildren.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyTabChildren.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyTabChildren.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,13 @@
+<Application>
+ <JTabbedPane>
+ <tab>
+ <JButton/>
+ <JButton/>
+ </tab>
+
+ <tab>
+ <JPanel/>
+ <JToolBar/>
+ </tab>
+ </JTabbedPane>
+</Application>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/TooManyTabChildren.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedAttribute.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/UnsupportedAttribute.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedAttribute.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedAttribute.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JPanel widgetCount='7'>
+ <JLabel mnemonic='A'/>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedAttribute.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedEvent.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/UnsupportedEvent.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedEvent.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedEvent.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JPanel onWink='7'>
+ <JLabel onWonLottery='A'/>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedEvent.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedPseudoclass.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/UnsupportedPseudoclass.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedPseudoclass.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedPseudoclass.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<JButton>
+ <style>
+ :opaque { enabled: false; }
+ </style>
+</JButton>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/UnsupportedPseudoclass.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.css (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/dependencies/test.css)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.css (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.css 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+JLabel { text: "This should not compile" }
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.css
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.script (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/errors/dependencies/test.script)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.script (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.script 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+System.err.println("This should not compile.");
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/errors/dependencies/test.script
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/force/JButton.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/force/JButton.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/force/JButton.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/force/JButton.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<javax.swing.JButton id='testId' text='test.text'/>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/icon/Test1.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/icon/Test1.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/icon/Test1.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/icon/Test1.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<JPanel>
+ <JLabel icon='myIcon.png'/>
+ <JLabel actionIcon='myActionIcon.png'/>
+</JPanel>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/icon/Test1.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLog.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLog.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLog.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLog.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JButton id='testId' text='test.text'/>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLogSon.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLogSon.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLogSon.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLogSon.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<NoLog id='testId' text='test.text'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/nolog/NoLogSon.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/NoLog.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/NoLog.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/NoLog.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/NoLog.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<WithLog id='testId' text='test.text'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/NoLog.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/WithLog.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/WithLog.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/WithLog.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/WithLog.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JButton id='testId' text='test.text'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerTest/log/withlog/WithLog.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorErrors.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorErrors.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorErrors.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorErrors.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <verbose>true</verbose>
+ <includes>
+ <value>**/CompilerValidatorTest/validator/errors/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorOk.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorOk.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorOk.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorOk.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <verbose>true</verbose>
+ <includes>
+ <value>**/CompilerValidatorTest/validator/ok/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/ValidatorOk.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/AutoFieldComponentNotFound.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/AutoFieldComponentNotFound.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/AutoFieldComponentNotFound.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/AutoFieldComponentNotFound.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+ <BeanValidator beanClass="org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model" autoField='true' strictMode='true'/>
+ <JTextField id='text'/>
+ <JTextField id='text2'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/AutoFieldComponentNotFound.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Application>
+ <BeanValidator bean='model' errorListModel='errors' bean='yo'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+ <Model id='model'/>
+ <BeanValidator bean='model'/>
+ <BeanValidator bean='model'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedBean2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorListModel.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedErrorListModel.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorListModel.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorListModel.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<Application>
+ <jaxx.runtime.validator.swing.SwingValidatorMessageListModel id='errors'/>
+ <BeanValidator beanClass='org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model' errorListModel='errors' errorListModel='fake'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorListModel.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorTableModel.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedErrorTableModel.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorTableModel.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedErrorTableModel.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,4 @@
+<Application>
+ <jaxx.runtime.validator.swing.SwingValidatorMessageListModel id='errors'/>
+ <BeanValidator beanClass='org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model' errorTableModel='errors' errorTableModel='fake'/>
+</Application>
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedFieldInSameValidator.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInSameValidator.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedFieldInSameValidator.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedFieldInSameValidator.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,7 @@
+<Application>
+ <BeanValidator beanClass="org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model">
+ <field name="text"/>
+ <field name="text"/>
+ </BeanValidator>
+ <JTextField id='text'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/DuplicatedFieldInSameValidator.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldBeanPropertyNotFound.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldBeanPropertyNotFound.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldBeanPropertyNotFound.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldBeanPropertyNotFound.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+ <BeanValidator beanClass="org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model">
+ <field name="fake"/>
+ </BeanValidator>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldBeanPropertyNotFound.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentDuplicated.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentDuplicated.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentDuplicated.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,7 @@
+<Application>
+ <BeanValidator beanClass="org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model">
+ <field name="text2" component="text"/>
+ <field name="text" component="text"/>
+ </BeanValidator>
+ <JTextField id='text'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentDuplicated.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+ <BeanValidator beanClass="org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model">
+ <field name="text" component="fake"/>
+ </BeanValidator>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+ <BeanValidator beanClass="org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model">
+ <field name="fake"/>
+ </BeanValidator>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldComponentNotFound2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+ <BeanValidator beanClass="org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model">
+ <field/>
+ </BeanValidator>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+ <BeanValidator beanClass="org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model">
+ <field component="text"/>
+ </BeanValidator>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/FieldNoName2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/Model.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/Model.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/Model.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/Model.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,66 @@
+package org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors;
+
+import java.beans.*;
+
+public class Model {
+
+ protected String text = "text";
+
+ protected String text2 = "text2";
+
+ protected int ratio = 51;
+
+
+ PropertyChangeSupport p;
+
+ public Model() {
+ p = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ p.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ p.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+ public String getText() {
+ return text;
+ }
+
+ public String getText2() {
+ return text2;
+ }
+
+ public int getRatio() {
+ return ratio;
+ }
+
+ public void setText(String text) {
+ String oldText = this.text;
+ this.text = text;
+ p.firePropertyChange("text", oldText, text);
+ }
+
+ public void setText2(String text2) {
+ String oldText2 = this.text2;
+ this.text2 = text2;
+ p.firePropertyChange("text2", oldText2, text2);
+ }
+
+ public void setRatio(int ratio) {
+ int oldRatio = this.ratio;
+ this.ratio = ratio;
+ p.firePropertyChange("ratio",oldRatio, ratio);
+ }
+}
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/Model.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/NoBean.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/NoBean.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/NoBean.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/NoBean.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<Application>
+
+ <BeanValidator id='validator'/>
+
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/NoBean.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundBean.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundBean.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundBean.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundBean.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Application>
+ <BeanValidator bean='fake'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundBean.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorList.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorList.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorList.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Application>
+ <BeanValidator beanClass='org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model' errorList='fake'/>
+</Application>
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorListModel.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorListModel.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorListModel.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Application>
+ <BeanValidator beanClass='org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model' errorListModel='fake'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorListModel.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorTable.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorTable.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorTable.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorTable.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Application>
+ <BeanValidator beanClass='org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model' errorTable='fake'/>
+</Application>
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorTableModel.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorTableModel.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorTableModel.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundErrorTableModel.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Application>
+ <BeanValidator bean='org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model' errorTableModel='fake'/>
+</Application>
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundParentValidator.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundParentValidator.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundParentValidator.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundParentValidator.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<Application>
+ <BeanValidator beanClass='org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.errors.Model' parentValidator='fake'/>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/errors/UnfoundParentValidator.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Identity.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Identity.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Identity.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Identity.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,79 @@
+package org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.ok;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+
+public class Identity {
+
+ protected String firstName = "";
+
+ protected String lastName = "";
+
+ protected String email = "dummy(a)codelutin.com";
+
+ protected int age = 51;
+
+
+ PropertyChangeSupport p;
+
+ public Identity() {
+ p = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ p.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ p.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setFirstName(String firstName) {
+ String oldFirstName = this.firstName;
+ this.firstName = firstName;
+ p.firePropertyChange("firstName", oldFirstName, firstName);
+ }
+
+ public void setLastName(String lastName) {
+ String oldLastName = this.lastName;
+ this.lastName = lastName;
+ p.firePropertyChange("lastName", oldLastName, lastName);
+ }
+
+ public void setEmail(String email) {
+ String oldEmail =this.email;
+ this.email = email;
+ p.firePropertyChange("email", oldEmail, email);
+ }
+
+ public void setAge(int age) {
+ int oldAge = this.age;
+ this.age = age;
+ p.firePropertyChange("age", oldAge, age);
+ }
+}
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Identity.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Model.java (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Model.java)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Model.java (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Model.java 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,66 @@
+package org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.ok;
+
+import java.beans.*;
+
+public class Model {
+
+ protected String text = "text";
+
+ protected String text2 = "text2";
+
+ protected int ratio = 51;
+
+
+ PropertyChangeSupport p;
+
+ public Model() {
+ p = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ p.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ p.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+ public String getText() {
+ return text;
+ }
+
+ public String getText2() {
+ return text2;
+ }
+
+ public int getRatio() {
+ return ratio;
+ }
+
+ public void setText(String text) {
+ String oldText = this.text;
+ this.text = text;
+ p.firePropertyChange("text", oldText, text);
+ }
+
+ public void setText2(String text2) {
+ String oldText2 = this.text2;
+ this.text2 = text2;
+ p.firePropertyChange("text2", oldText2, text2);
+ }
+
+ public void setRatio(int ratio) {
+ int oldRatio = this.ratio;
+ this.ratio = ratio;
+ p.firePropertyChange("ratio",oldRatio, ratio);
+ }
+}
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Model.java
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Validation.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Validation.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Validation.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Validation.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,274 @@
+<Application title="Validation.jaxx">
+
+ <!-- models -->
+ <Model id='model'/>
+ <Model id='model2'/>
+ <Identity id='identity'/>
+
+ <!-- errors model -->
+ <jaxx.runtime.validator.swing.SwingValidatorMessageListModel id='errors'
+ onContentsChanged='ok.setEnabled(errors.size()==0)'/>
+
+ <!-- validators -->
+ <BeanValidator id='validator' bean='model' errorListModel='errors'>
+ <field name="text"/>
+ <field name="text2"/>
+ <field name="ratio"/>
+ </BeanValidator>
+ <BeanValidator id='validator2' bean='model2' errorListModel='errors'
+ uiClass="jaxx.runtime.validator.swing.ui.IconValidationUI">
+ <field name="text" component="_text"/>
+ <field name="text2" component="_text2"/>
+ <field name="ratio" component="_ratio"/>
+ </BeanValidator>
+ <BeanValidator id='validator3' autoField='true' bean='identity' errorListModel='errors'
+ uiClass="jaxx.runtime.validator.swing.ui.TranslucentValidationUI">
+ <field name="email" component="email2"/>
+ </BeanValidator>
+
+ <Table fill='both'>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Form")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='Text:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='text' text='{model.getText()}'
+ onKeyReleased='model.setText(text.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Text2:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='text2' text='{model.getText2()}'
+ onKeyReleased='model.setText2(text2.getText())'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Ratio:'/>
+ </cell>
+ <cell>
+ <JSlider id='ratio' minimum='0' maximum='100' value='{model.getRatio()}'
+ onStateChanged='model.setRatio(ratio.getValue())'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Model")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='Text:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{model.getText()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Text2:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{model.getText2()}'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Ratio:'/>
+ </cell>
+ <cell>
+ <JLabel text='{model.getRatio()}'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Form2")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='Text:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='_text' text='{model2.getText()}'
+ onKeyReleased='model2.setText(_text.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Text2:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='_text2' text='{model2.getText2()}'
+ onKeyReleased='model2.setText2(_text2.getText())'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Ratio:'/>
+ </cell>
+ <cell>
+ <JSlider id='_ratio' minimum='0' maximum='100' value='{model2.getRatio()}'
+ onStateChanged='model2.setRatio(_ratio.getValue())'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Model2")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='Text:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{model2.getText()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Text2:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{model2.getText2()}'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Ratio:'/>
+ </cell>
+ <cell>
+ <JLabel text='{model2.getRatio()}'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Identify Form")}'
+ layout='{new GridLayout()}' width='250' height='140'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='FirstName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='firstName' text='{identity.getFirstName()}'
+ onKeyReleased='identity.setFirstName(firstName.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='LastName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='lastName' text='{identity.getLastName()}'
+ onKeyReleased='identity.setLastName(lastName.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Email:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='email2' text='{identity.getEmail()}'
+ onKeyReleased='identity.setEmail(email2.getText())'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Age:'/>
+ </cell>
+ <cell>
+ <JSlider id='age' minimum='0' maximum='100' value='{identity.getAge()}'
+ onStateChanged='identity.setAge(age.getValue())'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Identity Model")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='FirstName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getFirstName()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='LastName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getLastName()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Email:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getEmail()}'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Age:'/>
+ </cell>
+ <cell>
+ <JLabel text='{identity.getAge()}'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell columns='2' fill="both">
+ <JPanel border='{BorderFactory.createTitledBorder("Errors")}' layout='{new GridLayout()}' height='200'
+ width='500'>
+ <JScrollPane>
+ <JList model='{errors}'/>
+ </JScrollPane>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell columns='2' fill="both">
+ <JPanel layout='{new GridLayout(1,2,0,0)}'>
+ <JButton text='cancel' onActionPerformed='dispose()'/>
+ <JButton id='ok' text='valid' onActionPerformed='dispose()'/>
+ </JPanel>
+ </cell>
+ </row>
+
+ </Table>
+</Application>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/Validation.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/ValidationBeanClass.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/ValidationBeanClass.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/ValidationBeanClass.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/CompilerValidatorTest/validator/ok/ValidationBeanClass.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,112 @@
+<Application title="Validation.jaxx">
+
+ <!-- models -->
+ <Identity id='identity'/>
+
+ <!-- errors model -->
+ <jaxx.runtime.validator.swing.SwingValidatorMessageListModel id='errors'/>
+
+ <!-- validators -->
+ <BeanValidator id='validator3' autoField='true' beanClass='org.nuiton.jaxx.plugin.CompilerValidatorTest.validator.ok.Identity' errorListModel='errors'>
+ <field name="email" component="email2"/>
+ </BeanValidator>
+
+ <Table fill='both'>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Identify Form")}'
+ layout='{new GridLayout()}' width='250' height='140'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='FirstName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='firstName' text='{identity.getFirstName()}'
+ onKeyReleased='identity.setFirstName(firstName.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='LastName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='lastName' text='{identity.getLastName()}'
+ onKeyReleased='identity.setLastName(lastName.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Email:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='email2' text='{identity.getEmail()}'
+ onKeyReleased='identity.setEmail(email2.getText())'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Age:'/>
+ </cell>
+ <cell>
+ <JSlider id='age' minimum='0' maximum='100' value='{identity.getAge()}'
+ onStateChanged='identity.setAge(age.getValue())'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Identity Model")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='FirstName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getFirstName()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='LastName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getLastName()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Email:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getEmail()}'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Age:'/>
+ </cell>
+ <cell>
+ <JLabel text='{identity.getAge()}'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell columns='2' fill="both">
+ <JPanel border='{BorderFactory.createTitledBorder("Errors")}' layout='{new GridLayout()}' height='200'
+ width='500'>
+ <JScrollPane>
+ <JList model='{errors}'/>
+ </JScrollPane>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+</Application>
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/BoxedDecorator.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/decorator/BoxedDecorator.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/BoxedDecorator.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/BoxedDecorator.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+<JPanel id='root'>
+ <JButton id='boxedButton' decorator='boxed'/>
+</JPanel>
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/BoxedDecorator.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/Decorator.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/Decorator.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/Decorator.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/Decorator.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <addLogger>false</addLogger>
+ <includes>
+ <value>**/DecoratorTest/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/DecoratorTest/Decorator.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nText.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nText.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nText.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nText.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/I18nTest/text/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nText.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nTitle.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nTitle.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nTitle.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nTitle.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/I18nTest/title/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nTitle.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nToolTipText.xml (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nToolTipText.xml)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nToolTipText.xml (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nToolTipText.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.nuiton.jaxx.test</groupId>
+ <artifactId>test</artifactId>
+ <version>0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/target/test-classes</src>
+ <outJava>${basedir}/target/it-generated-sources/java</outJava>
+ <outResource>${basedir}/target/it-generated-sources/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/I18nTest/tooltiptext/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/I18nToolTipText.xml
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/text/JButton.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/text/JButton.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/text/JButton.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/text/JButton.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<javax.swing.JButton id='testId' text='test.text'/>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JDialog.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/title/JDialog.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JDialog.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JDialog.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<JDialog id='testId' title='test.title'/>
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/title/JTabbedPane.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+ <JTabbedPane>
+ <tab id="testId" title='test.title'/>
+</JTabbedPane>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/title/JTabbedPane2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/title/JTabbedPane2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<JTabbedPane>
+ <tab id="testId" title='test.title'>
+ <JLabel text='testLabel'/>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JButton.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/tooltiptext/JButton.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JButton.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JButton.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1 @@
+<javax.swing.JButton id='testId' toolTipText='test.toolTipText'/>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JButton.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/tooltiptext/JTabbedPane.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+ <JTabbedPane id="testId" toolTipText='test.toolTipText'>
+ <tab title="text"/>
+</JTabbedPane>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane2.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/tooltiptext/JTabbedPane2.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane2.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane2.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,3 @@
+ <JTabbedPane>
+ <tab id="testId" toolTipText='test.toolTipText'/>
+</JTabbedPane>
\ No newline at end of file
Property changes on: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane2.jaxx
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane3.jaxx (from rev 1534, trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/tooltiptext/JTabbedPane3.jaxx)
===================================================================
--- trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane3.jaxx (rev 0)
+++ trunk/maven-jaxx-plugin/src/test/resources/org/nuiton/jaxx/plugin/I18nTest/tooltiptext/JTabbedPane3.jaxx 2009-09-29 14:09:17 UTC (rev 1536)
@@ -0,0 +1,5 @@
+<JTabbedPane>
+ <tab id="testId" toolTipText='test.toolTipText'>
+ <JLabel text='yo'/>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-09-29 14:07:52 UTC (rev 1535)
+++ trunk/pom.xml 2009-09-29 14:09:17 UTC (rev 1536)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom</artifactId>
- <version>1.0.2</version>
+ <version>1.0.3-SNAPSHOT</version>
</parent>
<artifactId>jaxx</artifactId>
@@ -46,6 +46,72 @@
<artifactId>maven-helper-plugin</artifactId>
<version>${helper.version}</version>
<scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-dependency-tree</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-simple</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-api</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-javamail</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-cipher</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-sec-dispatcher</artifactId>
+ </exclusion>
+
+ </exclusions>
</dependency>
<dependency>
@@ -54,6 +120,49 @@
<version>${helper.version}</version>
<scope>test</scope>
<classifier>tests</classifier>
+ <exclusions>
+
+ <exclusion>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-dependency-tree</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-simple</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-api</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-javamail</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-cipher</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-sec-dispatcher</artifactId>
+ </exclusion>
+
+ </exclusions>
</dependency>
<!-- common dependencies -->
@@ -98,14 +207,14 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven.version}</version>
- <scope>compile</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${maven.version}</version>
- <scope>compile</scope>
+ <scope>provided</scope>
</dependency>
<!-- xworks dependencies -->
@@ -143,12 +252,53 @@
</dependency>
<dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.9</version>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.6</version>
+ <version>4.7</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-testing</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ <exclusions>
+
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ </exclusion>
+
+ </exclusions>
+ </dependency>
+
</dependencies>
</dependencyManagement>
@@ -179,6 +329,9 @@
<javahelp.version>2.0.02</javahelp.version>
+ <!-- must be removed after mavenpom release, avoid hudson to break -->
+ <helper.version>1.1.0-SNAPSHOT</helper.version>
+
</properties>
<build>
1
0
29 Sep '09
Author: tchemit
Date: 2009-09-29 16:07:52 +0200 (Tue, 29 Sep 2009)
New Revision: 1535
Removed:
trunk/maven-jaxx-plugin/src/test/resources/testcases/
Log:
- use mavenpom 1.0.3, maven-helper-plugin 1.1.0, junit 4.7
- [Evolution #68] utilisation du framework mojo maven-helper-plugin
1
0
Author: tchemit
Date: 2009-09-14 15:58:28 +0200 (Mon, 14 Sep 2009)
New Revision: 1534
Modified:
trunk/jaxx-example/pom.xml
Log:
use jxlayer.version and javahelp.version properties
improve plugins configuration
Modified: trunk/jaxx-example/pom.xml
===================================================================
--- trunk/jaxx-example/pom.xml 2009-09-14 13:51:17 UTC (rev 1533)
+++ trunk/jaxx-example/pom.xml 2009-09-14 13:58:28 UTC (rev 1534)
@@ -33,7 +33,7 @@
<!-- test dependencies -->
- <dependency>
+ <dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jaxx-runtime-api</artifactId>
<version>${project.version}</version>
@@ -75,6 +75,8 @@
<jnlp.build.directory>${project.build.directory}/jnlp</jnlp.build.directory>
+ <jnlp.url>${project.url}</jnlp.url>
+ <!--<jnlp.url>file://${basedir}/target/jnlp</jnlp.url>-->
</properties>
@@ -110,6 +112,56 @@
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.nuiton.thirdparty</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <version>1.0-alpha-2-cl_20090204</version>
+ <configuration>
+ <force>false</force>
+ <dependencies>
+ <excludes>
+ <exclude>javax.help:javahelp</exclude>
+ <exclude>org.swinglabs:jxlayer</exclude>
+ </excludes>
+ </dependencies>
+ <libPath>lib</libPath>
+ <extensions>
+ <sun>sun.jnlp</sun>
+ <jxlayer>jxlayer.jnlp</jxlayer>
+ </extensions>
+ <jnlp>
+ <outputFile>launch-demo.jnlp</outputFile>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <allPermissions>true</allPermissions>
+ <offlineAllowed>true</offlineAllowed>
+ </jnlp>
+
+ <sign>
+ <keystore>${keystorepath}</keystore>
+ <keypass />
+ <storepass>${keystorepass}</storepass>
+ <storetype />
+ <alias>${keystorealias}</alias>
+ <validity />
+ <dnameCn />
+ <dnameOu />
+ <dnameO />
+ <dnameL />
+ <dnameSt />
+ <dnameC />
+ <verify>true</verify>
+ <keystoreConfig>
+ <delete>false</delete>
+ <gen>false</gen>
+ </keystoreConfig>
+ </sign>
+
+ <pack200>false</pack200>
+ <gzip>true</gzip>
+ <verbose>false</verbose>
+ </configuration>
+ </plugin>
+
</plugins>
</pluginManagement>
@@ -191,18 +243,18 @@
<mkdir dir="${jnlp.build.directory}" />
<copy file="${project.basedir}/src/main/jnlp/sun.jnlp" verbose="${maven.verbose}" todir="${jnlp.build.directory}" failonerror="false">
<filterset>
- <filter token="lib" value="javahelp-2.0.02.jar" />
- <filter token="url" value="${project.url}" />
+ <filter token="lib" value="javahelp-${javahelp.version}.jar" />
+ <filter token="url" value="${jnlp.url}" />
</filterset>
</copy>
<copy file="${project.basedir}/src/main/jnlp/jxlayer.jnlp" verbose="${maven.verbose}" todir="${jnlp.build.directory}" failonerror="false">
<filterset>
- <filter token="lib" value="jxlayer-3.0.1.jar" />
- <filter token="url" value="${project.url}" />
+ <filter token="lib" value="jxlayer-${jxlayer.version}.jar" />
+ <filter token="url" value="${jnlp.url}" />
</filterset>
</copy>
- <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar" verbose="${maven.verbose}" todir="${jnlp.build.directory}/lib" failonerror="false" />
- <copy file="${project.build.directory}/lib/jxlayer-3.0.1.jar" verbose="${maven.verbose}" todir="${jnlp.build.directory}/lib" failonerror="false" />
+ <copy file="${project.build.directory}/lib/javahelp-${javahelp.version}.jar" verbose="${maven.verbose}" todir="${jnlp.build.directory}/lib" failonerror="false" />
+ <copy file="${project.build.directory}/lib/jxlayer-${jxlayer.version}.jar" verbose="${maven.verbose}" todir="${jnlp.build.directory}/lib" failonerror="false" />
</tasks>
</configuration>
<goals>
@@ -232,7 +284,6 @@
<plugin>
<groupId>org.nuiton.thirdparty</groupId>
<artifactId>webstart-maven-plugin</artifactId>
- <version>1.0-alpha-2-cl_20090204</version>
<executions>
<execution>
<phase>package</phase>
@@ -241,50 +292,6 @@
</goals>
</execution>
</executions>
- <configuration>
- <force>false</force>
- <dependencies>
- <excludes>
- <exclude>javax.help:javahelp</exclude>
- <exclude>org.swinglabs:jxlayer</exclude>
- </excludes>
- </dependencies>
- <libPath>lib</libPath>
- <extensions>
- <sun>sun.jnlp</sun>
- <jxlayer>jxlayer.jnlp</jxlayer>
- </extensions>
- <jnlp>
- <outputFile>launch-demo.jnlp</outputFile>
- <mainClass>${maven.jar.main.class}</mainClass>
- <allPermissions>true</allPermissions>
- <offlineAllowed>true</offlineAllowed>
- </jnlp>
-
- <sign>
- <keystore>${keystorepath}</keystore>
- <keypass />
- <storepass>${keystorepass}</storepass>
- <storetype />
- <alias>${keystorealias}</alias>
- <validity />
- <dnameCn />
- <dnameOu />
- <dnameO />
- <dnameL />
- <dnameSt />
- <dnameC />
- <verify>true</verify>
- <keystoreConfig>
- <delete>false</delete>
- <gen>false</gen>
- </keystoreConfig>
- </sign>
-
- <pack200>false</pack200>
- <gzip>true</gzip>
- <verbose>false</verbose>
- </configuration>
</plugin>
</plugins>
</build>
1
0
Author: tchemit
Date: 2009-09-14 15:51:17 +0200 (Mon, 14 Sep 2009)
New Revision: 1533
Modified:
trunk/pom.xml
Log:
add jxlayer.version and javahelp.version properties
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-09-10 12:37:21 UTC (rev 1532)
+++ trunk/pom.xml 2009-09-14 13:51:17 UTC (rev 1533)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom</artifactId>
- <version>1.0.1</version>
+ <version>1.0.2</version>
</parent>
<artifactId>jaxx</artifactId>
@@ -89,7 +89,7 @@
<dependency>
<groupId>javax.help</groupId>
<artifactId>javahelp</artifactId>
- <version>2.0.02</version>
+ <version>${javahelp.version}</version>
</dependency>
<!-- maven dependencies -->
@@ -127,7 +127,7 @@
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>jxlayer</artifactId>
- <version>3.0.3</version>
+ <version>${jxlayer.version}</version>
</dependency>
<dependency>
@@ -175,6 +175,10 @@
<lutinutil.version>1.1.0</lutinutil.version>
<i18n.version>1.0.1-SNAPSHOT</i18n.version>
+ <jxlayer.version>3.0.3</jxlayer.version>
+
+ <javahelp.version>2.0.02</javahelp.version>
+
</properties>
<build>
@@ -195,7 +199,7 @@
<dependency>
<groupId>org.nuiton.jrst</groupId>
<artifactId>doxia-module-jrst</artifactId>
- <version>1.0.0</version>
+ <version>${jrst.version}</version>
</dependency>
</dependencies>
</plugin>
1
0
r1532 - trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing
by sletellier@users.nuiton.org 10 Sep '09
by sletellier@users.nuiton.org 10 Sep '09
10 Sep '09
Author: sletellier
Date: 2009-09-10 14:37:21 +0200 (Thu, 10 Sep 2009)
New Revision: 1532
Modified:
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXComboBox.java
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXList.java
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXTree.java
Log:
Adding method to use items (JAXXmodel)
Modified: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXComboBox.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXComboBox.java 2009-09-08 15:26:56 UTC (rev 1531)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXComboBox.java 2009-09-10 12:37:21 UTC (rev 1532)
@@ -88,6 +88,10 @@
}
}
+ public List<Item> getItems(){
+ return items;
+ }
+
@Override
public Object getElementAt(int i) {
return items.get(i).getValue();
@@ -221,4 +225,64 @@
setSelectedIndex(selectedIndices[0]);
}
}
+
+ public List<Item> getItems(){
+ if (getModel() instanceof JAXXComboBoxModel){
+ return ((JAXXComboBoxModel)getModel()).getItems();
+ }
+ return null;
+ }
+
+ public void setSelectedItem(Item item) {
+ super.setSelectedItem(item.getValue());
+ }
+
+ public Item getSelectedJaxxItem(){
+ Object selected = super.getSelectedItem();
+ return findItem(selected);
+ }
+
+ public Item findItem(Object value){
+ List<Item> items = getItems();
+ if (items != null){
+ for (Item i : items){
+ if (i.getValue().equals(value)){
+ return i;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void addItem(Item item){
+ List<Item> items = getItems();
+ if (items != null){
+ items.add(item);
+ setItems(items);
+ }
+ }
+
+ public void addAllItems(Collection<Item> itemsToAdd){
+ List<Item> items = getItems();
+ if (items != null){
+ items.addAll(itemsToAdd);
+ setItems(items);
+ }
+ }
+
+ public void removeItem(Item item){
+ List<Item> items = getItems();
+ if (items != null){
+ items.remove(item);
+ setItems(items);
+ }
+ }
+
+ public void removeAllItems(Collection<Item> itemsToRemove){
+ List<Item> items = getItems();
+ if (items != null){
+ items.removeAll(itemsToRemove);
+ setItems(items);
+ }
+ }
}
Modified: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXList.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXList.java 2009-09-08 15:26:56 UTC (rev 1531)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXList.java 2009-09-10 12:37:21 UTC (rev 1532)
@@ -83,6 +83,10 @@
}
}
+ public List<Item> getItems(){
+ return items;
+ }
+
@Override
public Object getElementAt(int i) {
return items.get(i).getValue();
@@ -138,10 +142,6 @@
super.fireSelectionValueChanged(firstIndex, lastIndex, isAdjusting);
}
- public void setSelectedValue(Object value) {
- super.setSelectedValue(value, true);
- }
-
public void setItems(List<Item> items) {
setModel(new JAXXListModel(items));
List<Integer> selectedIndexList = new ArrayList<Integer>();
@@ -157,7 +157,121 @@
setSelectedIndices(selectedIndices);
}
+ public List<Item> getItems(){
+ if (getModel() instanceof JAXXListModel){
+ return ((JAXXListModel)getModel()).getItems();
+ }
+ return null;
+ }
+
+ public void setSelectedValue(Object value) {
+ super.setSelectedValue(value, true);
+ }
+
/**
+ * Set the selected Objects
+ *
+ * @param values Objects must be selected in the list
+ */
+ public void setSelectedValues(Object[] values) {
+ if (values != null){
+ List<Integer> selectedIndices = new ArrayList<Integer>();
+ ListModel model = getModel();
+ for (int i = 0; i < model.getSize(); i++) {
+ Object o = model.getElementAt(i);
+ for (Object value : values) {
+ if (o.equals(value)) {
+ selectedIndices.add(i);
+ break;
+ }
+ }
+ }
+ int[] ints = new int[selectedIndices.size()];
+ for (int i = 0; i < ints.length; i++) {
+ ints[i] = selectedIndices.get(i).intValue();
+ }
+ setSelectedIndices(ints);
+ }
+ else{
+ // No selection if values is null
+ setSelectedIndex(-1);
+ }
+ }
+
+ public void setSelectedItem(Item item) {
+ super.setSelectedValue(item.getValue(), true);
+ }
+
+ public void setSelectedItems(List<Item> itemsToSelect) {
+ List<Item> items = getItems();
+ int[] indices = new int[itemsToSelect.size()];
+ int i = 0;
+ for (Item item : itemsToSelect){
+ indices[i] = items.indexOf(item);
+ i++;
+ }
+ super.setSelectedIndices(indices);
+ }
+
+ public Item getSelectedItem(){
+ Object selected = super.getSelectedValue();
+ return findItem(selected);
+ }
+
+ public List<Item> getSelectedItems(){
+ Object[] selected = super.getSelectedValues();
+ java.util.List<Item> itemsSelected = new ArrayList<Item>();
+ for (Object s : selected){
+ itemsSelected.add(findItem(s));
+ }
+ return itemsSelected;
+ }
+
+ public Item findItem(Object value){
+ List<Item> items = getItems();
+ if (items != null){
+ for (Item i : items){
+ if (i.getValue().equals(value)){
+ return i;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void addItem(Item item){
+ List<Item> items = getItems();
+ if (items != null){
+ items.add(item);
+ setItems(items);
+ }
+ }
+
+ public void addAllItems(Collection<Item> itemsToAdd){
+ List<Item> items = getItems();
+ if (items != null){
+ items.addAll(itemsToAdd);
+ setItems(items);
+ }
+ }
+
+ public void removeItem(Item item){
+ List<Item> items = getItems();
+ if (items != null){
+ items.remove(item);
+ setItems(items);
+ }
+ }
+
+ public void removeAllItems(Collection<Item> itemsToRemove){
+ List<Item> items = getItems();
+ if (items != null){
+ items.removeAll(itemsToRemove);
+ setItems(items);
+ }
+ }
+
+ /**
* Fill a list model with some datas, and select after all the given object
*
* @param data data ot inject in combo
@@ -277,33 +391,4 @@
setItems(items);
}
- /**
- * Set the selected Objects
- *
- * @param values Objects must be selected in the list
- */
- public void setSelectedValues(Object[] values) {
- if (values != null){
- List<Integer> selectedIndices = new ArrayList<Integer>();
- ListModel model = getModel();
- for (int i = 0; i < model.getSize(); i++) {
- Object o = model.getElementAt(i);
- for (Object value : values) {
- if (o.equals(value)) {
- selectedIndices.add(i);
- break;
- }
- }
- }
- int[] ints = new int[selectedIndices.size()];
- for (int i = 0; i < ints.length; i++) {
- ints[i] = selectedIndices.get(i).intValue();
- }
- setSelectedIndices(ints);
- }
- else{
- // No selection if values is null
- setSelectedIndex(-1);
- }
- }
}
Modified: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXTree.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXTree.java 2009-09-08 15:26:56 UTC (rev 1531)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXTree.java 2009-09-10 12:37:21 UTC (rev 1532)
@@ -138,6 +138,10 @@
return root.getValue();
}
+ public Item getRootItem() {
+ return root;
+ }
+
@Override
public boolean isLeaf(Object node) {
Item item = findItem(node);
@@ -226,4 +230,12 @@
TreePath selectionPath = getSelectionPath();
return selectionPath != null ? selectionPath.getLastPathComponent() : null;
}
+
+ public Item getRootItem(){
+ if (getModel() instanceof JAXXTreeModel){
+ return ((JAXXTreeModel)getModel()).getRootItem();
+ }
+ return null;
+ }
+
}
1
0
r1531 - trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing
by sletellier@users.nuiton.org 08 Sep '09
by sletellier@users.nuiton.org 08 Sep '09
08 Sep '09
Author: sletellier
Date: 2009-09-08 17:26:56 +0200 (Tue, 08 Sep 2009)
New Revision: 1531
Modified:
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/Item.java
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXTree.java
Log:
Adding usefulls methods to manipulate Items
Modified: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/Item.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/Item.java 2009-08-29 20:44:00 UTC (rev 1530)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/Item.java 2009-09-08 15:26:56 UTC (rev 1531)
@@ -135,6 +135,28 @@
}
/**
+ * Remove child node a new child node
+ *
+ * @param item to remove
+ */
+ public void removeChild(Item item) {
+ if (children != null) {
+ children.remove(item);
+ }
+ }
+
+ /**
+ * Remove all childs nodes
+ *
+ * @param list of items to remove
+ */
+ public void removeChilds(List<Item> items) {
+ if (children != null) {
+ children.removeAll(items);
+ }
+ }
+
+ /**
* Returns a list of this item's children.
*
* @return a list of all nested child nodes
@@ -156,6 +178,15 @@
return parent;
}
+ /**
+ * Set the parent of this item
+ *
+ * @return the item parent (or null)
+ */
+ public void setParent(Item parent) {
+ this.parent = parent;
+ }
+
private PropertyChangeSupport getPropertyChangeSupport() {
if (propertyChangeSupport == null) {
propertyChangeSupport = new SwingPropertyChangeSupport(this);
Modified: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXTree.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXTree.java 2009-08-29 20:44:00 UTC (rev 1530)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/JAXXTree.java 2009-09-08 15:26:56 UTC (rev 1531)
@@ -78,7 +78,7 @@
/* This is an inefficient implementation, but hand-coded tree structures are unlikely to contain
enough nodes for that to really matter. This could be sped up with caching. */
- private Item findItem(Object value) {
+ public Item findItem(Object value) {
return findItem(root, value);
}
@@ -115,6 +115,9 @@
@Override
public int getChildCount(Object parent) {
Item node = findItem(parent);
+ if (node == null){
+ return 0;
+ }
return node.getChildren().size();
}
@@ -205,6 +208,12 @@
});
}
+ public void setItem(Item items) {
+ List<Item> newItems = new ArrayList<Item>();
+ newItems.add(items);
+ setItems(newItems);
+ }
+
public void setItems(List<Item> items) {
JAXXTreeModel model = new JAXXTreeModel(items);
if (model.getRoot() != null) {
1
0