You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2006/02/17 20:32:36 UTC
svn commit: r378607 - in /beehive/trunk/netui/src:
compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/
compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/
compiler-xdoclet/org/apache/beehi...
Author: rich
Date: Fri Feb 17 11:32:36 2006
New Revision: 378607
URL: http://svn.apache.org/viewcvs?rev=378607&view=rev
Log:
Getting some old JDK1.4 fixes off my old machine. These don't affect shipping code.
Modified:
beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/AnnotationInterfaceParser.java
beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/DeclarationImpl.java
beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/CoreAnnotationProcessorEnvImpl.java
beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/FilerImpl.java
beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java
beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiSubTask.java
beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java
beehive/trunk/netui/src/pageflow-jdk14/build.xml
Modified: beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/AnnotationInterfaceParser.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/AnnotationInterfaceParser.java?rev=378607&r1=378606&r2=378607&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/AnnotationInterfaceParser.java (original)
+++ beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/AnnotationInterfaceParser.java Fri Feb 17 11:32:36 2006
@@ -156,7 +156,7 @@
readAnnotation( tok, interfaceQualifier, packageName, enums );
_annotations.put( ann.getIntermediateName(), ann );
- /* TODO: re-add in DeclarationImpl
+ // TODO: move to DeclarationImpl
//
// Special case:
// validationErrorForward=@Jpf.Forward(...)
@@ -167,12 +167,11 @@
if ( ann.getSimpleName().equals( FORWARD_TAG_NAME ) )
{
AnnotationTypeDeclarationImpl validationErrorForwardAnn =
- new AnnotationTypeDeclarationImpl( ann, VALIDATION_ERROR_FORWARD_TAG_NAME,
+ new AnnotationTypeDeclarationImpl( ann, DeclarationImpl.VALIDATION_ERROR_FORWARD_TAG_NAME,
interfaceQualifier );
- _annotations.put( ANNOTATION_INTERFACE_PREFIX + VALIDATION_ERROR_FORWARD_TAG_NAME,
+ _annotations.put( ANNOTATION_INTERFACE_PREFIX + DeclarationImpl.VALIDATION_ERROR_FORWARD_TAG_NAME,
validationErrorForwardAnn );
}
- */
}
else if ( str.equals( "enum" ) )
{
Modified: beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/DeclarationImpl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/DeclarationImpl.java?rev=378607&r1=378606&r2=378607&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/DeclarationImpl.java (original)
+++ beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/declaration/DeclarationImpl.java Fri Feb 17 11:32:36 2006
@@ -52,7 +52,7 @@
extends DelegatingImpl
implements Declaration, JpfLanguageConstants
{
- private static final String VALIDATION_ERROR_FORWARD_TAG_NAME = "ValidationErrorForward";
+ static final String VALIDATION_ERROR_FORWARD_TAG_NAME = "ValidationErrorForward";
private static final HashMap MODIFIERS = new HashMap();
private static AnnotationInterfaceParser _annotationInterfaceParser =
new AnnotationInterfaceParser(ANNOTATION_INTERFACE_PREFIX);
Modified: beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/CoreAnnotationProcessorEnvImpl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/CoreAnnotationProcessorEnvImpl.java?rev=378607&r1=378606&r2=378607&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/CoreAnnotationProcessorEnvImpl.java (original)
+++ beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/CoreAnnotationProcessorEnvImpl.java Fri Feb 17 11:32:36 2006
@@ -35,6 +35,7 @@
import java.util.Map;
import java.util.HashMap;
+import java.util.Collections;
public class CoreAnnotationProcessorEnvImpl
extends DelegatingImpl
@@ -45,12 +46,19 @@
private NetuiSubTask _subtask;
private SourceClass _sourceClass;
private HashMap _attributes;
+ private Map _options;
+ private Filer _filer;
protected CoreAnnotationProcessorEnvImpl( DocletContext delegate, NetuiSubTask subtask, SourceClass sourceClass )
{
super( delegate );
_subtask = subtask;
_sourceClass = sourceClass;
+ _filer = new FilerImpl( delegate.getDestDir() );
+ _options = new HashMap();
+ _options.put("-Aweb.content.root=" + subtask.getWebContentDir(), null);
+ _options.put("-sourcepath=" + subtask.getSourcePath(), null);
+ _options = Collections.unmodifiableMap(_options);
}
public static CoreAnnotationProcessorEnv get( DocletContext delegate, NetuiSubTask subtask, SourceClass sc )
@@ -60,7 +68,7 @@
public Map getOptions()
{
- return getDelegateDocletContext().getProperties();
+ return _options;
}
public Messager getMessager()
@@ -70,8 +78,7 @@
public Filer getFiler()
{
- assert false : "NYI";
- throw new UnsupportedOperationException( "not implemented" );
+ return _filer;
}
public TypeDeclaration[] getSpecifiedTypeDeclarations()
Modified: beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/FilerImpl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/FilerImpl.java?rev=378607&r1=378606&r2=378607&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/FilerImpl.java (original)
+++ beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/compiler/xdoclet/typesystem/impl/env/FilerImpl.java Fri Feb 17 11:32:36 2006
@@ -20,12 +20,21 @@
import org.apache.beehive.netui.compiler.typesystem.env.Filer;
import java.io.PrintWriter;
+import java.io.FileWriter;
import java.io.File;
import java.io.IOException;
public class FilerImpl implements Filer {
+ private File _destDir;
+
+ public FilerImpl(String destDirPath) {
+ _destDir = new File(destDirPath);
+ }
+
public PrintWriter createTextFile(File file) throws IOException {
- return null;
+ File outputFile = new File(_destDir, file.getPath());
+ outputFile.getParentFile().mkdirs();
+ return new PrintWriter(new FileWriter(outputFile));
}
}
Modified: beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java?rev=378607&r1=378606&r2=378607&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java (original)
+++ beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java Fri Feb 17 11:32:36 2006
@@ -3,6 +3,8 @@
import org.apache.beehive.netui.compiler.typesystem.util.SourcePosition;
import org.apache.tools.ant.BuildException;
import xdoclet.DocletTask;
+import xdoclet.SubTask;
+import xdoclet.DocletContext;
import java.io.File;
import java.util.ArrayList;
@@ -19,8 +21,8 @@
{
private static HashMap _buildMessages = new HashMap(); // String filename -> List messages
- private static File _webappRoot = null;
-
+ private File _webContentDir;
+ private String _sourcePath;
/**
@@ -29,15 +31,36 @@
*/
protected void start() throws BuildException
{
+ File destDir = getDestDir();
+ if (destDir == null || destDir.getPath().equals("bogus")) {
+ throw new BuildException("destdir is required");
+ }
+
+ if (_webContentDir == null) {
+ throw new BuildException("webcontentdir is required");
+ }
+
+ if (_sourcePath == null) {
+ throw new BuildException("sourcepath is required");
+ }
+
try
{
- assert _webappRoot != null; // should have been set in the ant task
+ SubTask[] subtasks = DocletContext.getInstance().getSubTasks();
+ for (int i = 0; i < subtasks.length; i++) {
+ SubTask subTask = subtasks[i];
+ if (subTask != null) {
+ assert subTask instanceof NetuiSubTask : subTask.getClass().getName();
+ NetuiSubTask netuiSubTask = (NetuiSubTask) subTask;
+ netuiSubTask.setWebContentDir(_webContentDir.getPath());
+ netuiSubTask.setSourcePath(_sourcePath);
+ }
+ }
+
super.start();
}
finally
{
- _webappRoot = null;
-
// list any warnings and errors
boolean overallError = false;
if ( _buildMessages != null )
@@ -182,14 +205,13 @@
super.validateOptions();
}
- public void setWebappRoot( File file )
+ public void setWebcontentdir( File file )
{
- _webappRoot = file;
+ _webContentDir = file;
}
- public static File getWebappRoot()
+ public void setSourcepath(String sourcePath)
{
- return _webappRoot;
+ _sourcePath = sourcePath;
}
-
}
Modified: beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiSubTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiSubTask.java?rev=378607&r1=378606&r2=378607&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiSubTask.java (original)
+++ beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiSubTask.java Fri Feb 17 11:32:36 2006
@@ -23,6 +23,8 @@
public class NetuiSubTask extends SubTask
{
private SourceClass _currentSourceClass;
+ private String _webContentDir;
+ private String _sourcePath;
/**
* Main entry point for xjavadoc tasks. Here we iterate through all the classes found by
@@ -86,5 +88,25 @@
public SourceClass getCurrentSourceClass()
{
return _currentSourceClass;
+ }
+
+ public void setWebContentDir(String webContentDir)
+ {
+ _webContentDir = webContentDir;
+ }
+
+ public String getWebContentDir()
+ {
+ return _webContentDir;
+ }
+
+ public void setSourcePath(String sourcePath)
+ {
+ _sourcePath = sourcePath;
+ }
+
+ public String getSourcePath()
+ {
+ return _sourcePath;
}
}
Modified: beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java?rev=378607&r1=378606&r2=378607&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java (original)
+++ beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java Fri Feb 17 11:32:36 2006
@@ -80,6 +80,8 @@
{
return getXClass( typeName.substring( 0, lastDot ) + '$' + typeName.substring( lastDot + 1 ), xJavaDoc );
}
+
+ return null;
}
return type;
Modified: beehive/trunk/netui/src/pageflow-jdk14/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow-jdk14/build.xml?rev=378607&r1=378606&r2=378607&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow-jdk14/build.xml (original)
+++ beehive/trunk/netui/src/pageflow-jdk14/build.xml Fri Feb 17 11:32:36 2006
@@ -55,6 +55,21 @@
<!-- Update the jar with all the other classes (etc.) from beehive-netui-pageflow.jar -->
<jar
jarfile="${jars.dir}/beehive-netui-pageflow-jdk14.jar"
+ basedir="${classes.dir}/util"
+ update="true"
+ duplicate="fail"/>
+ <jar
+ jarfile="${jars.dir}/beehive-netui-pageflow-jdk14.jar"
+ basedir="${classes.dir}/scoping"
+ update="true"
+ duplicate="fail"/>
+ <jar
+ jarfile="${jars.dir}/beehive-netui-pageflow-jdk14.jar"
+ basedir="${classes.dir}/core"
+ update="true"
+ duplicate="fail"/>
+ <jar
+ jarfile="${jars.dir}/beehive-netui-pageflow-jdk14.jar"
basedir="${classes.dir}/pageflow"
update="true"
duplicate="fail"