User: vharcq
Date: 02/05/02 15:14:50
Modified: core/src/xdoclet Tag: MODULE_REFACTORING_BRANCH
DocletTask.java
Log:
In verbose mode you can now see the Subtask and tagHandlers that have been added
Do not findModules on every subtask but only once
Revision Changes Path
No revision
No revision
1.39.2.5 +8 -3 xdoclet/core/src/xdoclet/DocletTask.java
Index: DocletTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/DocletTask.java,v
retrieving revision 1.39.2.4
retrieving revision 1.39.2.5
diff -u -w -r1.39.2.4 -r1.39.2.5
--- DocletTask.java 2 May 2002 19:48:38 -0000 1.39.2.4
+++ DocletTask.java 2 May 2002 22:14:50 -0000 1.39.2.5
@@ -48,7 +48,7 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created June 19, 2001
- * @version $Revision: 1.39.2.4 $
+ * @version $Revision: 1.39.2.5 $
*/
public class DocletTask extends XJavadocTask implements DynamicConfigurator
{
@@ -66,6 +66,8 @@
private final static File DEFAULT_TMP_FILE = new File( System.getProperty(
"java.io.tmpdir" ), _fileName );
private static File _tmpFile = DEFAULT_TMP_FILE;
+
+ private static boolean moduleRegistered = false;
protected transient DocletContext context = null;
private final Map subtaskClassNameMap = new HashMap();
private List modules = null;
@@ -82,6 +84,7 @@
public DocletTask() throws BuildException
{
setClassname( "xdoclet.XDocletMain" );
+ super.setFork( false );
}
/**
@@ -235,10 +238,9 @@
registerModules( modules );
}
-
public Object createDynamicElement( String name )
{
- if( !moduleDirsSpecified )
+ if( !moduleDirsSpecified && !moduleRegistered)
{
File antJarDir = ModuleFinder.getAntJar().getParentFile();
@@ -247,6 +249,7 @@
List modules = ModuleFinder.findModules( new File[]{antJarDir}
);
registerModules( modules );
+ moduleRegistered = true;
}
String className = ( String ) subtaskClassNameMap.get( name );
@@ -498,6 +501,7 @@
{
TemplateTagHandler handler = (
TemplateTagHandler ) Class.forName( thd.className ).newInstance();
+ log( "Add tagHandler " + thd.namespace + "(" +
thd.className + ")", Project.MSG_VERBOSE );
TemplateEngine.getEngineInstance().setTagHandlerFor( thd.namespace, handler );
}
catch( TemplateException e )
@@ -520,6 +524,7 @@
if( getClass().getName().equals( std.parentTaskClass )
)
{
+ log( "Add SubTask " + std.name + "(" +
std.implementationClass + ")", Project.MSG_VERBOSE );
subtaskClassNameMap.put( std.name,
std.implementationClass );
}
}
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel