|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.javadocbuilder.Builder
Simple builder to generate content from @javadocs tags in the xdoclet style.
Field Summary | |
private com.thoughtworks.qdox.JavaDocBuilder |
builder
QDox parser |
private net.sf.javadocbuilder.BuilderConfiguration |
cfg
Configuration data for the builder |
private IResourceDelta |
delta
resouce delta when building incrementally |
private ILog |
elog
eclipse friendly logger |
private int |
filesWritten
Counter of written files in multiple output mode. |
private static net.sf.javadocbuilder.JavaHelper |
javaHelper
|
private static java.util.logging.Logger |
log
development logging |
private IProgressMonitor |
monitor
progress monitor for user feedback |
private IProject |
project
the project we are working with |
private com.thoughtworks.qdox.model.JavaSource[] |
source
qdox parsing results |
Fields inherited from interface net.sf.javadocbuilder.Constants |
ARG_CLASSNAME_FILTER_ENABLED, ARG_CLASSNAME_FILTER_PATTERN, ARG_CUSTOM_TEMPLATE_NAME, ARG_OUT_DIR, ARG_OUT_NAME_PATTERN, ARG_SINGLE_FILE, ARG_SOURCE_DIRECTORIES, ARG_TAG_FILTER_ENABLED, ARG_TAG_FILTER_NAME, ARG_TEMPLATE_NAME, CONFIGURATION_FILENAME |
Constructor Summary | |
Builder(IProject prj,
net.sf.javadocbuilder.BuilderConfiguration conf,
IResourceDelta d)
|
Method Summary | |
protected IProject[] |
build(int kind,
IProgressMonitor monitor)
|
private void |
buildFile(com.thoughtworks.qdox.model.JavaSource javaSrc)
Writes the content of a single file for multiple output mode. |
private void |
buildFull()
|
private void |
buildIncremental(IResourceDelta delta)
|
private void |
createParentsIfNeeded(IContainer cont)
Creates all neccesary parents for the given file |
private void |
doMultipleOutput()
perform the build when multiple output files are generated. |
private void |
doSingleOutput()
|
private com.thoughtworks.qdox.model.JavaSource |
getJavaSourceFor(IResource resource)
Gets the JavaSource for a given IResource or null if not found. |
private java.lang.String |
getOutputFilenameFor(com.thoughtworks.qdox.model.JavaSource src)
gets the output filename for the given java source. |
private IFile |
getOutputIFile(java.lang.String outName)
Gets the IFile for the filename |
private java.io.InputStream |
getTemplateInputStream()
gets an inputString with the configured template name. |
private boolean |
hasClassMatching(com.thoughtworks.qdox.model.JavaSource javaSrc)
Tells if there is at lease one class in JavaSource matching the pattern |
private boolean |
hasClassWithTag(com.thoughtworks.qdox.model.JavaSource src,
java.lang.String tagName)
Tells if the given Javasource has at least class with the specified tag. |
private com.thoughtworks.qdox.model.JavaSource[] |
parseJavaFiles()
Parse #sourceDirectories with qdox and return a JavaSource[] structure. |
private boolean |
passesFilters(com.thoughtworks.qdox.model.JavaSource javaSrc)
Tests the JavaSource againsts active filters. |
private java.lang.String |
runVelocity(com.thoughtworks.qdox.model.JavaSource src,
com.thoughtworks.qdox.model.JavaClass clazz)
|
private java.lang.String |
substituteVariables(com.thoughtworks.qdox.model.JavaSource src,
java.lang.String string)
Perform variable substitutions on the string for the given java source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private IProject project
private IProgressMonitor monitor
private com.thoughtworks.qdox.model.JavaSource[] source
private ILog elog
private static java.util.logging.Logger log
private com.thoughtworks.qdox.JavaDocBuilder builder
private net.sf.javadocbuilder.BuilderConfiguration cfg
private IResourceDelta delta
private int filesWritten
private static final net.sf.javadocbuilder.JavaHelper javaHelper
Constructor Detail |
public Builder(IProject prj, net.sf.javadocbuilder.BuilderConfiguration conf, IResourceDelta d)
Method Detail |
protected IProject[] build(int kind, IProgressMonitor monitor) throws java.lang.Exception
java.lang.Exception
private void buildIncremental(IResourceDelta delta) throws java.lang.Exception
java.lang.Exception
private com.thoughtworks.qdox.model.JavaSource getJavaSourceFor(IResource resource)
resource
-
private void buildFull() throws java.lang.Exception
java.lang.Exception
private void doSingleOutput() throws java.lang.Exception
java.lang.Exception
private void createParentsIfNeeded(IContainer cont) throws CoreException
CoreException
private IFile getOutputIFile(java.lang.String outName) throws CoreException
outName
-
CoreException
private void doMultipleOutput() throws java.lang.Exception
CoreException
java.lang.Exception
private boolean hasClassWithTag(com.thoughtworks.qdox.model.JavaSource src, java.lang.String tagName)
tagName
-
private com.thoughtworks.qdox.model.JavaSource[] parseJavaFiles()
#sourceDirectories
with qdox and return a JavaSource[] structure.
private void buildFile(com.thoughtworks.qdox.model.JavaSource javaSrc) throws java.lang.Exception
javaSrc
-
java.lang.Exception
- if an unexpected error occursprivate boolean passesFilters(com.thoughtworks.qdox.model.JavaSource javaSrc)
javaSrc
-
private boolean hasClassMatching(com.thoughtworks.qdox.model.JavaSource javaSrc)
javaSrc
-
private java.lang.String runVelocity(com.thoughtworks.qdox.model.JavaSource src, com.thoughtworks.qdox.model.JavaClass clazz) throws java.lang.Exception
java.lang.Exception
private java.io.InputStream getTemplateInputStream() throws java.io.IOException, CoreException
java.io.IOException
CoreException
private java.lang.String getOutputFilenameFor(com.thoughtworks.qdox.model.JavaSource src)
#outPattern
by performing the following subsitutions
and returning the resulting string:
src
- java source we are requesting an output name for
String
with the configured filenameprivate java.lang.String substituteVariables(com.thoughtworks.qdox.model.JavaSource src, java.lang.String string)
src
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |