Class ConditionalReplacer
- java.lang.Object
-
- org.eclipse.xtext.formatting2.internal.AbstractTextReplacer
-
- org.eclipse.xtext.formatting2.internal.ConditionalReplacer
-
- All Implemented Interfaces:
ICompositeTextReplacer
,ITextReplacer
public class ConditionalReplacer extends AbstractTextReplacer implements ICompositeTextReplacer
-
-
Field Summary
-
Fields inherited from interface org.eclipse.xtext.formatting2.ITextReplacer
GET_REGION
-
-
Constructor Summary
Constructors Constructor Description ConditionalReplacer(FormattableDocument document, int offset, int length, java.util.List<ISubFormatter> subFormatters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReplacer(ITextReplacer replacer)
ITextReplacerContext
createReplacements(ITextReplacerContext context)
Creates the real replacements for this region.java.lang.String
toString()
-
Methods inherited from class org.eclipse.xtext.formatting2.internal.AbstractTextReplacer
getDocument, getRegion
-
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.ITextReplacer
getRegion
-
-
-
-
Constructor Detail
-
ConditionalReplacer
public ConditionalReplacer(FormattableDocument document, int offset, int length, java.util.List<ISubFormatter> subFormatters)
-
-
Method Detail
-
createReplacements
public ITextReplacerContext createReplacements(ITextReplacerContext context)
Description copied from interface:ITextReplacer
Creates the real replacements for this region. The given context may be altered and returned afterwards.- Specified by:
createReplacements
in interfaceITextReplacer
-
addReplacer
public void addReplacer(ITextReplacer replacer)
- Specified by:
addReplacer
in interfaceICompositeTextReplacer
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-