Class MaxLineWidthDocument
- java.lang.Object
-
- org.eclipse.xtext.formatting2.internal.FormattableDocument
-
- org.eclipse.xtext.formatting2.internal.SubDocument
-
- org.eclipse.xtext.formatting2.internal.MaxLineWidthDocument
-
- All Implemented Interfaces:
IFormattableDocument,IFormattableSubDocument,ICompositeTextReplacer,ITextReplacer
public class MaxLineWidthDocument extends SubDocument
-
-
Field Summary
-
Fields inherited from interface org.eclipse.xtext.formatting2.ITextReplacer
GET_REGION
-
-
Constructor Summary
Constructors Constructor Description MaxLineWidthDocument(ITextSegment region, FormattableDocument parent, int maxLineWidth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReplacer(ITextReplacer replacer)Add a new replacer to the document.ITextReplacerContextcreateReplacements(ITextReplacerContext context)Creates the real replacements for this region.protected voidvalidate(HiddenRegionReplacer replacer)protected voidvalidate(ITextReplacer replacer)-
Methods inherited from class org.eclipse.xtext.formatting2.internal.SubDocument
getFormatter, getRegion, getRequest, requireFitsInLine, requireFitsInLine, requireFitsInLine
-
Methods inherited from class org.eclipse.xtext.formatting2.internal.FormattableDocument
append, append, applyTextReplacements, createTextReplacerSet, format, formatConditionally, formatConditionally, getPreferences, getReplacers, getTextRegionAccess, interior, interior, interior, needsAutowrap, prepend, prepend, renderToTextReplacements, set, set, surround, surround, toString, withReplacerFilter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.formatting2.IFormattableDocument
append, append, format, formatConditionally, formatConditionally, interior, interior, interior, prepend, prepend, renderToTextReplacements, set, set, surround, surround, withReplacerFilter
-
-
-
-
Constructor Detail
-
MaxLineWidthDocument
public MaxLineWidthDocument(ITextSegment region, FormattableDocument parent, int maxLineWidth)
-
-
Method Detail
-
addReplacer
public void addReplacer(ITextReplacer replacer)
Description copied from interface:IFormattableDocumentAdd a new replacer to the document.- Specified by:
addReplacerin interfaceICompositeTextReplacer- Specified by:
addReplacerin interfaceIFormattableDocument- Overrides:
addReplacerin classFormattableDocument
-
createReplacements
public ITextReplacerContext createReplacements(ITextReplacerContext context)
Description copied from interface:ITextReplacerCreates the real replacements for this region. The given context may be altered and returned afterwards.- Specified by:
createReplacementsin interfaceITextReplacer- Overrides:
createReplacementsin classSubDocument
-
validate
protected void validate(HiddenRegionReplacer replacer) throws FormattingNotApplicableException
- Throws:
FormattingNotApplicableException
-
validate
protected void validate(ITextReplacer replacer) throws FormattingNotApplicableException
- Throws:
FormattingNotApplicableException
-
-