java.lang.Object | +--com.ibm.lab.soln.resources.nature_builder.ReadmeVisitor
Processes an IResourceDelta
to find .readme files and
create stub .html files. Designed to be invoked as part of builder.
Source includes many System.out.println()
trace entries that have
been commented out. If you want to visualize the flow of build processing,
uncomment these statements before starting a test cycle.
IResourceDelta
,
IResourceDeltaVisitor
Constructor Summary | |
ReadmeVisitor()
|
Method Summary | |
java.io.InputStream |
getReadmeContent(org.eclipse.core.resources.IFile readmeFile)
Wraps the InputStream available for the IFile
resource with some HTML content. |
void |
processReadme(org.eclipse.core.resources.IResource resource,
org.eclipse.core.resources.IContainer container)
Implements processing for a given .readme resource. |
boolean |
visit(org.eclipse.core.resources.IResourceDelta delta)
Required implementation of the visit method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReadmeVisitor()
Method Detail |
public java.io.InputStream getReadmeContent(org.eclipse.core.resources.IFile readmeFile)
InputStream
available for the IFile
resource with some HTML content. Uses a simple approach, where a
ByteArrayInputStream
is used to convert a
StringBuffer
to a type of InputStream
that can be
joined with another using SequenceInputStream
.string
- public void processReadme(org.eclipse.core.resources.IResource resource, org.eclipse.core.resources.IContainer container)
The .html file creation is forced. This means the create will succeed even if a .html file with the same name exists on the file system but not in the workspace.
org.eclipse.core.resources.IContainer
- org.eclipse.core.resources.IResource
- public boolean visit(org.eclipse.core.resources.IResourceDelta delta) throws org.eclipse.core.runtime.CoreException
IResourceDelta
is
processed by providing it a visitor using the accept()
method
and using this method in the visitor to process any events of interest.
Processing continues as long as this method returns true or when the end
of the IResourceDelta
has been reached.visit
in interface org.eclipse.core.resources.IResourceDeltaVisitor