com.borland.jbuilder.jot
Interface JotCommentable

All Superinterfaces:
JotMarker
All Known Subinterfaces:
JotAnonymousClass, JotClassSource, JotCodeBlock, JotInitBlock, JotInnerClass, JotSourceFile

public interface JotCommentable
extends JotMarker

This interface specifies methods for adding, removing, and accessing comments in Java source. It is implemented by JotClassSource and JotCodeBlock.

See Also:
JotComment

Method Summary
 void addBlankLine(JotMarker marker, boolean before)
          Adds a blank line to the source immediately before or after the specified marker.
 JotComment addComment(JotMarker marker, boolean before, int type, java.lang.String text)
          Adds the specified comment text to the source.
 JotComment getComment(JotMarker marker, boolean before)
          Gets the JotComment object that is immediately before or after the specified marker.
 void removeComment(JotComment comment)
          Removes the specified JotComment object from the source.
 
Methods inherited from interface com.borland.jbuilder.jot.JotMarker
addUserData, getEndPosition, getStartPosition, getUserData
 

Method Detail

addComment

public JotComment addComment(JotMarker marker,
                             boolean before,
                             int type,
                             java.lang.String text)
Adds the specified comment text to the source. The appropriate comment delimiters for the type will be added to the text. If the text contains newline characters and the type is BLOCK or DOC, then each line will be preceded by a '*'. If marker is non-null then the comment is inserted either before or after the marker depending on the value of before.

Parameters:
marker - the Jot object relative to which the comment is being added
before - controls where, relative to the marker, the comment will be added. true places the comment before the marker.
type - is the one of static JotComment instance variables that control comment type.
text - is the body of the comment

removeComment

public void removeComment(JotComment comment)
Removes the specified JotComment object from the source. Does noting if the comment is not present.

getComment

public JotComment getComment(JotMarker marker,
                             boolean before)
Gets the JotComment object that is immediately before or after the specified marker.

Parameters:
marker - the Jot object relative to which the comment sought
before - controls where, relative to the marker, the comment will be sought true looks for the comment before the marker.

addBlankLine

public void addBlankLine(JotMarker marker,
                         boolean before)
Adds a blank line to the source immediately before or after the specified marker.

Parameters:
marker - the Jot object relative to which the comment is being added
before - controls where, relative to the marker, the comment will be added. true places the comment before the marker.