|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.codegen.merge.java.facade.ast.ASTJCompilationUnit.NodeCommenter.LineBreakInserter
protected class ASTJCompilationUnit.NodeCommenter.LineBreakInserter
Class that inserts extra line breaks between nodes when nodes are being commented out.
createLineBreakBeforeNode(ITrackedNodePosition, ASTNode),
createLineBreakAfterNode(ITrackedNodePosition, ASTNode)| Field Summary | |
|---|---|
protected char[] |
charContent
|
| Constructor Summary | |
|---|---|
protected |
ASTJCompilationUnit.NodeCommenter.LineBreakInserter()
|
| Method Summary | |
|---|---|
protected InsertEdit |
createLineBreakAfterNode(org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition nodePosition,
org.eclipse.jdt.core.dom.ASTNode node)
Creates line break at the end of the node when there is another node declared at the same line. |
protected InsertEdit |
createLineBreakBeforeNode(org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition nodePosition,
org.eclipse.jdt.core.dom.ASTNode node)
Creates line break at the beginning of the node when there is another node declared at the same line. |
protected java.lang.String |
createLineBreakString(int startOfLineOffset,
boolean isCommentedOut)
Creates line break string containing line delimiter, line comment string if isCommentedOut is true,
and same indent string as the line that break is inserted at. |
protected java.lang.String |
createLineBreakString(java.lang.String lineDelimiter,
int startOfLineOffset,
boolean isCommentedOut)
Creates line break string containing line delimiter, line comment string if isCommentedOut is true,
and indent string that is the same as of the line that break is inserted at. |
protected IDocument |
getDocument()
|
protected java.lang.String |
getIndent(int lineStart)
|
protected boolean |
isWhitespace(int start,
int end)
Determines if there are only whitespace characters in the given range in char array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected char[] charContent
| Constructor Detail |
|---|
protected ASTJCompilationUnit.NodeCommenter.LineBreakInserter()
| Method Detail |
|---|
protected IDocument getDocument()
protected InsertEdit createLineBreakBeforeNode(org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition nodePosition,
org.eclipse.jdt.core.dom.ASTNode node)
throws BadLocationException
nodePosition - node -
InsertEdit or null if none required
BadLocationException
protected InsertEdit createLineBreakAfterNode(org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition nodePosition,
org.eclipse.jdt.core.dom.ASTNode node)
throws BadLocationException
nodePosition - node -
InsertEdit or null if none required
BadLocationExceptionprotected java.lang.String getIndent(int lineStart)
lineStart - the first character of the line excluding CR or LF characters.
lineStart, empty string if there is no indent or lineStart is invalid positionIndentManipulation.isIndentChar(char)
protected boolean isWhitespace(int start,
int end)
start - end -
true if only whitespace characters are between start and endCharacter.isWhitespace(char)
protected java.lang.String createLineBreakString(int startOfLineOffset,
boolean isCommentedOut)
throws BadLocationException
isCommentedOut is true,
and same indent string as the line that break is inserted at.
startOfLineOffset - isCommentedOut -
BadLocationException
protected java.lang.String createLineBreakString(java.lang.String lineDelimiter,
int startOfLineOffset,
boolean isCommentedOut)
isCommentedOut is true,
and indent string that is the same as of the line that break is inserted at.
lineDelimiter - startOfLineOffset - isCommentedOut -
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||