public abstract class AbstractFoldingBlock<B extends FoldingBlock> extends java.lang.Object implements FoldingBlock<B>
Constructor and Description |
---|
AbstractFoldingBlock() |
Modifier and Type | Method and Description |
---|---|
void |
add(B child)
Adds the specified child block to this source code block.
|
boolean |
bounds(int offset)
Returns whether the specified caret offset falls inside the bounds
of this source code block.
|
int |
getChildCount()
Returns the number of child blocks contained directly by this source
code block.
|
java.util.Iterator<B> |
getChildren()
Returns an iterator over the child blocks contained directly by this
source code block.
|
abstract int |
getEndOffset()
Returns the ending caret offset of this source code block.
|
B |
getParent()
Returns the block that contains this source code block.
|
abstract java.lang.String |
getReplacementText()
Returns the abbreviated text used to represent this source code
block in the code editor when the block is collapsed.
|
abstract int |
getStartOffset()
Returns the starting caret offset of this source code block.
|
boolean |
isExpanded()
Returns whether this source code block is expanded.
|
int |
length()
Returns the length in characters of this source code block.
|
void |
remove(B child)
Removes the specified child block from this source code block.
|
void |
removeAll()
Removes all child blocks from this source code block.
|
void |
setExpanded(boolean isExpanded)
Sets whether this source code block is expanded.
|
void |
setParent(B parent)
Sets the block that contains this source code block.
|
public boolean isExpanded()
FoldingBlock
isExpanded
in interface FoldingBlock<B extends FoldingBlock>
true
if the block is expandedpublic void setExpanded(boolean isExpanded)
FoldingBlock
setExpanded
in interface FoldingBlock<B extends FoldingBlock>
isExpanded
- true
if the block is expandedpublic B getParent()
FoldingBlock
getParent
in interface FoldingBlock<B extends FoldingBlock>
public void setParent(B parent)
FoldingBlock
setParent
in interface FoldingBlock<B extends FoldingBlock>
parent
- the containing blockpublic void add(B child)
FoldingBlock
add
in interface FoldingBlock<B extends FoldingBlock>
child
- the child block to addpublic void remove(B child)
FoldingBlock
remove
in interface FoldingBlock<B extends FoldingBlock>
child
- the child block to removepublic void removeAll()
FoldingBlock
removeAll
in interface FoldingBlock<B extends FoldingBlock>
public int getChildCount()
FoldingBlock
getChildCount
in interface FoldingBlock<B extends FoldingBlock>
public java.util.Iterator<B> getChildren()
FoldingBlock
getChildren
in interface FoldingBlock<B extends FoldingBlock>
public int length()
FoldingBlock
length
in interface FoldingBlock<B extends FoldingBlock>
public boolean bounds(int offset)
FoldingBlock
bounds
in interface FoldingBlock<B extends FoldingBlock>
offset
- the caret offset to testtrue
if the offset is inside the bounds of the
blockpublic abstract int getStartOffset()
FoldingBlock
getStartOffset
in interface FoldingBlock<B extends FoldingBlock>
public abstract int getEndOffset()
FoldingBlock
getEndOffset
in interface FoldingBlock<B extends FoldingBlock>
public abstract java.lang.String getReplacementText()
FoldingBlock
getReplacementText
in interface FoldingBlock<B extends FoldingBlock>