org.eclipse.xtext.ui.editor.folding
Class DefaultFoldingRegionAcceptor
java.lang.Object
org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionAcceptor
- All Implemented Interfaces:
- IFoldingRegionAcceptor<ITextRegion>
public class DefaultFoldingRegionAcceptor
- extends java.lang.Object
- implements IFoldingRegionAcceptor<ITextRegion>
- Author:
- Michael Clay - Initial contribution and API, Sebastian Zarnekow - Introduced FoldedPosition
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultFoldingRegionAcceptor
public DefaultFoldingRegionAcceptor(IXtextDocument document,
java.util.Collection<FoldedPosition> result)
accept
public void accept(int offset,
int length,
ITextRegion significantRegion)
- Specified by:
accept
in interface IFoldingRegionAcceptor<ITextRegion>
- Parameters:
offset
- of the significant contentlength
- of the significant contentsignificantRegion
- used to compute the significant region.
accept
public void accept(int offset,
int length)
- Specified by:
accept
in interface IFoldingRegionAcceptor<ITextRegion>
getLineRegion
protected org.eclipse.jface.text.IRegion getLineRegion(int offset,
int length)
newFoldedPosition
protected FoldedPosition newFoldedPosition(org.eclipse.jface.text.IRegion region,
ITextRegion significantRegion)