public class DefaultFoldingRegionProvider extends Object implements IFoldingRegionProvider
| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
TEXT_PATTERN_IN_COMMENT |
| Constructor and Description |
|---|
DefaultFoldingRegionProvider() |
DefaultFoldingRegionProvider(ILocationInFileProvider locationInFileProvider)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeCommentFolding(IXtextDocument xtextDocument,
IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor) |
protected void |
computeCommentFolding(IXtextDocument xtextDocument,
IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor,
org.eclipse.jface.text.ITypedRegion typedRegion,
boolean initiallyFolded) |
protected void |
computeObjectFolding(org.eclipse.emf.ecore.EObject eObject,
IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor) |
protected void |
computeObjectFolding(org.eclipse.emf.ecore.EObject eObject,
IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor,
boolean initiallyFolded) |
protected void |
computeObjectFolding(XtextResource xtextResource,
IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor) |
protected IFoldingRegionAcceptor<ITextRegion> |
createAcceptor(IXtextDocument xtextDocument,
Collection<FoldedPosition> foldedPositions) |
protected Collection<FoldedPosition> |
doGetFoldingRegions(IXtextDocument xtextDocument,
XtextResource xtextResource)
Compute the folding region.
|
Collection<FoldedPosition> |
getFoldingRegions(IXtextDocument xtextDocument) |
protected ILocationInFileProvider |
getLocationInFileProvider() |
protected Pattern |
getTextPatternInComment() |
protected boolean |
isHandled(org.eclipse.emf.ecore.EObject eObject) |
protected boolean |
shouldProcessContent(org.eclipse.emf.ecore.EObject object) |
protected static final Pattern TEXT_PATTERN_IN_COMMENT
@Deprecated public DefaultFoldingRegionProvider(ILocationInFileProvider locationInFileProvider)
@Inject public DefaultFoldingRegionProvider()
public Collection<FoldedPosition> getFoldingRegions(IXtextDocument xtextDocument)
getFoldingRegions in interface IFoldingRegionProviderFoldedPosition for the given documentprotected Collection<FoldedPosition> doGetFoldingRegions(IXtextDocument xtextDocument, XtextResource xtextResource)
IUnitOfWork so it's save to use the
given resource. However, since this is a blocking action when opening editors in e4, implementors
should be careful to not resolve too many cross references. Users of the DerivedStateAwareResource
should consider to access the resource via getParseResult().getRootAstElement()
rather than getContents().get(0).protected IFoldingRegionAcceptor<ITextRegion> createAcceptor(IXtextDocument xtextDocument, Collection<FoldedPosition> foldedPositions)
protected void computeObjectFolding(XtextResource xtextResource, IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor)
protected ILocationInFileProvider getLocationInFileProvider()
protected void computeObjectFolding(org.eclipse.emf.ecore.EObject eObject,
IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor)
protected void computeObjectFolding(org.eclipse.emf.ecore.EObject eObject,
IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor,
boolean initiallyFolded)
protected void computeCommentFolding(IXtextDocument xtextDocument, IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor)
protected void computeCommentFolding(IXtextDocument xtextDocument, IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor, org.eclipse.jface.text.ITypedRegion typedRegion, boolean initiallyFolded) throws org.eclipse.jface.text.BadLocationException
org.eclipse.jface.text.BadLocationExceptionprotected Pattern getTextPatternInComment()
protected boolean isHandled(org.eclipse.emf.ecore.EObject eObject)
true if the object should be folded if it spans more than one line.
Default is false if and only if the object is the root object of the resource.protected boolean shouldProcessContent(org.eclipse.emf.ecore.EObject object)
false to abort the traversal of the model.Copyright © 2016. All Rights Reserved.