Search in sources :

Example 1 with AbstractTraceRegionFSA

use of org.eclipse.xtend.core.tests.debug.AbstractTraceRegionFSA in project xtext-xtend by eclipse.

the class LineNumberMappingTests method getTraceRegion.

public AbstractTraceRegion getTraceRegion(final CharSequence xtendCode) {
    try {
        final XtendClass clazz = super.clazz(xtendCode.toString());
        final AbstractTraceRegionFSA fsa = new AbstractTraceRegionFSA();
        this.generator.doGenerate(clazz.eResource(), fsa);
        final AbstractTraceRegion result = ((ITraceRegionProvider) fsa.charSequence).getTraceRegion();
        this.print(result, fsa.charSequence.toString());
        return result;
    } catch (Throwable _e) {
        throw Exceptions.sneakyThrow(_e);
    }
}
Also used : AbstractTraceRegionFSA(org.eclipse.xtend.core.tests.debug.AbstractTraceRegionFSA) XtendClass(org.eclipse.xtend.core.xtend.XtendClass) AbstractTraceRegion(org.eclipse.xtext.generator.trace.AbstractTraceRegion) ITraceRegionProvider(org.eclipse.xtext.generator.trace.ITraceRegionProvider)

Aggregations

AbstractTraceRegionFSA (org.eclipse.xtend.core.tests.debug.AbstractTraceRegionFSA)1 XtendClass (org.eclipse.xtend.core.xtend.XtendClass)1 AbstractTraceRegion (org.eclipse.xtext.generator.trace.AbstractTraceRegion)1 ITraceRegionProvider (org.eclipse.xtext.generator.trace.ITraceRegionProvider)1