|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jet.taglib.UserRegionHelper
public final class UserRegionHelper
Utility class that allows implementation of user regions like <c:userRegion&;gt.
To consume this class, the document must include two regions, one nested inside the
other. Two static methods are used to mark these regions:
markUserRegion()
markInitialCode()
Method Summary | |
---|---|
void |
finalizeContent(JET2Writer writer,
java.lang.Object file)
Perform any finalization of the content in the writer. |
static void |
markInitialCode(JET2Writer out,
int initialCodeStart,
int initialCodeEnd)
Mark the initial code portion of the user region. |
static void |
markInitialCode(JET2Writer out,
int initialCodeStart,
int initialCodeEnd,
java.lang.String unmodifiedMarker)
Mark the initial code portion of the user region. |
static void |
markUserRegion(JET2Writer out,
int regionStart,
int regionEnd)
Mark the user region on the output writer |
void |
postCommitContent(JET2Writer writer,
java.lang.Object file)
Perform any post processing on the committed file based on content written. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void finalizeContent(JET2Writer writer, java.lang.Object file)
IWriterListener
finalizeContent
in interface IWriterListener
writer
- the writer in the process of being finalizedfile
- a handle to object to which the content will ultimately be written. The standard
JET2 Workspace tags pass an org.eclipse.core.resources.IFile, but other tags may pass objects
of other types.public void postCommitContent(JET2Writer writer, java.lang.Object file)
IWriterListener
postCommitContent
in interface IWriterListener
writer
- the writer that provided the committed content.file
- a handle to the object containing the comitted content. The standard
JET2 Workspace tags pass an org.eclipse.core.resources.IFile, but other tags may pass objects
of other types.public static void markInitialCode(JET2Writer out, int initialCodeStart, int initialCodeEnd, java.lang.String unmodifiedMarker)
out
- a JET2WriterinitialCodeStart
- the inclusive offset (zero-based) of the start of the region's initial code block (immediately after the start tag).initialCodeEnd
- the exclusive offset (zero-based) of the end of the region's initial code block (offset of the end tag).unmodifiedMarker
- if non-null, indicates a string, that if present in the documents initial code indicates the initial code is unmodifiedand may be replacedpublic static void markInitialCode(JET2Writer out, int initialCodeStart, int initialCodeEnd)
markInitialCode(out, initialCodeStart, initialCodeEnd, null)
.
out
- a JET2WriterinitialCodeStart
- the inclusive offset (zero-based) of the start of the region's initial code block (immediately after the start tag).initialCodeEnd
- the exclusive offset (zero-based) of the end of the region's initial code block (offset of the end tag).markInitialCode(JET2Writer, int, int, String)
public static void markUserRegion(JET2Writer out, int regionStart, int regionEnd)
out
- a JET2WriterregionStart
- the inclusive offset (zero-based) of the start of the region's content (immediately after the start tag).regionEnd
- the exclusive offset (zero-based) of the end of the region's content (offset of the end tag).
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |