Guix-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
August 2009
- 3 participants
- 60 discussions
r1615 - in trunk: . guix-compiler guix-compiler-gwt guix-compiler-swing guix-test-gwt guix-test-swing maven-guix-gwt-archetype maven-guix-plugin maven-guix-swing-archetype
by kmorin@users.nuiton.org 27 Aug '09
by kmorin@users.nuiton.org 27 Aug '09
27 Aug '09
Author: kmorin
Date: 2009-08-27 15:46:58 +0200 (Thu, 27 Aug 2009)
New Revision: 1615
Modified:
trunk/guix-compiler-gwt/pom.xml
trunk/guix-compiler-swing/pom.xml
trunk/guix-compiler/pom.xml
trunk/guix-test-gwt/pom.xml
trunk/guix-test-swing/pom.xml
trunk/maven-guix-gwt-archetype/pom.xml
trunk/maven-guix-plugin/pom.xml
trunk/maven-guix-swing-archetype/pom.xml
trunk/pom.xml
Log:
[maven-release-plugin] prepare release guix-1.0.0
Modified: trunk/guix-compiler/pom.xml
===================================================================
--- trunk/guix-compiler/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/guix-compiler/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>guix</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</parent>
<groupId>org.nuiton.guix</groupId>
Modified: trunk/guix-compiler-gwt/pom.xml
===================================================================
--- trunk/guix-compiler-gwt/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/guix-compiler-gwt/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>guix</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</parent>
<groupId>org.nuiton.guix</groupId>
Modified: trunk/guix-compiler-swing/pom.xml
===================================================================
--- trunk/guix-compiler-swing/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/guix-compiler-swing/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>guix</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</parent>
<groupId>org.nuiton.guix</groupId>
Modified: trunk/guix-test-gwt/pom.xml
===================================================================
--- trunk/guix-test-gwt/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/guix-test-gwt/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -5,7 +5,7 @@
<parent>
<artifactId>guix</artifactId>
<groupId>org.nuiton</groupId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</parent>
<groupId>org.nuiton.guix</groupId>
Modified: trunk/guix-test-swing/pom.xml
===================================================================
--- trunk/guix-test-swing/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/guix-test-swing/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>guix</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</parent>
<groupId>org.nuiton.guix</groupId>
Modified: trunk/maven-guix-gwt-archetype/pom.xml
===================================================================
--- trunk/maven-guix-gwt-archetype/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/maven-guix-gwt-archetype/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -4,7 +4,7 @@
<parent>
<artifactId>guix</artifactId>
<groupId>org.nuiton</groupId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</parent>
<name>${artifactId}</name>
<groupId>org.nuiton.guix</groupId>
Modified: trunk/maven-guix-plugin/pom.xml
===================================================================
--- trunk/maven-guix-plugin/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/maven-guix-plugin/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>guix</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</parent>
<groupId>org.nuiton.guix</groupId>
Modified: trunk/maven-guix-swing-archetype/pom.xml
===================================================================
--- trunk/maven-guix-swing-archetype/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/maven-guix-swing-archetype/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -4,7 +4,7 @@
<parent>
<artifactId>guix</artifactId>
<groupId>org.nuiton</groupId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</parent>
<name>${artifactId}</name>
<groupId>org.nuiton.guix</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-08-27 13:43:32 UTC (rev 1614)
+++ trunk/pom.xml 2009-08-27 13:46:58 UTC (rev 1615)
@@ -13,7 +13,7 @@
</parent>
<artifactId>guix</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
<modules>
<module>guix-compiler</module>
@@ -237,9 +237,9 @@
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/guix/trunk</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/guix/trunk</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/guix/trunk</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/guix/tags/guix-1.0.0</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/guix/tags/guix-1.0.0</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/guix/tags/guix-1.0.0</url>
</scm>
</project>
1
0
Author: kmorin
Date: 2009-08-27 15:43:32 +0200 (Thu, 27 Aug 2009)
New Revision: 1614
Added:
trunk/src/site/resources/deployDiag.png
trunk/src/site/rst/codeGeneration.rst
trunk/src/site/rst/model.rst
Removed:
trunk/src/site/rst/fonctionnement.rst
Modified:
trunk/src/site/rst/architecture.rst
trunk/src/site/rst/index.rst
trunk/src/site/site.xml
Log:
update doc
Added: trunk/src/site/resources/deployDiag.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/deployDiag.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/src/site/rst/architecture.rst
===================================================================
--- trunk/src/site/rst/architecture.rst 2009-08-27 13:42:46 UTC (rev 1613)
+++ trunk/src/site/rst/architecture.rst 2009-08-27 13:43:32 UTC (rev 1614)
@@ -1,6 +1,17 @@
Architecture
------------
-Le projet comporte plusieurs sous-modules :
- * 2 modules génériques qui seront lancés quelque soit le langage généré : guix-compiler et guix-runtime.
- * 2 modules par langage générés : e.g. guix-swing-compiler et guix-swing-runtime seront appelés si le langage que l'on veut générer est du Swing.
+Le projet Guix est décomposé en 3 grandes parties comme le montre le diagramme ci-dessous :
+
+guix-compiler :
+ ce module est le même quelle que soit la librairie graphique utilisée pour la génération. Il comprend le parsing des fichiers Guix et la génération du modèle. Il contient également les classes permettant de représenter un fichier java.
+guix-generator :
+ ce module est différent selon la librairie graphique demandée par l'utilisateur. Il existe pour l'instant guix-generator-swing et guix-generator-gwt. Ces modules contiennent les gestionnaires des différentes balises communes, ainsi que les générateurs de code.
+guix-maven-plugin :
+ ce module est celui qui permet de lancer le programme en interprétant les paramètres du fichier POM.
+
+
+.. image:: deployDiag.png
+ :align: center
+
+Chaque application qui aura besoin de générer du code n'aura qu'à ajouter le module guix-maven-plugin aux dépendences du POM et y configurer le plugin.
Added: trunk/src/site/rst/codeGeneration.rst
===================================================================
--- trunk/src/site/rst/codeGeneration.rst (rev 0)
+++ trunk/src/site/rst/codeGeneration.rst 2009-08-27 13:43:32 UTC (rev 1614)
@@ -0,0 +1,107 @@
+Génération du code
+==================
+
+La génération du code est globlement la même pour toutes les librairies graphiques demandées, mais certains points diffèrent.
+
+Fichiers générés
+----------------
+Pour toutes les librairies graphiques, chaque fichier XML en entrée est généré sous trois formes :
+
+interface :
+ elle contient les méthodes que l'utilisateur peut surcharger, ainsi que les accesseurs et modifieurs
+classe abstraite :
+ elle hérite de la superclasse du GuixModelObject racine, implémente l'interface générée et contient le code généré
+classe implémentée :
+ c'est une sous-classe de la classe abstraite qui ne contient rien de plus, mais qui permet d'instancier la classe abstraite
+
+L'intérêt de cette classe d'implémentation séparée est que l'utilisateur peut créer ses propres classes d'implémentation sans riquer que son code ne soit effacé par une nouvelle génération.
+
+Les méthodes générées
+---------------------
+Les classes générées possèdent plusieurs types de méthodes :
+
+Accesseurs et Modifieurs
+~~~~~~~~~~~~~~~~~~~~~~~~
+Pour chaque GuixModelObject, Guix génère automatiquement un attribut privé et un accesseur publique. Si l'utilisateur n'a pas mis l'attribut *javaBean* à faux, un modifieur publique est également généré.
+
+Si un attribut de même identifiant existe déjà dans la superclasse et qu'il est du même type, alors ni l'attribut ni les modifieurs et accesseurs ne sont générés. En revanche, s'il est de type différent que sa classe est une superclasse de l'attribut à générer, alors on surcharge l'attribut de la superclasse.
+
+Constructeur
+~~~~~~~~~~~~
+Le constructeur ne prend aucun paramètre. Si la classe à générer hérite d'une autre classe à générer, alors on appelle le constructeur de la superclasse. Dans tous les cas, on appelle la méthode *initialize()*.
+Cette méthode appelle les quatre méthodes générées automatiquement :
+
+componentsCreation :
+ c'est la méthode qui instancie les composants
+componentsSettings :
+ c'est la méthode qui paramétrise les attributs des composants
+componentsTree :
+ c'est la méthode qui lie les composants les uns aux autres
+initDataBinding :
+ c'est la méthode qui initialise le data binding (ajoute les écouteurs sur les objets)
+
+Méthodes surchargeables
+~~~~~~~~~~~~~~~~~~~~~~~
+Il existe 5 méthodes vides par défaut, que l'utilisateur peut surcharger et qui s'effectueront chacune à un moment précis, dans cet ordre :
+beforeCreation :
+ s'exécute avant la création des composants
+beforeSettings :
+ s'exécute avant l'affectation des attributs des composants
+beforeTree :
+ s'exécute avant la mise en page des composants
+beforeBinding :
+ s'exécute avant l'application du data binding
+inTheEnd :
+ s'exécute à la fin, quand l'application est prête
+
+Pour les surcharger, il suffit qu'il les redéfinisse dans un script.
+
+
+Représentation des fichiers à générer
+-------------------------------------
+La génération de code ne se fait en écrivant directement dans un fichier, mais en utilisant des classes qui représentent les fichiers, comme le montre le diagramme ci-dessous :
+
+.. image:: file.png
+ :align: center
+
+La classe *JavaFile* représente un fichier Java (classe ou interface), *JavaField* un attribut d'une classe, *JavaMethod* une méthode d'une classe et *JavaArgument* ses arguments.
+
+Cette représentation permet de vérifier l'existence d'attributs dans des fichiers en train d'être générés.
+
+Gestion des évènements
+----------------------
+L'utilisateur peut définir les actions déclenchées par les évènements, directement dans les balises en spécifiant les valeurs des attributs dont le nom est le même que celui de l'évènement déclenché, précédé de "on" (si le nom de l'attribut ne commence pas déjà par "on"). Guix se charge tout seul au moment de la génération de chercher le listener à ajouter à l'objet grâce aux *EventSetDescriptor* contenus dans le *BeanInfo* de la classe de l'objet.
+
+Data Binding
+------------
+Derrière ce terme se cache un mécanisme très utile, celui de lier la valeur d'un attribut d'un objet, à la valeur d'un (ou plusieurs) attribut d'un (ou plusieurs) objet.
+
+L'utilisateur définit la valeur à laquelle lier un attribut en la mettant entre accolades. Le code entre accolades est analysé et les différents objets ou méthodes sont séparés.
+
+Guix cherche alors la classe et le *TagHandler* associé pour chaque élément du binding, afin de lui ajouter le bon écouteur. Cet écouteur, lorqu'un évènement est déclenché, appelle une méthode générée qui remet à jour la valeur liée.
+
+Tag Handlers
+------------
+Les tag handlers sont les classes qui permettent d'avoir les balises universelles. Ils sont différents pour chaque module de génération (i.e. pour chaque librairie graphique).
+
+Chaque module possède une classe d'initialisation qui permet d'associer un tag handler à chaque balise universelle. Ces tag handlers possèdent la classe à générer pour ces balises, ainsi que les vrais noms des attributs universels.
+
+Ils possèdent également des ProxyEventInfo : il s'agit d'une classe interne qui permet de définir des listeners particuliers pour certains attributs, mais aussi l'attribut sur lequel est appliqué ce listener. Les ProxyEventInfo sont très utiles pour le data binding. Par exemple, en Swing, si on veut lier le texte d'un JLabel au texte d'un JTextField, on n'applique pas le listener sur la méthode *getText()* mais sur la méthode *getDocument()* du JTextField. De même, ce listener ne sera pas un PropertyChangeListener, mais un DocumentListener.
+
+Héritage
+--------
+Si un composant du fichier guix a le même identifiant qu'un composant (ou attribut) de sa superclasse, alors il surcharge ce dernier.
+
+Si leur classe est la même, alors l'attribut n'est pas généré dans le fichier. En revanche, si la classe du composant du fichier guix est une sous-classe de la classe du composant de la superclasse, alors il est généré. Si ce n'est pas une sous-classe, alors une erreur est déclenchée.
+
+Différences
+-----------
+GWT
+***
+Pour GWT, Guix génère automatiquement un fichier .*gwt*.*xml*, le fichier *web*.*xml* et un *index*.*html*. Ces fichiers peuvent être redéfini par l'utilisateur s'il les place dans le bon dossier source. Ces fichiers sont principalement des fichiers de configuration.
+
+De plus, le code CSS présent dans les fichiers guix n'est pas appliqué aux objets, il faut l'écrire dans des fichiers CSS.
+
+Swing
+*****
+Pour Swing, guix génère une classe dont le nom est défini par la propriété *launcherName* du POM. Cette classe possède un méthode *main* qui lance le programme généré.
Deleted: trunk/src/site/rst/fonctionnement.rst
===================================================================
--- trunk/src/site/rst/fonctionnement.rst 2009-08-27 13:42:46 UTC (rev 1613)
+++ trunk/src/site/rst/fonctionnement.rst 2009-08-27 13:43:32 UTC (rev 1614)
@@ -1,19 +0,0 @@
-Fonctionnement du programme
----------------------------
-
-Déroulement de la phase de compilation (génération de l'arbre du modèle)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. image:: guixcompilationactivity.png
- :align: center
-
-Au lancement de la compilation, le programme charge les fichiers *.script* et *.css* du même nom que le fichier à compiler. S'ils existent, il enregistre leur contenu respectivement dans le conteneur des scripts et dans un nouveau *StyleSheet* associé au *GuixModelObject* racine.
-
-Tout au long du parcours du fichier Guix, on enregistre le contenu des balises *<script>*. À la fin du parcours, on enregistre ce contenu dans le *ClassDescriptor* du *GuixModelObject* racine.
-
-Dès que le parser rencontre une balise *<style>*, il ajoute une nouvelle instance de *StyleSheet* au *GuixModelObject* racine, contenant soit le fichier spécifié par l'attribut *source* (s'il est renseigné) ou les données entre les balises.
-
-Représentation de l'arbre du modèle
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. image:: guixmodeltree.png
Modified: trunk/src/site/rst/index.rst
===================================================================
--- trunk/src/site/rst/index.rst 2009-08-27 13:42:46 UTC (rev 1613)
+++ trunk/src/site/rst/index.rst 2009-08-27 13:43:32 UTC (rev 1614)
@@ -4,11 +4,9 @@
Présentation
------------
-Guix est un projet de générateur d'IHM à partir de fichiers XML et CSS.
+Guix est un projet de générateur d'IHM à partir de fichiers XML et CSS. Il permet, à partir de fichiers XML, de générer la même interface graphique sous plusieurs librairies différentes. Pour l'instant, les librairies graphiques disponibles sont Swing et Google Web Toolkit.
-Il fait partie du projet Buix consultable sur le labs de Libre Entreprise : `https://labs.libre-entreprise.org/projects/buix/`_
+Il fait partie du projet Buix consultable sur le site Nuiton : http://www.nuiton.org/projects/show/buix
Il est basé sur le projet JAXX dont la documentation est présente sur la page suivante : http://buix.labs.libre-entreprise.org/original-jaxx/www.jaxxframework.org/w…
-
-.. _https://labs.libre-entreprise.org/projects/buix/: https://labs.libre-entreprise.org/projects/buix/
Added: trunk/src/site/rst/model.rst
===================================================================
--- trunk/src/site/rst/model.rst (rev 0)
+++ trunk/src/site/rst/model.rst 2009-08-27 13:43:32 UTC (rev 1614)
@@ -0,0 +1,78 @@
+Génération de l'arbre du modèle
+===============================
+
+La première étape du processus de génération est la génération du modèle des données contenues dans les fichiers XML. Guix utilise le parseur XML Pull Parser 3 (XPP3) pour parcourir ces fichiers. Il s'agit d'un parseur qui permet seulement de parcourir un fichier XML de bout en bout (ce qui nous suffit largement dans Guix) mais qui est beaucoup plus léger que SAX par exemple.
+
+Pour représenter ce modèle, Guix utilise 6 classes comme le montre le diagramme ci-dessous :
+
+.. image:: guixmodeltree.png
+
+GuixModelObject
+---------------
+La classe GuixModelObject est la classe centrale de la représentation des données : c'est elle qui représente les composants.
+
+Lorsque le parseur XML rencontre une balise ouvrante, il crée une nouvelle instance de GuixModelObject avec pour attributs *id*, *constructor, *javaBean* et *styleClass, les valeurs das attributs de même nom de la balise. Le nom de la balise correspond à la future classe de ce composant.
+
+L'attribut *id* correspond au nom du composant dans le fichier. Sa valeur par défaut est "_" suivi du nom de la balise et d'un nombre incrémenté à chaque balise n'ayant pas d'attribut *id*.
+
+L'attribut *constructor* correspond aux paramètres du constructeur du composant. Sa valeur par défaut est nulle.
+
+L'attribut *javaBean* indique si le composant doit posséder un modifieur dans le fichier généré. Sa valeur par défaut est *true*.
+
+L'attribut *styleClass* correspond à la classe de style du composant. Elle est utile quand on définit le style dans le CSS. Sa valeur par défaut est nulle.
+
+L'attribut *parent* est le GuixModelObject représentant la balise mère et l'attribut *children* est la liste des GuixModelObject représentant les balises filles.
+
+Le contenu des commentaires situés juste au dessus de la balise est ajouté à l'attribut *javadoc* du GuixModelObject.
+
+Au GuixModelObject représentant la balise racine, on ajoute tous les fichiers CSS rencontrés dans les balises *style* du fichier XML. Ainsi, lors de la génération, on pourra si besoin est, les copier dans le dossier adéquat (dans le cas de GWT par exemple).
+
+ClassDescriptor
+---------------
+La classe ClassDescriptor est comme son nom l'indique une classe servant à décrire les classes des GuixModelObject. Ces dernières sont définies par le nom de la balise représentant le composant. Ce nom est décomposé en nom de package et nom de classe.
+
+La génération du modèle doit être complètement indépendante de la librairie graphique de l'IHM à générer. C'est pourquoi on utilise un ClassDescriptor et pas directement la classe Class de java. Pour utiliser la classe Class, il faudrait faire de l'introspection en utilisant par exemple la méthode *Class*.*forName(String className)*, mais ça ne fonctionne pas en GWT sans spécifier le ClassLoader de GWT. L'introspection est donc repoussée à la phase de génération.
+
+On utilise quand même la méthode *Classe.*forName(String className)* lors de cette phase, afin de vérifier s'il s'agit d'une classe existante : si on ne trouve pas la classe, on cherche le fichier .*guix* ou .*jaxx* correspondant. S'il existe, on ajoute ce fichier aux dépendances du fichier que l'on est en train de compiler, et s'il n'a pas été déjà compilé, on le compile.
+
+Balise racine
+~~~~~~~~~~~~~
+La balise racine est différente des autres car le descripteur de classe du GuixModelObject qui la représente n'est pas défini par le nom de cette balise, mais par le nom du fichier à générer et son chemin. En revanche, le nom de la balise correspond à la superclasse du fichier à générer. Les ClassDescriptor décrivant les fichiers à générer sont les seuls à posséder des superclasses.
+
+Le contenu de toutes les balises *script* d'un fichier est rattaché au ClassDescriptor du GuixModelObject racine, après avoir été parsé par *javacc* pour vérifier que le code du script est correct.
+
+Balises filles
+~~~~~~~~~~~~~~
+Pour les autres balises, on crée juste une nouvelle instance de ClassDescriptor avec le nom de la balise. Ces instances n'ont ni superclasse ni script.
+
+Enregistrement des ClassDescriptor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Quand le ClassDescriptor a été complètement créé, on l'enregistre en vérifiant qu'un ClassDescriptor de même package et même nom n'aie pas une superclasse différente ou un script différent (si ces derniers ne sont pas nuls).
+
+Si le ClassDescriptor a déjà été enregistré, on lie le GuixModelObject au ClassDescriptor déjà enregistré, afin que tous les composants d'une même classe soient représentés par des GuixModelObject de même ClassDescriptor.
+
+AttributeDescriptor
+-------------------
+La classe AttributeDescriptor représente les attributs des balises. Pour chaque attribut d'un balise, on crée une instance d'AttributeDescriptor avec son nom et sa valeur, et on l'ajoute à la liste d'AttributeDescriptor du GuixModelObject représentant la balise.
+
+CSS
+---
+L'intégration du CSS dans le modèle n'est pas nécessaire pour toutes les librairies graphiques, mais comme la génération du modèle est commune, elle est effectuée quand même (ceci pourrait être paramétré dans le POM à l'avenir).
+
+Le code CSS présent entre les balises *style*, ou le contenu des fichiers CSS définis par l'attribut *source* de ces balises, est analysé par le parser CSS de *javacc*.
+
+Il est alors décomposé en différentes classes :
+
+StyleSheet :
+ cette classe représente un fichier CSS et possède la liste des Selector et des Rule
+Selector :
+ cette classe représente le sélecteur qui permet de déterminer à quels objets s'applique la liste des Rule qu'il contient
+Rule :
+ cette classe représente les valeurs à attribuer aux attributs d'un composant
+
+Déroulement de la compilation
+-----------------------------
+Le déroulement de la compilation est représenté sur le diagramme ci-dessous :
+
+.. image:: guixcompilationactivity.png
+ :align: center
Modified: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml 2009-08-27 13:42:46 UTC (rev 1613)
+++ trunk/src/site/site.xml 2009-08-27 13:43:32 UTC (rev 1614)
@@ -27,6 +27,7 @@
<menu ref="parent"/>
<menu name="Utilisateur">
+ <item name="Accueil" href="index.html" />
<item name="Fichiers Guix" href="guixFiles.html" />
<item name="Balises universelles" href="commonTags.html" />
<item name="Installation" href="installation.html"/>
@@ -36,9 +37,8 @@
<menu name="Développeur">
<item name="Architecture" href="architecture.html" />
- <item name="Fonctionnement du programme" href="fonctionnement.html" />
- <!--item name="Avancement" href="Avancement.html"/-->
- <item name="A faire" href="todo.html"/>
+ <item name="Génération du modèle" href="model.html" />
+ <item name="Génération du code" href="codeGeneration.html" />
</menu>
<menu ref="reports"/>
1
0
r1613 - trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo
by kmorin@users.nuiton.org 27 Aug '09
by kmorin@users.nuiton.org 27 Aug '09
27 Aug '09
Author: kmorin
Date: 2009-08-27 15:42:46 +0200 (Thu, 27 Aug 2009)
New Revision: 1613
Modified:
trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo5.guix
Log:
tested something
Modified: trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo5.guix
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo5.guix 2009-08-27 13:42:27 UTC (rev 1612)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo5.guix 2009-08-27 13:42:46 UTC (rev 1613)
@@ -5,4 +5,5 @@
<Label text="GuixDemo5 inherits GuixDemo2" />
</Panel>
<CheckBox id="button" text="Push Me again" />
+ <Label id="addedLabel" text="added" />
</org.nuiton.guix.demo.GuixDemo2>
\ No newline at end of file
1
0
r1612 - trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator
by kmorin@users.nuiton.org 27 Aug '09
by kmorin@users.nuiton.org 27 Aug '09
27 Aug '09
Author: kmorin
Date: 2009-08-27 15:42:27 +0200 (Thu, 27 Aug 2009)
New Revision: 1612
Modified:
trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingAbstractClassGenerator.java
Log:
generates protected table attributes
Modified: trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingAbstractClassGenerator.java
===================================================================
--- trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingAbstractClassGenerator.java 2009-08-27 13:41:52 UTC (rev 1611)
+++ trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingAbstractClassGenerator.java 2009-08-27 13:42:27 UTC (rev 1612)
@@ -252,7 +252,7 @@
}
}
if(createField) {
- jf.addField(new JavaField(Modifier.PRIVATE,
+ jf.addField(new JavaField(Modifier.PROTECTED,
clazz.getName(),
gmo.getId(), gmo.getJavadoc(), tableHandler),
gmo.isJavaBean());
@@ -397,7 +397,7 @@
}
if(createField) {
- jf.addField(new JavaField(Modifier.PRIVATE,
+ jf.addField(new JavaField(Modifier.PROTECTED,
clazz.getName(),
gmo.getId(), gmo.getJavadoc(), menuBarHandler),
gmo.isJavaBean());
@@ -461,7 +461,7 @@
}
if(createField) {
- jf.addField(new JavaField(Modifier.PRIVATE,
+ jf.addField(new JavaField(Modifier.PROTECTED,
clazz.getName(),
gmo.getId(), gmo.getJavadoc(), splitPanelHandler),
gmo.isJavaBean());
1
0
r1611 - trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt
by kmorin@users.nuiton.org 27 Aug '09
by kmorin@users.nuiton.org 27 Aug '09
27 Aug '09
Author: kmorin
Date: 2009-08-27 15:41:52 +0200 (Thu, 27 Aug 2009)
New Revision: 1611
Modified:
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CheckBoxHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RadioButtonHandler.java
Log:
Add common attributes
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CheckBoxHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CheckBoxHandler.java 2009-08-27 13:41:15 UTC (rev 1610)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CheckBoxHandler.java 2009-08-27 13:41:52 UTC (rev 1611)
@@ -12,6 +12,7 @@
public CheckBoxHandler() {
super();
+ attrMap.put("selected", "value");
}
@Override
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RadioButtonHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RadioButtonHandler.java 2009-08-27 13:41:15 UTC (rev 1610)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RadioButtonHandler.java 2009-08-27 13:41:52 UTC (rev 1611)
@@ -10,6 +10,7 @@
public RadioButtonHandler() {
super();
+ attrMap.put("selected", "value");
}
@Override
1
0
r1610 - trunk/guix-compiler/src/main/java/org/nuiton/guix/generator
by kmorin@users.nuiton.org 27 Aug '09
by kmorin@users.nuiton.org 27 Aug '09
27 Aug '09
Author: kmorin
Date: 2009-08-27 15:41:15 +0200 (Thu, 27 Aug 2009)
New Revision: 1610
Modified:
trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFile.java
Log:
in getMethod(name) and getField(name), look also in the inherited methods or fields
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFile.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFile.java 2009-08-27 08:39:58 UTC (rev 1609)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFile.java 2009-08-27 13:41:15 UTC (rev 1610)
@@ -182,6 +182,27 @@
}
}
}
+ for(JavaMethod method : inheritedMethods) {
+ if(method.getName().equals(methodName)) {
+ if(method.getArguments() == null && args == null) {
+ return method;
+ }
+ else if (method.getArguments() != null && args != null
+ && method.getArguments().length == args.length) {
+ boolean samesame = true;
+ for(int i = 0 ; i < args.length ; i++) {
+ if(!args[i].getName().equals(method.getArguments()[i].getName())
+ || !args[i].getType().equals(method.getArguments()[i].getType())) {
+ samesame = false;
+ break;
+ }
+ }
+ if(samesame) {
+ return method;
+ }
+ }
+ }
+ }
return null;
}
@@ -270,6 +291,11 @@
return field;
}
}
+ for(JavaField field : inheritedFields) {
+ if(field.getName().equals(fieldName)) {
+ return field;
+ }
+ }
return null;
}
1
0
r1609 - in trunk/guix-compiler-swing/src: main/java/org/nuiton/guix/generator test/java/org/nuiton/guix/generator
by kmorin@users.nuiton.org 27 Aug '09
by kmorin@users.nuiton.org 27 Aug '09
27 Aug '09
Author: kmorin
Date: 2009-08-27 10:39:58 +0200 (Thu, 27 Aug 2009)
New Revision: 1609
Modified:
trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingGenerator.java
trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingInterfaceGenerator.java
trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingJavaFileGenerator.java
trunk/guix-compiler-swing/src/test/java/org/nuiton/guix/generator/SwingGeneratorTest.java
Log:
Correction in the javadoc + clean imports
Correction in the tests
Modified: trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingGenerator.java
===================================================================
--- trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingGenerator.java 2009-08-27 08:39:49 UTC (rev 1608)
+++ trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingGenerator.java 2009-08-27 08:39:58 UTC (rev 1609)
@@ -301,7 +301,7 @@
//get the class of the current token or its JavaFile
try {
- nextClazz = Class.forName(returnType);
+ nextClazz = Class.forName(returnType);
}
catch (ClassNotFoundException eee) {
for(JavaFile javaFile : generatedFiles.values()) {
Modified: trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingInterfaceGenerator.java
===================================================================
--- trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingInterfaceGenerator.java 2009-08-27 08:39:49 UTC (rev 1608)
+++ trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingInterfaceGenerator.java 2009-08-27 08:39:58 UTC (rev 1609)
@@ -25,7 +25,6 @@
import java.lang.reflect.Modifier;
import java.util.Map;
-import org.nuiton.guix.tags.TagHandler;
import org.nuiton.guix.tags.TagManager;
/**
Modified: trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingJavaFileGenerator.java
===================================================================
--- trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingJavaFileGenerator.java 2009-08-27 08:39:49 UTC (rev 1608)
+++ trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingJavaFileGenerator.java 2009-08-27 08:39:58 UTC (rev 1609)
@@ -24,8 +24,6 @@
//~--- JDK imports ------------------------------------------------------------
import java.util.Map;
-import org.nuiton.guix.tags.TagHandler;
-import org.nuiton.guix.tags.TagManager;
/**
*
Modified: trunk/guix-compiler-swing/src/test/java/org/nuiton/guix/generator/SwingGeneratorTest.java
===================================================================
--- trunk/guix-compiler-swing/src/test/java/org/nuiton/guix/generator/SwingGeneratorTest.java 2009-08-27 08:39:49 UTC (rev 1608)
+++ trunk/guix-compiler-swing/src/test/java/org/nuiton/guix/generator/SwingGeneratorTest.java 2009-08-27 08:39:58 UTC (rev 1609)
@@ -43,112 +43,116 @@
@Test
public void testGenerateBinding() {
-// SwingGuixInitializer.initialize();
-// SwingGenerator sg = new SwingGenerator();
-// //tests the not null condition for the parameters that needs to be not null
-// Assert.assertNull(sg.generateBindings(null, new StringBuffer(), null, null, Class.class, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>()));
-// Assert.assertNull(sg.generateBindings(new StringBuffer(), null, null, null, Class.class, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>()));
-// Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, null, 0, null, "", new HashMap<GuixGenerator, JavaFile>()));
-// Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], -1, null, "", new HashMap<GuixGenerator, JavaFile>()));
-// Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], -1, null, "", new HashMap<GuixGenerator, JavaFile>()));
-// Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], 0, null, null, new HashMap<GuixGenerator, JavaFile>()));
-// Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], 0, null, "", null));
-// Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, null, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>()));
-//
-// //tests with a class parameter not null
-// //tests without TagHandlers
-// List<Class> l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, JToggleButton.class, new String[]{"isSelected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// //tests a successful generation with a method as a binding
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, JToggleButton.class, new String[]{"isSelected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0), ChangeListener.class);
-// //tests a successful generation with an attribute as a binding
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, JToggleButton.class, new String[]{"selected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0), ChangeListener.class);
-//
-// //tests with a javafile parameter not null
-// //tests if the result is empty without the taghandler associated to the field
-// JavaFile jf = new JavaFile();
-// jf.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null));
-// jf.addMethod(new JavaMethod(Modifier.PUBLIC, "javax.swing.JToggleButton", "getButton", null, null, "", null));
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isSelected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-//
-// //tests a successful generation with a method as a binding
-// jf = new JavaFile();
-// jf.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null, new ToggleButtonHandler()));
-// jf.addMethod(new JavaMethod(Modifier.PUBLIC, "javax.swing.JToggleButton", "getButton", null, null, "", null));
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isSelected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 2);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0), ChangeListener.class);
-// Assert.assertNotNull(l.get(1));
-// Assert.assertEquals(l.get(1), PropertyChangeListener.class);
-// //tests a successful generation with an attribute as a binding
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"button","selected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 2);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0), ChangeListener.class);
-// Assert.assertNotNull(l.get(1));
-// Assert.assertEquals(l.get(1), PropertyChangeListener.class);
-//
-// //tests with a javafile parameter not null with an attribute whose type is another generated file
-// //tests if the result is empty without the taghandler associated to the field
-// jf = new JavaFile();
-// jf.addField(new JavaField(Modifier.PRIVATE, "test.Test", "test", null));
-// jf.addMethod(new JavaMethod(Modifier.PUBLIC, "test.Test", "getTest", null, null, "", null));
-// JavaFile jf2 = new JavaFile(Modifier.PUBLIC, 0, "test", "Test", null, null);
-// jf2.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null));
-// jf2.addMethod(new JavaMethod(Modifier.PUBLIC, "javax.swing.JToggleButton", "getButton", null, null, "", null));
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest","getButton","isSelected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// //test without jf2 in the map of generators with JavaFile
-// jf2 = new JavaFile(Modifier.PUBLIC, 0, "test", "Test", null, null);
-// jf2.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null, new ToggleButtonHandler()));
-// jf2.addMethod(new JavaMethod(Modifier.PUBLIC, "javax.swing.JToggleButton", "getButton", null, null, "", null));
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest","getButton","isSelected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-//
-// Map<GuixGenerator,JavaFile> map = new HashMap<GuixGenerator, JavaFile>();
-// map.put(sg, jf2);
-// //tests an unsuccessful binding generation with a method as a binding because the superclass of j2 is not assignable from java.awt.Container
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest","getButton", "isSelected"}, 0, null, "", map);
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// //tests a successful generation with a method as a binding
-// jf2 = new JavaFile(Modifier.PUBLIC, 0, "test", "Test", "java.awt.Container", null);
-// jf2.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null, new ToggleButtonHandler()));
-// jf2.addMethod(new JavaMethod(Modifier.PUBLIC, "javax.swing.JToggleButton", "getButton", null, null, "", null));
-// map = new HashMap<GuixGenerator, JavaFile>();
-// map.put(sg, jf2);
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest","getButton", "isSelected"}, 0, null, "", map);
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 2);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0), ChangeListener.class);
-// //the PropertyChangeListener is recorded only once
-// Assert.assertNotNull(l.get(1));
-// Assert.assertEquals(l.get(1), PropertyChangeListener.class);
-// //tests a successful generation with an attribute as a binding
-// l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"test","button","selected"}, 0, null, "", map);
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 2);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0), ChangeListener.class);
-// //the PropertyChangeListener is recorded only once
-// Assert.assertNotNull(l.get(1));
-// Assert.assertEquals(l.get(1), PropertyChangeListener.class);
+ SwingGuixInitializer.initialize();
+ SwingGenerator sg = new SwingGenerator();
+ JavaMethod addPropertyChangeListener = new JavaMethod(Modifier.PUBLIC, "void", "addPropertyChangeListener", new JavaArgument[]{new JavaArgument("java.beans.PropertyChangeListener", "listener")}, null, "", null);
+ //tests the not null condition for the parameters that needs to be not null
+ Assert.assertNull(sg.generateBindings(null, new StringBuffer(), null, null, Class.class, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>()));
+ Assert.assertNull(sg.generateBindings(new StringBuffer(), null, null, null, Class.class, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>()));
+ Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, null, 0, null, "", new HashMap<GuixGenerator, JavaFile>()));
+ Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], -1, null, "", new HashMap<GuixGenerator, JavaFile>()));
+ Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], -1, null, "", new HashMap<GuixGenerator, JavaFile>()));
+ Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], 0, null, null, new HashMap<GuixGenerator, JavaFile>()));
+ Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], 0, null, "", null));
+ Assert.assertNull(sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, null, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>()));
+
+ //tests with a class parameter not null
+ //tests without TagHandlers
+ List<Class> l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, JToggleButton.class, new String[]{"isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0), PropertyChangeListener.class);
+ //tests a successful generation with a method as a binding
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, JToggleButton.class, new String[]{"isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0), ChangeListener.class);
+ //tests a successful generation with an attribute as a binding
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, JToggleButton.class, new String[]{"selected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0), ChangeListener.class);
+
+ //tests with a javafile parameter not null
+ //tests if the result is empty without the addPropertyChangeListener
+ JavaFile jf = new JavaFile();
+ jf.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null));
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+
+ //tests with a javafile parameter not null
+ //tests if the result without the TagHandler
+ jf = new JavaFile();
+ jf.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null));
+ jf.addMethod(addPropertyChangeListener);
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0), PropertyChangeListener.class);
+
+ //tests a successful generation with a method as a binding
+ jf = new JavaFile();
+ jf.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null, new ToggleButtonHandler()));
+ jf.addMethod(addPropertyChangeListener);
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 2);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0), ChangeListener.class);
+ Assert.assertNotNull(l.get(1));
+ Assert.assertEquals(l.get(1), PropertyChangeListener.class);
+ //tests a successful generation with an attribute as a binding
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"button","selected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 2);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0), ChangeListener.class);
+ Assert.assertNotNull(l.get(1));
+ Assert.assertEquals(l.get(1), PropertyChangeListener.class);
+
+ //tests with a javafile parameter not null with an attribute whose type is another generated file
+ //tests if the result is empty without the taghandler associated to the field
+ jf = new JavaFile();
+ jf.addField(new JavaField(Modifier.PRIVATE, "test.Test", "test", null));
+ jf.addMethod(addPropertyChangeListener);
+ JavaFile jf2 = new JavaFile(Modifier.PUBLIC, 0, "test", "Test", null, null);
+ jf2.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null));
+ jf2.addMethod(addPropertyChangeListener);
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()","isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ //test without jf2 in the map of generators with JavaFile
+ jf2 = new JavaFile(Modifier.PUBLIC, 0, "test", "Test", null, null);
+ jf2.addField(new JavaField(Modifier.PRIVATE, "javax.swing.JToggleButton", "button", null, new ToggleButtonHandler()));
+ jf2.addMethod(addPropertyChangeListener);
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()","isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+
+ Map<GuixGenerator,JavaFile> map = new HashMap<GuixGenerator, JavaFile>();
+ map.put(sg, jf2);
+ //tests an successful binding generation with a method as a binding
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()", "isSelected()"}, 0, null, "", map);
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 2);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0), ChangeListener.class);
+ //the PropertyChangeListener is recorded only once
+ Assert.assertNotNull(l.get(1));
+ Assert.assertEquals(l.get(1), PropertyChangeListener.class);
+ //tests a successful generation with an attribute as a binding
+ l = sg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"test","button","selected"}, 0, null, "", map);
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 2);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0), ChangeListener.class);
+ //the PropertyChangeListener is recorded only once
+ Assert.assertNotNull(l.get(1));
+ Assert.assertEquals(l.get(1), PropertyChangeListener.class);
}
}
1
0
r1608 - in trunk/guix-compiler-gwt: . src/main/java/org/nuiton/guix/generator src/test/java/org/nuiton/guix/generator
by kmorin@users.nuiton.org 27 Aug '09
by kmorin@users.nuiton.org 27 Aug '09
27 Aug '09
Author: kmorin
Date: 2009-08-27 10:39:49 +0200 (Thu, 27 Aug 2009)
New Revision: 1608
Modified:
trunk/guix-compiler-gwt/pom.xml
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtJavaFileGenerator.java
trunk/guix-compiler-gwt/src/test/java/org/nuiton/guix/generator/GwtGeneratorTest.java
Log:
Correction in the javadoc + clean imports
Correction in the tests
Modified: trunk/guix-compiler-gwt/pom.xml
===================================================================
--- trunk/guix-compiler-gwt/pom.xml 2009-08-27 08:39:26 UTC (rev 1607)
+++ trunk/guix-compiler-gwt/pom.xml 2009-08-27 08:39:49 UTC (rev 1608)
@@ -120,7 +120,31 @@
</build>
<profiles>
+ <profile>
+ <id>gwt-dev-windows</id>
+ <properties>
+ <platform>windows</platform>
+ </properties>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <os>
+ <family>windows</family>
+ </os>
+ </activation>
+ </profile>
<profile>
+ <id>gwt-dev-mac</id>
+ <properties>
+ <platform>mac</platform>
+ </properties>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <os>
+ <family>mac</family>
+ </os>
+ </activation>
+ </profile>
+ <profile>
<id>gwt-dev-linux</id>
<activation>
<activeByDefault>true</activeByDefault>
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java 2009-08-27 08:39:26 UTC (rev 1607)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java 2009-08-27 08:39:49 UTC (rev 1608)
@@ -20,7 +20,6 @@
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.MenuBar;
-import com.google.gwt.user.client.ui.TabPanel;
import java.beans.IntrospectionException;
import java.io.File;
import java.io.FileInputStream;
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator.java 2009-08-27 08:39:26 UTC (rev 1607)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator.java 2009-08-27 08:39:49 UTC (rev 1608)
@@ -166,7 +166,6 @@
catch(Exception eee) {
if(log.isErrorEnabled()) {
log.error(eee);
- eee.printStackTrace();
}
}
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtJavaFileGenerator.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtJavaFileGenerator.java 2009-08-27 08:39:26 UTC (rev 1607)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtJavaFileGenerator.java 2009-08-27 08:39:49 UTC (rev 1608)
@@ -23,10 +23,7 @@
import org.nuiton.guix.model.GuixModelObject;
//~--- JDK imports ------------------------------------------------------------
-import java.util.List;
import java.util.Map;
-import org.nuiton.guix.tags.TagHandler;
-import org.nuiton.guix.tags.TagManager;
/**
*
Modified: trunk/guix-compiler-gwt/src/test/java/org/nuiton/guix/generator/GwtGeneratorTest.java
===================================================================
--- trunk/guix-compiler-gwt/src/test/java/org/nuiton/guix/generator/GwtGeneratorTest.java 2009-08-27 08:39:26 UTC (rev 1607)
+++ trunk/guix-compiler-gwt/src/test/java/org/nuiton/guix/generator/GwtGeneratorTest.java 2009-08-27 08:39:49 UTC (rev 1608)
@@ -18,19 +18,16 @@
*/
package org.nuiton.guix.generator;
+import com.google.gwt.event.dom.client.ClickHandler;
import org.nuiton.guix.*;
import com.google.gwt.user.client.ui.ToggleButton;
+import java.beans.PropertyChangeListener;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
-import org.nuiton.guix.generator.GwtGenerator;
import org.junit.Assert;
-import org.nuiton.guix.generator.GuixGenerator;
-import org.nuiton.guix.generator.JavaField;
-import org.nuiton.guix.generator.JavaFile;
-import org.nuiton.guix.generator.JavaMethod;
import org.nuiton.guix.tags.gwt.ToggleButtonHandler;
/**
@@ -48,117 +45,142 @@
@Test
public void testGenerateBinding() {
-// GwtGuixInitializer.initialize();
-// GwtGenerator gg = new GwtGenerator();
-// //tests the not null condition for the parameters that needs to be not null
-// List<Class> l = gg.generateBindings(null, new StringBuffer(), null, null, Class.class, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// l = gg.generateBindings(new StringBuffer(), null, null, null, Class.class, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, null, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], -1, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], -1, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], 0, null, null, new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], 0, null, "", null);
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, null, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// //tests with a class parameter not null
-// //tests if a null listener as result returns null
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, ToggleButton.class, new String[]{"isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNull(l);
-// //tests a successful generation with a method as a binding
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, ToggleButton.class, new String[]{"isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(),1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0),ClickHandler.class);
-// //tests a successful generation with an attribute as a binding
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, ToggleButton.class, new String[]{"down"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(),1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0),ClickHandler.class);
-// //tests a successful generation with a method with the generic name as a binding
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, ToggleButton.class, new String[]{"isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(),1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0),ClickHandler.class);
-// //tests a successful generation with an attribute with the generic name as a binding
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, ToggleButton.class, new String[]{"selected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(),1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0),ClickHandler.class);
-//
-// //tests with a javafile parameter not null
-// //tests if the result is null without the taghandler associated to the field
-// JavaFile jf = new JavaFile();
-// jf.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null));
-// jf.addMethod(new JavaMethod(Modifier.PUBLIC, "com.google.gwt.user.client.ui.ToggleButton", "getButton", null, null, "", null));
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNull(l);
-// //tests a successful generation with a method as a binding
-// jf = new JavaFile();
-// jf.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null, new ToggleButtonHandler()));
-// jf.addMethod(new JavaMethod(Modifier.PUBLIC, "com.google.gwt.user.client.ui.ToggleButton", "getButton", null, null, "", null));
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(),1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0),ClickHandler.class);
-// //tests a successful generation with an attribute as a binding
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"button","down"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(),1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0),ClickHandler.class);
-//
-// //tests with a javafile parameter not null with an attribute whose type is another generated file
-// //tests if the result is null without the taghandler associated to the field
-// jf = new JavaFile();
-// jf.addField(new JavaField(Modifier.PRIVATE, "test.Test", "test", null));
-// jf.addMethod(new JavaMethod(Modifier.PUBLIC, "test.Test", "getTest", null, null, "", null));
-// JavaFile jf2 = new JavaFile(Modifier.PUBLIC, JavaFile.CLASS, "test", "Test", null, null);
-// jf2.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null));
-// jf2.addMethod(new JavaMethod(Modifier.PUBLIC, "com.google.gwt.user.client.ui.ToggleButton", "getButton", null, null, "", null));
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()","isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// //test without jf2 in the map of generators with JavaFile
-// jf2 = new JavaFile(Modifier.PUBLIC, JavaFile.CLASS, "test", "Test", null, null);
-// jf2.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null, new ToggleButtonHandler()));
-// jf2.addMethod(new JavaMethod(Modifier.PUBLIC, "com.google.gwt.user.client.ui.ToggleButton", "getButton", null, null, "", null));
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()","isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(), 0);
-// Map<GuixGenerator,JavaFile> map = new HashMap<GuixGenerator, JavaFile>();
-// map.put(gg, jf2);
-// //tests a successful generation with a method as a binding
-// l =gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()", "isDown()"}, 0, null, "", map);
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(),1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0),ClickHandler.class);
-// //tests a successful generation with an attribute as a binding
-// l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"test","button","down"}, 0, null, "", map);
-// Assert.assertNotNull(l);
-// Assert.assertEquals(l.size(),1);
-// Assert.assertNotNull(l.get(0));
-// Assert.assertEquals(l.get(0),ClickHandler.class);
+ GwtGuixInitializer.initialize();
+ GwtGenerator gg = new GwtGenerator();
+ JavaMethod addPropertyChangeListener = new JavaMethod(Modifier.PUBLIC, "void", "addPropertyChangeListener", new JavaArgument[]{new JavaArgument("java.beans.PropertyChangeListener", "listener")}, null, "", null);
+
+ //tests the not null condition for the parameters that needs to be not null
+ List<Class> l = gg.generateBindings(null, new StringBuffer(), null, null, Class.class, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ l = gg.generateBindings(new StringBuffer(), null, null, null, Class.class, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, null, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], -1, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], -1, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], 0, null, null, new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, Class.class, new String[0], 0, null, "", null);
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, null, new String[0], 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ //tests with a class parameter not null
+ //tests if a null listener as result returns an empty result
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, null, ToggleButton.class, new String[]{"isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ //tests a successful generation with a method as a binding
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, ToggleButton.class, new String[]{"isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(),1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),ClickHandler.class);
+ //tests a successful generation with an attribute as a binding
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, ToggleButton.class, new String[]{"down"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(),1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),ClickHandler.class);
+ //tests a successful generation with a method with the generic name as a binding
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, ToggleButton.class, new String[]{"isSelected()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(),1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),ClickHandler.class);
+ //tests a successful generation with an attribute with the generic name as a binding
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), new ToggleButtonHandler(), null, ToggleButton.class, new String[]{"selected"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(),1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),ClickHandler.class);
+
+ //tests with a javafile parameter not null
+ //tests if the result is empty without the addPropertyChangeListener method
+ JavaFile jf = new JavaFile();
+ jf.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null));
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 0);
+ //tests if the result contains only a PropertyChangeListener without the taghandler associated to the field
+ jf = new JavaFile();
+ jf.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null));
+ jf.addMethod(addPropertyChangeListener);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),PropertyChangeListener.class);
+ //tests a successful generation with a method as a binding
+ jf = new JavaFile();
+ jf.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null, new ToggleButtonHandler()));
+ jf.addMethod(addPropertyChangeListener);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getButton()", "isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(),2);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),ClickHandler.class);
+ Assert.assertNotNull(l.get(1));
+ Assert.assertEquals(l.get(1),PropertyChangeListener.class);
+ //tests a successful generation with an attribute as a binding
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"button","down"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(),2);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),ClickHandler.class);
+ Assert.assertNotNull(l.get(1));
+ Assert.assertEquals(l.get(1),PropertyChangeListener.class);
+
+ //tests with a javafile parameter not null with an attribute whose type is another generated file
+ //tests if the result is only a PropertyChangeListener without the taghandler associated to the field
+ jf = new JavaFile();
+ jf.addField(new JavaField(Modifier.PRIVATE, "test.Test", "test", null));
+ jf.addMethod(addPropertyChangeListener);
+ JavaFile jf2 = new JavaFile(Modifier.PUBLIC, JavaFile.CLASS, "test", "Test", null, null);
+ jf2.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null));
+ jf2.addMethod(addPropertyChangeListener);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()","isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),PropertyChangeListener.class);
+ //test without jf2 in the map of generators with JavaFile
+ jf2 = new JavaFile(Modifier.PUBLIC, JavaFile.CLASS, "test", "Test", null, null);
+ jf2.addField(new JavaField(Modifier.PRIVATE, "com.google.gwt.user.client.ui.ToggleButton", "button", null, new ToggleButtonHandler()));
+ jf2.addMethod(addPropertyChangeListener);
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()","isDown()"}, 0, null, "", new HashMap<GuixGenerator, JavaFile>());
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(), 1);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),PropertyChangeListener.class);
+
+ Map<GuixGenerator,JavaFile> map = new HashMap<GuixGenerator, JavaFile>();
+ map.put(gg, jf2);
+ //tests a successful generation with a method as a binding
+ l =gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"getTest()","getButton()", "isDown()"}, 0, null, "", map);
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(),2);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),ClickHandler.class);
+ Assert.assertNotNull(l.get(1));
+ Assert.assertEquals(l.get(1),PropertyChangeListener.class);
+ //tests a successful generation with an attribute as a binding
+ l = gg.generateBindings(new StringBuffer(), new StringBuffer(), null, jf, null, new String[]{"test","button","down"}, 0, null, "", map);
+ Assert.assertNotNull(l);
+ Assert.assertEquals(l.size(),2);
+ Assert.assertNotNull(l.get(0));
+ Assert.assertEquals(l.get(0),ClickHandler.class);
+ Assert.assertNotNull(l.get(1));
+ Assert.assertEquals(l.get(1),PropertyChangeListener.class);
}
}
1
0
r1607 - in trunk/guix-compiler/src/main/java/org/nuiton/guix: . generator model tags
by kmorin@users.nuiton.org 27 Aug '09
by kmorin@users.nuiton.org 27 Aug '09
27 Aug '09
Author: kmorin
Date: 2009-08-27 10:39:26 +0200 (Thu, 27 Aug 2009)
New Revision: 1607
Modified:
trunk/guix-compiler/src/main/java/org/nuiton/guix/BindingUtils.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFileGenerator.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/model/ClassDescriptor.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/DefaultTagHandler.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/ScriptHandler.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/StyleHandler.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagHandler.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagManager.java
Log:
Correction in the javadoc + clean imports
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/BindingUtils.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/BindingUtils.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/BindingUtils.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -18,23 +18,18 @@
*/
package org.nuiton.guix;
-import java.beans.Introspector;
import java.util.ArrayList;
import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.nuiton.guix.CompilerException;
-import org.nuiton.guix.parser.JavaParserConstants;
import org.nuiton.guix.parser.JavaParserTreeConstants;
import org.nuiton.guix.parser.SimpleNode;
/**
*
- * @author kevin
+ * @author kmorin
*/
public class BindingUtils {
/** left brace matcher */
@@ -46,14 +41,11 @@
/**
* Examine an attribute value for data binding expressions. Returns a 'cooked' expression which
- * can be used to determine the resulting value. It is expected that this expression will be used
- * as the source expression in a call to {@link #registerDataBinding}.
+ * can be used to determine the resulting value.
* If the attribute value does not invoke data binding, this method returns <code>null</code>
*
* @param stringValue the string value of the property from the XML
- * @param type the type of the property, from the <code>JAXXPropertyDescriptor</code>
* @return a processed version of the expression
- * @throws jaxx.CompilerException ?
*/
public static String processDataBindings(String stringValue) {
int pos = getNextLeftBrace(stringValue, 0);
@@ -97,24 +89,7 @@
expression.append(escapeJavaString(stringValue.substring(lastPos)));
expression.append('"');
}
-//
-// StringBuffer el = new StringBuffer();
-// Pattern p = Pattern .compile("\\.(get|is)([A-Z])([a-zA-Z0-9]*)\\(\\)");
-// Matcher m = p.matcher(expression.toString());
-// int mEnd = 0;
-// if(m.find()) {
-// do {
-// el.append(expression.toString().substring(mEnd, m.start()))
-// .append(".");
-// mEnd = m.end();
-// el.append(m.group(2).toLowerCase())
-// .append(m.group(3));
-// } while (m.find());
-// }
-// else {
-// el.append(expression.toString());
-// }
-// return el.toString().length() > 0 ? el.toString().substring(0, el.toString().length()) : el.toString();
+
return expression.toString();
}
return null;
@@ -185,7 +160,8 @@
* Examines a node to identify any dependencies it contains.
*
* @param node node to scan
- * @throws jaxx.CompilerException ?
+ * @return the decomposed expression into tokens
+ * @throws CompilerException ?
*/
public static List<String[]> scanNode(SimpleNode node) throws CompilerException {
List<String[]> bindings = new ArrayList<String[]>();
@@ -212,102 +188,16 @@
}
/**
- * Scans through a compound symbol (foo.bar.baz) to identify and track all trackable pieces of it.
- *
- * @param symbol symbol to scan
- * @param contextClass current class context
- * @param isMethod flag to search a method
- * @param listenerId id of the listener
- * @return the type of the symbol (or null if it could not be determined).
- */
-// private Class scanCompoundSymbol(String symbol, boolean isMethod) {
-// String[] tokens = symbol.split("\\s*\\.\\s*");
-// StringBuffer currentSymbol = new StringBuffer();
-// StringBuffer tokensSeenSoFar = new StringBuffer();
-// boolean accepted; // if this ends up false, it means we weren't able to figure out
-// // which object the method is being invoked on
-// boolean recognizeClassNames = true;
-// for (int j = 0; j < tokens.length - (isMethod ? 1 : 0); j++) {
-// accepted = false;
-//
-// if (tokensSeenSoFar.length() > 0) {
-// tokensSeenSoFar.append('.');
-// }
-// tokensSeenSoFar.append(tokens[j]);
-// if (currentSymbol.length() > 0) {
-// currentSymbol.append('.');
-// }
-// currentSymbol.append(tokens[j]);
-//
-// if (currentSymbol.indexOf(".") == -1) {
-// String memberName = currentSymbol.toString();
-// CompiledObject object = compiler.getCompiledObject(memberName);
-// if (object != null) {
-// contextClass = object.getObjectClass();
-// currentSymbol.setLength(0);
-// accepted = true;
-// recognizeClassNames = false;
-// } else {
-// try {
-// FieldDescriptor field = contextClass.getFieldDescriptor(memberName);
-// contextClass = field.getType();
-// currentSymbol.setLength(0);
-// accepted = true;
-// recognizeClassNames = false;
-// }
-// catch (NoSuchFieldException e) {
-// if (j == 0 || j == 1 && tokens[0].equals(compiler.getRootObject().getId())) { // still in root context
-// FieldDescriptor[] newFields = compiler.getScriptFields();
-// for (FieldDescriptor newField : newFields) {
-// if (newField.getName().equals(memberName)) {
-// addListener(tokensSeenSoFar.toString(),
-// null,
-// "addPropertyChangeListener(\"" + memberName + "\", " + listenerId + ");" + JAXXCompiler.getLineSeparator(),
-// "removePropertyChangeListener(\"" + memberName + "\", " + listenerId + ");" + JAXXCompiler.getLineSeparator());
-// contextClass = newField.getType();
-// assert contextClass != null : "script field '" + memberName + "' is defined, but has type null";
-// currentSymbol.setLength(0);
-// accepted = true;
-// recognizeClassNames = false;
-// break;
-// }
-// }
-// }
-// }
-// }
-// }
-// if (currentSymbol.length() > 0 && recognizeClassNames) {
-// contextClass = TagManager.resolveClass(currentSymbol.toString(), compiler);
-// if (contextClass != null) {
-// currentSymbol.setLength(0);
-// //accepted = true;
-// //recognizeClassNames = false;
-// // TODO: for now we don't handle statics
-// return null;
-// }
-// }
-// if (!accepted) {
-// return null;
-// }
-// }
-//
-// return contextClass;
-// }
-
- /**
* Adds type information to nodes where possible, and as a side effect adds event listeners to nodes which
* can be tracked.
*
* @param expression the node to scan
- * @param listenerId id of the listener
- * @return the class descriptor of the return type or null
+ * @return the decomposed expression into tokens
*/
private static String[] determineExpressionType(SimpleNode expression) {
assert expression.getId() == JavaParserTreeConstants.JJTPRIMARYEXPRESSION;
SimpleNode prefix = expression.getChild(0);
if (prefix.jjtGetNumChildren() == 1) {
-// log.info("1 : " + prefix.getChild(0).getText());
- //return prefix.getChild(0).getText();
int type = prefix.getChild(0).getId();
if (type == JavaParserTreeConstants.JJTLITERAL || type == JavaParserTreeConstants.JJTEXPRESSION) {
return null;
@@ -318,7 +208,6 @@
}
if (expression.jjtGetNumChildren() == 1) {
-// log.info("2 " + prefix.getText());
return null;
}
else {
@@ -358,70 +247,6 @@
return result.toArray(new String[result.size()]);
}
-// Class contextClass = prefix.getJavaType();
-// if (contextClass == null) {
-// contextClass = compiler.getRootObject().getObjectClass();
-// }
-// String lastNode = prefix.getText().trim();
-//
-// for (int i = 1; i < expression.jjtGetNumChildren(); i++) {
-// SimpleNode suffix = expression.getChild(i);
-// if (suffix.jjtGetNumChildren() == 1 && suffix.getChild(0).getId() == JavaParserTreeConstants.JJTARGUMENTS) {
-// if (suffix.getChild(0).jjtGetNumChildren() == 0) { // at the moment only no-argument methods are trackable
-// contextClass = scanCompoundSymbol(lastNode, contextClass, true, listenerId);
-// if (contextClass == null) {
-// return null;
-// }
-// int dotPos = lastNode.lastIndexOf(".");
-// String objectCode = dotPos == -1 ? "" : lastNode.substring(0, dotPos);
-// log.info("oc : " + objectCode);
-// for (int j = i - 2; j >= 0; j--) {
-// log.info(expression.getChild(j).getText());
-// }
-// for (int j = i - 2; j >= 0; j--) {
-// objectCode = expression.getChild(j).getText() + objectCode;
-// }
-// return objectCode;
-// if (objectCode.length() == 0) {
-// objectCode = compiler.getRootObject().getJavaCode();
-// }
-// String methodName = lastNode.substring(dotPos + 1).trim();
-// try {
-// MethodDescriptor method = contextClass.getMethodDescriptor(methodName);
-// trackMemberIfPossible(objectCode, contextClass, method.getName(), true, listenerId);
-// return method.getReturnType();
-// }
-// catch (NoSuchMethodException e) {
-// // happens for methods defined in the current JAXX file via scripts
-// String propertyName = null;
-// if (methodName.startsWith("is")) {
-// propertyName = Introspector.decapitalize(methodName.substring("is".length()));
-// } else if (methodName.startsWith("get")) {
-// propertyName = Introspector.decapitalize(methodName.substring("get".length()));
-// }
-// if (propertyName != null) {
-// MethodDescriptor[] newMethods = compiler.getScriptMethods();
-// for (MethodDescriptor newMethod : newMethods) {
-// if (newMethod.getName().equals(methodName)) {
-// addListener(compiler.getRootObject().getId(),
-// null,
-// "addPropertyChangeListener(\"" + propertyName + "\", " + listenerId + ");" + JAXXCompiler.getLineSeparator(),
-// "removePropertyChangeListener(\"" + propertyName + "\", " + listenerId + ");" + JAXXCompiler.getLineSeparator());
-// contextClass = newMethod.getReturnType();
-// break;
-// }
-// }
-// }
-// }
-// }
-// }
-// lastNode = suffix.getText().trim();
-// if (lastNode.startsWith(".")) {
-// lastNode = lastNode.substring(1);
-// }
-// }
-//
-// return null;
}
/**
@@ -429,6 +254,7 @@
* can be tracked.
*
* @param node node to scan
+ * @return the decomposed expression into tokens
*/
private static String[] determineNodeType(SimpleNode node) {
String[] result = null;
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -18,7 +18,6 @@
*/
package org.nuiton.guix;
-import org.nuiton.guix.GuixCompiler;
import java.io.File;
import java.io.PrintWriter;
import java.io.StringReader;
@@ -30,12 +29,10 @@
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.nuiton.guix.BindingUtils;
import org.nuiton.guix.generator.GuixGenerator;
import org.nuiton.guix.generator.JavaArgument;
import org.nuiton.guix.generator.JavaField;
import org.nuiton.guix.generator.JavaFile;
-import org.nuiton.guix.generator.JavaFileGenerator;
import org.nuiton.guix.generator.JavaMethod;
import org.nuiton.guix.model.ClassDescriptor;
import org.nuiton.guix.model.GuixModelObject;
@@ -94,10 +91,10 @@
*
* @param files the files to compile
* @param targetDirectory the directory where to save the generated files
- * @param rootPackage teh root package
- * @param baseDir directory containing the files to compile
+ * @param srcDir the directory of the source files
* @param mainClass main class of the application
* @param generatorClass class of the generator
+ * @param generationLanguage the output graphical library
* @param launcherName name of the class that will launch the application
*/
public GuixLauncher(File[] files, File targetDirectory, File srcDir, String mainClass, Class<? extends GuixGenerator> generatorClass,String generationLanguage, String launcherName) {
@@ -504,35 +501,10 @@
return null;
}
}
-// ClassDescriptor cd = classDescriptors.get(i);
-// StringBuffer sb = new StringBuffer();
-// while(cd != null) {
-// sb.append(cd.toString()).append(" - ");
-// cd = cd.getSuperClass();
-// }
-// log.info(sb.toString());
return classDescriptors.get(i);
}
/**
- * Decompose the binding into the different elements to bind
- *
- * @param node the Node being parsed
- * @return the elements to bind
- */
- private List<String> browseNode(SimpleNode node) {
- List<String> result = new ArrayList<String>();
- for (int i = 0; i < node.jjtGetNumChildren(); i++) {
- //if the child is not a String and are not parameters of a method
- if (node.getChild(i).getId() == JavaParserTreeConstants.JJTPRIMARYEXPRESSION && !node.getChild(i).getText().trim().startsWith("(") && !node.getChild(i).getText().trim().startsWith("\"")) {
- result.add(node.getChild(i).getText().trim());
- }
- result.addAll(browseNode(node.getChild(i)));
- }
- return result;
- }
-
- /**
* Adds a root GuixModelObject with its last modification time
*
* @param gmo the root GuixModelObject to add
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFileGenerator.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFileGenerator.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFileGenerator.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -77,7 +77,6 @@
/**
* Add imports to the generated file
*
- * @param gmo GuixModelObject which represents the class to generate
*/
protected abstract void addImports();
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/model/ClassDescriptor.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/model/ClassDescriptor.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/model/ClassDescriptor.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -18,7 +18,6 @@
*/
package org.nuiton.guix.model;
-import org.nuiton.guix.tags.TagHandler;
/**
* Descriptor of a class found in the guix files.
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/DefaultTagHandler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/DefaultTagHandler.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/DefaultTagHandler.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -23,12 +23,9 @@
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
-import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
-import org.nuiton.guix.UnsupportedAttributeException;
/**
* Default TagHandler, containing common methods for all the tags
@@ -243,48 +240,5 @@
public String getDefaultConstructor() {
return null;
}
-
- /**
- * @param name ?
- * @return <code>true</code> if the named member is <i>bound</i> (fires <code>PropertyChangeEvent</code>
- * when modified). Members are either fields (represented by the simple name of the field) or <code>get/is</code>
- * methods (represented by the simple name of the method, <b>not</b> the simplified JavaBeans-style name).
- * Methods which are not actually bound in their native class, but for which proxy events have been
- * configured (such as <code>JTextField.getText</code>, return <code>true</code>.
- * @throws jaxx.UnsupportedAttributeException
- * ?
- */
- @Override
- public boolean isMemberBound(String member) throws UnsupportedAttributeException {
- try {
- init();
- } catch (IntrospectionException e) {
- throw new RuntimeException(e);
- }
-
- if (eventInfos != null && eventInfos.containsKey(member)) {
- return true;
- }
-
- if (member.equals("getClass")) {
- return false;
- }
-
- String propertyName = null;
- if (member.startsWith("get")) {
- propertyName = Introspector.decapitalize(member.substring("get".length()));
- } else if (member.startsWith("is")) {
- propertyName = Introspector.decapitalize(member.substring("is".length()));
- }
- PropertyDescriptor property = propertyName != null ? properties.get(propertyName) : null;
- if (property != null) {
- return property.isBound();
- }
- try {
- Field field = getClassToGenerate().getField(member);
- return Modifier.isFinal(field.getModifiers()); // final fields might as well be considered bound -- they can't be modified anyway
- } catch (NoSuchFieldException e) {
- throw new UnsupportedAttributeException("cannot find property '" + member + "' of " + getClassToGenerate());
- }
- }
+
}
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/ScriptHandler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/ScriptHandler.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/ScriptHandler.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -81,7 +81,7 @@
* Parse the <code>script</code> tag.
*
* @param xpp the parser referencing the style tag
- * @param baseDir the directory of the compiled guix file
+ * @param scriptFile the file containing the code to compile
* @return the content of the file specified by the <code>source</code> attribute
* or the script between the script tags
* @throws IOException
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/StyleHandler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/StyleHandler.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/StyleHandler.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -82,8 +82,7 @@
* Load the file with the name of the class
* and creates a <code>StyleSheet</code> with the content of the file.
*
- * @param baseDir the directory of the compiled guix file
- * @param className the name of the file to load
+ * @param styleFile the file containing the css code
* @return a <code>StyleSheet</code> containing the content of the file
* @throws FileNotFoundException if the file with the same name as the class
* does not exist
@@ -101,7 +100,7 @@
* and creates a <code>StyleSheet</code> with this content.
*
* @param xpp the parser referencing the style tag
- * @param baseDir the directory of the compiled guix file
+ * @param styleFile the file containing the css code
* @return a <code>StyleSheet</code> containing the content of the file
* @throws java.io.IOException if an error occurs while reading
* the file specified by the <code>source</code> attribute
@@ -336,5 +335,3 @@
}
}
-
-//~ Formatted by Jindent --- http://www.jindent.com
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagHandler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagHandler.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagHandler.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -43,5 +43,4 @@
public String getEventInfosModelName(String methodName);
- public boolean isMemberBound(String member);
}
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagManager.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagManager.java 2009-08-26 17:03:12 UTC (rev 1606)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagManager.java 2009-08-27 08:39:26 UTC (rev 1607)
@@ -21,16 +21,12 @@
//~--- non-JDK imports --------------------------------------------------------
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
//~--- JDK imports ------------------------------------------------------------
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
/**
@@ -53,9 +49,6 @@
/** Maps simple tag names to their default namespaces (package names). */
private static Map<String, String> defaultNamespaces = new HashMap<String, String>();
- /** Keeps track of whether or not named classes exist. */
- private static Map<String, Boolean> classExistenceCache = new HashMap<String, Boolean>();
-
private TagManager() { /* not instantiable */
}
@@ -83,13 +76,21 @@
}
/**
+ * Register a TagHandler for a particular tag
*
- * @param className
+ * @param className the tag or className to catch
+ * @param clazz the tagHandler class who handles clazz
*/
public static void registerGuixClassHandler(String className, Class clazz) {
guixClassHandlers.put(className.toUpperCase(), clazz);
}
+ /**
+ * Get the tagHandler registered for a particular tag
+ *
+ * @param className the class name or tag you'd like to get the TagHandler
+ * @return a TagHandler instance which handles the className class or tag
+ */
public static TagHandler getGuixClassHandler(String className) {
if(guixClassHandlers.get(className.toUpperCase()) != null) {
try {
@@ -127,7 +128,6 @@
* class could be found.
*
* @param name name to resolve
- * @param compiler compile to use
* @return the resolved fqn class name
*/
public static String resolveClassName(String name) {
@@ -163,5 +163,3 @@
}
}
-
-//~ Formatted by Jindent --- http://www.jindent.com
1
0
r1606 - in trunk: guix-compiler guix-compiler-gwt guix-compiler-swing guix-test-gwt guix-test-swing maven-guix-gwt-archetype maven-guix-plugin maven-guix-swing-archetype
by kmorin@users.nuiton.org 26 Aug '09
by kmorin@users.nuiton.org 26 Aug '09
26 Aug '09
Author: kmorin
Date: 2009-08-26 19:03:12 +0200 (Wed, 26 Aug 2009)
New Revision: 1606
Added:
trunk/guix-compiler-gwt/LICENSE.txt
trunk/guix-compiler-gwt/README.txt
trunk/guix-compiler-gwt/changelog.txt
trunk/guix-compiler-swing/LICENSE.txt
trunk/guix-compiler-swing/README.txt
trunk/guix-compiler-swing/changelog.txt
trunk/guix-compiler/LICENSE.txt
trunk/guix-compiler/README.txt
trunk/guix-compiler/changelog.txt
trunk/guix-test-gwt/LICENSE.txt
trunk/guix-test-gwt/README.txt
trunk/guix-test-gwt/changelog.txt
trunk/guix-test-swing/LICENSE.txt
trunk/guix-test-swing/README.txt
trunk/guix-test-swing/changelog.txt
trunk/maven-guix-gwt-archetype/LICENSE.txt
trunk/maven-guix-gwt-archetype/README.txt
trunk/maven-guix-gwt-archetype/changelog.txt
trunk/maven-guix-plugin/LICENSE.txt
trunk/maven-guix-plugin/README.txt
trunk/maven-guix-plugin/changelog.txt
trunk/maven-guix-swing-archetype/LICENSE.txt
trunk/maven-guix-swing-archetype/README.txt
trunk/maven-guix-swing-archetype/changelog.txt
Log:
Add LICENSE.txt, README.txt and changelog.txt
Added: trunk/guix-compiler/LICENSE.txt
===================================================================
--- trunk/guix-compiler/LICENSE.txt (rev 0)
+++ trunk/guix-compiler/LICENSE.txt 2009-08-26 17:03:12 UTC (rev 1606)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/guix-compiler-gwt/LICENSE.txt
===================================================================
--- trunk/guix-compiler-gwt/LICENSE.txt (rev 0)
+++ trunk/guix-compiler-gwt/LICENSE.txt 2009-08-26 17:03:12 UTC (rev 1606)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/guix-compiler-swing/LICENSE.txt
===================================================================
--- trunk/guix-compiler-swing/LICENSE.txt (rev 0)
+++ trunk/guix-compiler-swing/LICENSE.txt 2009-08-26 17:03:12 UTC (rev 1606)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/guix-test-gwt/LICENSE.txt
===================================================================
--- trunk/guix-test-gwt/LICENSE.txt (rev 0)
+++ trunk/guix-test-gwt/LICENSE.txt 2009-08-26 17:03:12 UTC (rev 1606)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/guix-test-swing/LICENSE.txt
===================================================================
--- trunk/guix-test-swing/LICENSE.txt (rev 0)
+++ trunk/guix-test-swing/LICENSE.txt 2009-08-26 17:03:12 UTC (rev 1606)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/maven-guix-gwt-archetype/LICENSE.txt
===================================================================
--- trunk/maven-guix-gwt-archetype/LICENSE.txt (rev 0)
+++ trunk/maven-guix-gwt-archetype/LICENSE.txt 2009-08-26 17:03:12 UTC (rev 1606)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/maven-guix-plugin/LICENSE.txt
===================================================================
--- trunk/maven-guix-plugin/LICENSE.txt (rev 0)
+++ trunk/maven-guix-plugin/LICENSE.txt 2009-08-26 17:03:12 UTC (rev 1606)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/maven-guix-swing-archetype/LICENSE.txt
===================================================================
--- trunk/maven-guix-swing-archetype/LICENSE.txt (rev 0)
+++ trunk/maven-guix-swing-archetype/LICENSE.txt 2009-08-26 17:03:12 UTC (rev 1606)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
1
0