Author: rich
Date: Sun Aug 15 21:00:48 2004
New Revision: 36442

Modified:
   
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
   
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowGenerator.java
   
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
   
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowGenerator.java
   
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenSharedFlowStrutsApp.java
   
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
Log:
Fixed to avoid building structures for XML generation during the checking phase 
of annotation processing.  This saves time, and prevents errors that occur when 
the document is invalid (in which case the checking phase produces diagnostics 
and terminates).

DRT: netui (WinXP)
buddy build: self



Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
   (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
   Sun Aug 15 21:00:48 2004
@@ -232,7 +232,7 @@
     protected GenStrutsApp createStrutsApp( File sourceFile, ClassDeclaration 
jclass )
         throws XmlException, IOException, NoWebInfDirectoryException
     {
-        return new GenStrutsApp( sourceFile, jclass, getEnv(), 
getFlowControllerInfo() );
+        return new GenStrutsApp( sourceFile, jclass, getEnv(), 
getFlowControllerInfo(), true );
     }
 
     protected AnnotationGrammar getControllerGrammar()

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowGenerator.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowGenerator.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowGenerator.java
 Sun Aug 15 21:00:48 2004
@@ -41,6 +41,6 @@
                  
         throws XmlException, IOException, NoWebInfDirectoryException
     {
-        return new GenStrutsApp( sourceFile, jclass, getEnv(), 
getFlowControllerInfo() );
+        return new GenStrutsApp( sourceFile, jclass, getEnv(), 
getFlowControllerInfo(), false );
     }
 }

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
 Sun Aug 15 21:00:48 2004
@@ -77,7 +77,7 @@
     protected GenStrutsApp createStrutsApp( File sourceFile, ClassDeclaration 
jclass )
         throws XmlException, IOException, NoWebInfDirectoryException
     {
-        return new GenSharedFlowStrutsApp( sourceFile, jclass, getEnv(), null 
);
+        return new GenSharedFlowStrutsApp( sourceFile, jclass, getEnv(), null, 
true );
     }
 
     protected AnnotationGrammar getControllerGrammar()

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowGenerator.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowGenerator.java
       (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowGenerator.java
       Sun Aug 15 21:00:48 2004
@@ -41,6 +41,6 @@
     protected GenStrutsApp createStrutsApp( File sourceFile, ClassDeclaration 
jclass )
             throws XmlException, IOException, NoWebInfDirectoryException
     {
-        return new GenSharedFlowStrutsApp( sourceFile, jclass, getEnv(), 
getFlowControllerInfo() );
+        return new GenSharedFlowStrutsApp( sourceFile, jclass, getEnv(), 
getFlowControllerInfo(), false );
     }
 }

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenSharedFlowStrutsApp.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenSharedFlowStrutsApp.java
   (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenSharedFlowStrutsApp.java
   Sun Aug 15 21:00:48 2004
@@ -34,10 +34,10 @@
     
     
     public GenSharedFlowStrutsApp( File sourceFile, ClassDeclaration jclass, 
AnnotationProcessorEnvironment env,
-                                   FlowControllerInfo fcInfo )
+                                   FlowControllerInfo fcInfo, boolean 
checkOnly )
             throws NoWebInfDirectoryException, XmlException, IOException
     {
-        super( sourceFile, jclass, env, fcInfo );
+        super( sourceFile, jclass, env, fcInfo, checkOnly );
         _isGlobalApp = GLOBALAPP_PACKAGE.equals( 
jclass.getPackage().getQualifiedName() ) 
                        && sourceFile.getName().startsWith( GLOBALAPP_CLASSNAME 
);
         recalculateStrutsConfigFile();  // it changes based on _isGlobalApp

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
     (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
     Sun Aug 15 21:00:48 2004
@@ -68,7 +68,7 @@
     }
     
     public GenStrutsApp( File sourceFile, ClassDeclaration jclass, 
AnnotationProcessorEnvironment env,
-                         FlowControllerInfo fcInfo )
+                         FlowControllerInfo fcInfo, boolean checkOnly )
         throws NoWebInfDirectoryException, XmlException, IOException
     {
         super( jclass.getQualifiedName() );
@@ -80,6 +80,8 @@
         _env = env;
         
         recalculateStrutsConfigFile();
+        
+        if ( checkOnly ) return;
         
         if ( _jclass != null )
         {

Reply via email to