Search in sources :

Example 1 with RichStringProcessor

use of org.eclipse.xtend.core.richstring.RichStringProcessor in project xtext-xtend by eclipse.

the class RichStringEvaluationTest method assertOutput.

@Override
public void assertOutput(String expectedOutput, String richString) throws Exception {
    RichString parsedString = richString(richString);
    StringBuilderBasedAcceptor acceptor = new StringBuilderBasedAcceptor();
    DefaultIndentationHandler handler = new DefaultIndentationHandler();
    RichStringProcessor processor = new RichStringProcessor();
    processor.process(parsedString, acceptor, handler);
    String actualOutput = acceptor.toString();
    assertEquals(richString, expectedOutput, actualOutput);
}
Also used : DefaultIndentationHandler(org.eclipse.xtend.core.richstring.DefaultIndentationHandler) RichStringProcessor(org.eclipse.xtend.core.richstring.RichStringProcessor) RichString(org.eclipse.xtend.core.xtend.RichString) RichString(org.eclipse.xtend.core.xtend.RichString)

Example 2 with RichStringProcessor

use of org.eclipse.xtend.core.richstring.RichStringProcessor in project xtext-xtend by eclipse.

the class RichStringProcessorTest method recordRichStringProcessorEvents.

protected String recordRichStringProcessorEvents(String string) throws Exception {
    RichString richString = richString(string);
    RichStringProcessor processor = new RichStringProcessor();
    RecordingRichStringPartAcceptor acceptor = new RecordingRichStringPartAcceptor();
    processor.process(richString, acceptor, new DefaultIndentationHandler());
    return acceptor.toString();
}
Also used : DefaultIndentationHandler(org.eclipse.xtend.core.richstring.DefaultIndentationHandler) RichStringProcessor(org.eclipse.xtend.core.richstring.RichStringProcessor) RichString(org.eclipse.xtend.core.xtend.RichString)

Example 3 with RichStringProcessor

use of org.eclipse.xtend.core.richstring.RichStringProcessor in project xtext-xtend by eclipse.

the class RichStringProcessorTest method doTestStackIsConsistent.

protected void doTestStackIsConsistent(RichString richString, IRichStringPartAcceptor acceptor) {
    StackChecker stackChecker = new StackChecker();
    RichStringProcessor processor = new RichStringProcessor();
    processor.process(richString, acceptor, stackChecker);
    stackChecker.done(acceptor);
}
Also used : RichStringProcessor(org.eclipse.xtend.core.richstring.RichStringProcessor)

Aggregations

RichStringProcessor (org.eclipse.xtend.core.richstring.RichStringProcessor)3 DefaultIndentationHandler (org.eclipse.xtend.core.richstring.DefaultIndentationHandler)2 RichString (org.eclipse.xtend.core.xtend.RichString)2