OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | fractal-commits List | November 2006 Index

<--  Date Index  --> <--  Thread Index  -->

CVS update of <fraclet-annotation> (9 files)


    Date: Friday, November 24, 2006 @ 17:00:59
  Author: pessemier
    Path: /cvsroot/fractal/fraclet/fraclet-annotation

   Added: spoon.xml
Modified: archive/spoon-annotation.xml build.xml examples/common/build.xml
          examples/common/etc/build.properties
          
src/org/objectweb/fractal/fraclet/annotation/generator/ComponentADLGenerator.java
          
          
src/org/objectweb/fractal/fraclet/annotation/generator/InterfaceADLGenerator.java
          
          
src/org/objectweb/fractal/fraclet/annotation/processor/ComponentProcessor.java
 Removed: 
src/org/objectweb/fractal/fraclet/annotation/processor/FractalAnnotationProcessor.java

adopt the spoonlet packaging


----------------------------------------------------------------------------------------+
 archive/spoon-annotation.xml                                                 
          |   13 --
 build.xml                                                                    
          |   13 +-
 examples/common/build.xml                                                    
          |   14 +-
 examples/common/etc/build.properties                                         
          |    2 
 spoon.xml                                                                    
          |   47 +++++++
 
src/org/objectweb/fractal/fraclet/annotation/generator/ComponentADLGenerator.java
      |   12 +-
 
src/org/objectweb/fractal/fraclet/annotation/generator/InterfaceADLGenerator.java
      |    4 
 
src/org/objectweb/fractal/fraclet/annotation/processor/ComponentProcessor.java
         |    2 
 
src/org/objectweb/fractal/fraclet/annotation/processor/FractalAnnotationProcessor.java
 |   59 ----------
 9 files changed, 75 insertions(+), 91 deletions(-)


Index: fraclet/fraclet-annotation/archive/spoon-annotation.xml
diff -u fraclet/fraclet-annotation/archive/spoon-annotation.xml:1.3 
fraclet/fraclet-annotation/archive/spoon-annotation.xml:1.4
--- fraclet/fraclet-annotation/archive/spoon-annotation.xml:1.3 Fri Apr 21 
15:34:05 2006
+++ fraclet/fraclet-annotation/archive/spoon-annotation.xml     Fri Nov 24 
17:00:59 2006
@@ -4,16 +4,9 @@
       <fileset dir="${out.build}">
         <include name="**/*.*"/>
       </fileset>
-    </jar>
-    <jar jarfile="${out.dist.lib}/fraclet-annotation-templates.jar" 
manifest="${archive}/spoon-annotation.mf">
-      <fileset dir="${out.build.templates}">
-        <include name="**/*.*"/>
-      </fileset>
-    </jar>
-    <jar jarfile="${out.dist.lib}/fraclet-annotation-annotations.jar" 
manifest="${archive}/spoon-annotation.mf">
-      <fileset dir="${out.build.annotations}">
-        <include name="**/*.*"/>
-      </fileset>
+      <fileset dir="${basedir}">
+         <include name="spoon.xml"/>
+       </fileset>      
     </jar>
   </target>
 </project>
Index: fraclet/fraclet-annotation/build.xml
diff -u fraclet/fraclet-annotation/build.xml:1.11 
fraclet/fraclet-annotation/build.xml:1.12
--- fraclet/fraclet-annotation/build.xml:1.11   Wed Sep  6 14:04:37 2006
+++ fraclet/fraclet-annotation/build.xml        Fri Nov 24 17:00:59 2006
@@ -103,6 +103,11 @@
                        </src>
                        <include name="**/*.java" />
                </javac>
+               <copy todir="${out.build}">
+                       <fileset dir="${src}">
+                               <include name="**/*.java" />
+                       </fileset>
+               </copy>
        </target>
        
        
@@ -116,12 +121,12 @@
        <target name="check processors" depends="init">
                <!-- define spoon Task -->
                <taskdef name="spoon" classname="spoon.SpoonTask" 
classpathref="classpath" />
-               <spoon classpathref="classpath" verbose="true">
-                       <processor 
type="spoon.aval.processing.CompletenessCheckerProcessor" />
+               <spoon classpathref="classpath" verbose="true" 
output="spooned"
+                       spoonlet="externals/spoon/AVal.jar">                  
  
                        <sourceset dir="${src}" includes="**/*.java" />
+                       <sourceset file="externals/spoon/AVal.jar" />
                </spoon>
-               <delete dir="${basedir}/spooned" />
-               
+               <delete dir="spooned" />
        </target>
 
 
Index: fraclet/fraclet-annotation/examples/common/build.xml
diff -u fraclet/fraclet-annotation/examples/common/build.xml:1.7 
fraclet/fraclet-annotation/examples/common/build.xml:1.8
--- fraclet/fraclet-annotation/examples/common/build.xml:1.7    Tue May 30 
15:37:58 2006
+++ fraclet/fraclet-annotation/examples/common/build.xml        Fri Nov 24 
17:00:59 2006
@@ -51,8 +51,6 @@
                </fileset>
                <pathelement location="${build}" />
        </path>
-       <!-- Define the spoon task -->
-       <taskdef name="fraclet-annotation" 
classname="org.objectweb.fractal.fraclet.annotation.ant.FracletAnnotation" 
classpathref="classpath" />
 
        <!-- ================================== -->
        <!--              EXECUTE               -->
@@ -77,17 +75,17 @@
                        <classpath refid="classpath" />
                        <include name="**/*.java" />
                </javac>
-
-
+               
+               <!-- define spoon Task -->
+               <taskdef name="spoon" classname="spoon.SpoonTask" 
classpathref="classpath" />
 
                <!-- Process the source code of the example -->
-               <fraclet-annotation classpathref="classpath"    
verbose="true" output="${gen.spooned}">
+               <spoon classpathref="classpath" verbose="true" 
output="${gen.spooned}"
+                       spoonlet="../../lib/fraclet-annotation.jar">          
          
                        <sourceset dir="${src}" includes="**/*.java" />
                        <sourceset file="../../externals/spoon/AVal.jar" />
                        <sourceset file="../../lib/fraclet-annotation.jar" />
-                       <sourceset 
file="../../lib/fraclet-annotation-annotations.jar" />
-                       <templateSet 
file="${basedir}/../../lib/fraclet-annotation-templates.jar" />
-               </fraclet-annotation>
+               </spoon>
 
                <javac srcdir="${gen.spooned}" destdir="${build}" 
source="1.5" classpathref="classpath" />
 
Index: fraclet/fraclet-annotation/examples/common/etc/build.properties
diff -u fraclet/fraclet-annotation/examples/common/etc/build.properties:1.7 
fraclet/fraclet-annotation/examples/common/etc/build.properties:1.8
--- fraclet/fraclet-annotation/examples/common/etc/build.properties:1.7 Fri 
Jun  2 10:29:03 2006
+++ fraclet/fraclet-annotation/examples/common/etc/build.properties     Fri 
Nov 24 17:00:59 2006
@@ -26,4 +26,4 @@
 # See http://fractal.objectweb.org
 
 spoon.dir ../../lib/
-spoon.path 
../../externals/spoon/spoon.jar:../../externals/spoon/AVal.jar:../../externals/spoon/javac.jar:../../externals/spoon/JSAP-2.0a.jar:../../externals/spoon/java-getopt-1.0.8.jar
\ No newline at end of file
+spoon.path 
../../externals/spoon/spoon.jar:../../externals/spoon/AVal.jar:../../externals/spoon/javac.jar:../../externals/spoon/JSAP-2.1.jar:../../externals/spoon/org.eclipse.jdt.core_3.3.0.v_708.jar:../../externals/spoon/java-getopt-1.0.8.jar
\ No newline at end of file
Index: fraclet/fraclet-annotation/spoon.xml
diff -u /dev/null fraclet/fraclet-annotation/spoon.xml:1.1
--- /dev/null   Fri Nov 24 17:01:00 2006
+++ fraclet/fraclet-annotation/spoon.xml        Fri Nov 24 17:00:59 2006
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<spoon>
+       <processor active="true" name="External Annotation Validator"
+               class="spoon.aval.processing.DummyPreProcessor"
+               doc="Preprocessor for the validation of annotations for which 
no source code is provided">
+               <property name="packs">
+                       <value>dummy</value>
+               </property>
+       </processor>
+       <processor active="true" name="AVal processor"
+               class="spoon.aval.processing.AValProcessor"
+               doc="Main validation processor">
+               <property name = "stopOnErrors" value="true"/>          
+       </processor>
+       <processor active="false" name="Completeness checker"
+               class="spoon.aval.processing.CompletenessCheckerProcessor"
+               doc="Processor that checks that all annotations defined are 
somehow     processed">
+               <property name="checkAll" value="true" />
+               <property name="skipAnnotationsIn">
+                       <value>java</value>
+                       <value>spoon.aval</value>
+               </property>
+       </processor>
+       <processor name="ComponentProcessor"
+               
class="org.objectweb.fractal.fraclet.annotation.processor.ComponentProcessor"
+               active="true" doc="Documentation of processor">
+       </processor>
+       <processor name="AttributeProcessor"
+               
class="org.objectweb.fractal.fraclet.annotation.processor.AttributeProcessor"
+               active="true" doc="Documentation of processor" />
+       <processor name="InterfaceProcessor"
+               
class="org.objectweb.fractal.fraclet.annotation.processor.InterfaceProcessor"
+               active="true" doc="Documentation of processor">
+       </processor>    
+       <processor name="MonologHandlerProcessor"
+               
class="org.objectweb.fractal.fraclet.annotation.processor.MonologHandlerProcessor"
+               active="true" doc="Documentation of processor" />
+       <processor name="MonologProcessor"
+               
class="org.objectweb.fractal.fraclet.annotation.processor.MonologProcessor"
+               active="true" doc="Documentation of processor" />
+       <processor name="ServiceProcessor"
+               
class="org.objectweb.fractal.fraclet.annotation.processor.ServiceProcessor"
+               active="true" doc="Documentation of processor" />
+       <template
+               
folder="org/objectweb/fractal/fraclet/annotation/generator/template" />
+</spoon>
Index: 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/ComponentADLGenerator.java
diff -u 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/ComponentADLGenerator.java:1.6
 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/ComponentADLGenerator.java:1.7
--- 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/ComponentADLGenerator.java:1.6
    Thu Jun 15 13:14:19 2006
+++ 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/ComponentADLGenerator.java
        Fri Nov 24 17:00:59 2006
@@ -84,14 +84,14 @@
                // Get Fractal server interfaces
                // -----------------------------------------------------
 
-               List<CtTypeReference> itfs = new ArrayList<CtTypeReference>();
-               for (CtTypeReference itf : 
processedClass.getSuperInterfaces()) {
+               List<CtTypeReference<?>> itfs = new 
ArrayList<CtTypeReference<?>>();
+               for (CtTypeReference<?> itf : 
processedClass.getSuperInterfaces()) {
                        Interface itfAnnotation = 
itf.getAnnotation(Interface.class);
                        if (itfAnnotation != null) {
                                itfs.add(itf);
                        }
                }
-               CtTypeReference superClass=processedClass.getSuperclass();
+               CtTypeReference<?> superClass=processedClass.getSuperclass();
                if (superClass!=null)
                if (superClass.getAnnotation(FractalComponent.class) != null)
                        itfs.add(superClass);
@@ -109,7 +109,7 @@
                        // if the field is not annotated continue
                        if (bindingAnnotation == null)
                                continue;
-                       Class c = bindingAnnotation.signature();
+                       Class<?> c = bindingAnnotation.signature();
                        if (c.equals(Class.class))
                                c = None.class;
                        ADLFileFactory
@@ -181,14 +181,14 @@
                }
        }
 
-       private void printBeginDefinition(List<CtTypeReference> itfs,
+       private void printBeginDefinition(List<CtTypeReference<?>> itfs,
                        String arguments) {
                /* @Todo manage the arguments= option */
                if (arguments != "")
                        arguments = "arguments=\"" + arguments + "\"";
                if (itfs.size() > 0) {
                        String extendedADLFiles = "";
-                       for (CtTypeReference itf : itfs) {
+                       for (CtTypeReference<?> itf : itfs) {
                                extendedADLFiles += itf + ",";
 
                        }
Index: 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/InterfaceADLGenerator.java
diff -u 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/InterfaceADLGenerator.java:1.2
 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/InterfaceADLGenerator.java:1.3
--- 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/InterfaceADLGenerator.java:1.2
    Sun May 28 15:15:14 2006
+++ 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/generator/InterfaceADLGenerator.java
        Fri Nov 24 17:00:59 2006
@@ -21,9 +21,9 @@
 
        private Interface annotation;
 
-       private CtSimpleType itf;
+       private CtSimpleType<?> itf;
        
-       public InterfaceADLGenerator(Interface itfAnnotation, CtSimpleType 
processedItf) {
+       public InterfaceADLGenerator(Interface itfAnnotation, CtSimpleType<?> 
processedItf) {
                this.annotation = itfAnnotation;
                this.itf = processedItf;
                // -----------------------------------------------------
Index: 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/ComponentProcessor.java
diff -u 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/ComponentProcessor.java:1.3
 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/ComponentProcessor.java:1.4
--- 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/ComponentProcessor.java:1.3
       Fri Oct 27 16:09:33 2006
+++ 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/ComponentProcessor.java
   Fri Nov 24 17:00:59 2006
@@ -82,7 +82,7 @@
 
                boolean start = false, stop = false;
 
-               CtMethod startM = null, stopM = null;
+               CtMethod<?> startM = null, stopM = null;
 
                for (CtElement elt : elts) {
                        LifeCycle annot = elt.getAnnotation(LifeCycle.class);
Index: 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/FractalAnnotationProcessor.java
diff -u 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/FractalAnnotationProcessor.java:1.10
 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/FractalAnnotationProcessor.java:removed
--- 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/FractalAnnotationProcessor.java:1.10
      Fri Oct 27 16:09:33 2006
+++ 
fraclet/fraclet-annotation/src/org/objectweb/fractal/fraclet/annotation/processor/FractalAnnotationProcessor.java
   Fri Nov 24 17:01:00 2006
@@ -1,59 +0,0 @@
-/*==============================================================================
- Fraclet annotation - Copyright (C) 2002-2006 INRIA Futurs / LIFL
- Fractal Component Model (contact: fractal@xxxxxxxxxxxxx)
-
- This library is free software; you can redistribute it and/or modify it 
under 
- the terms of the GNU Lesser General Public License as published by the Free 
- Software Foundation; either version 2.1 of the License, or any later 
version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT 
ANY 
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A 
- PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more 
details.
-
- You should have received a copy of the GNU Lesser General Public License 
along 
- with this library; if not, write to the Free Software Foundation, Inc., 
- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-
- Initial developer(s): Nicolas Pessemier (nicolas.pessemier@xxxxxxx)
- Contributor(s): Renaud Pawlak (renaud.pawlak@xxxxxxx)
- 
==============================================================================*/
-package org.objectweb.fractal.fraclet.annotation.processor;
-
-import spoon.aval.processing.AValProcessor;
-import spoon.processing.AbstractProcessor;
-import spoon.processing.ProcessingManager;
-import spoon.reflect.declaration.CtClass;
-
-/**
- * An annotation processor to manage the @FractalComponent and @DisableADL 
annotations.
- *
- * @author  Nicolas Pessemier <Nicolas.Pessemier@xxxxxxx>
- *
- */
-public class FractalAnnotationProcessor extends AbstractProcessor<CtClass> {
-
-
-    public boolean isToBeProcessed(CtClass ct) {
-        return true;
-    }
-    
-    private boolean first = true;
-
-    public void process(CtClass ct) {
-        if(first) {
-            ProcessingManager pf = getManager();
-            pf.addProcessor( new AValProcessor() );
-            pf.addProcessor( new ComponentProcessor() );
-            pf.addProcessor( new AttributeProcessor() );
-            pf.addProcessor( new InterfaceProcessor() );
-            pf.addProcessor( new MonologHandlerProcessor() );
-            pf.addProcessor( new MonologProcessor() );
-            pf.addProcessor( new ServiceProcessor() );
-//            pf.addProcessor( new LifeCycleProcessor() );
-            first = false;
-        }
-    }
-    
-}
-
-



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.