protected void pushAppendable(EObject traceInfo) { appendableStack.add(appendable); appendable = appendable.trace(traceInfo); }
@Override public void exec(ITreeAppendable appendable) { appendable = appendable.trace(obj, true); internalToConvertedExpression(obj, appendable); } });
@Override public void exec(ITreeAppendable appendable) { appendable = appendable.trace(obj, true); internalToConvertedExpression(obj, appendable); } });
@Override public void exec(ITreeAppendable appendable) { appendable = appendable.trace(obj, true); internalToConvertedExpression(obj, appendable); } });
@Override public ITreeAppendable trace(EObject object) { return createDelegateToChild(this.delegate.trace(object)); }
@Override public ITreeAppendable trace(ILocationData location, boolean useForDebugging) { return createDelegateToChild(this.delegate.trace(location, useForDebugging)); }
@Override public ITreeAppendable trace(EObject object, EStructuralFeature feature, int indexInList) { return createDelegateToChild(this.delegate.trace(object, feature, indexInList)); }
@Override public void exec(ITreeAppendable appendable) { appendable = appendable.trace(obj, true); internalToConvertedExpression(obj, appendable); } });
protected void setCurrentAppendable(/* @Nullable */ RichStringLiteral origin) { if (currentAppendable == null && origin != null) { ITextRegionWithLineInformation region = (ITextRegionWithLineInformation) getLocationInFileProvider().getSignificantTextRegion(origin, XbasePackage.Literals.XSTRING_LITERAL__VALUE, 0); currentAppendable = appendable.trace(new LocationData(region, null), true); } }
protected void _toJavaExpression(XConstructorCall expr, ITreeAppendable b) { String varName = getReferenceName(expr, b); if (varName != null) { b.trace(expr, false).append(varName); } else { constructorCallToJavaExpression(expr, b); } }
public void generateTypeParameterDeclaration(final JvmTypeParameter it, final ITreeAppendable appendable, final GeneratorConfig config) { final ITreeAppendable tracedAppendable = appendable.trace(it); this._treeAppendableUtil.traceSignificant(tracedAppendable, it).append(it.getName()); this.generateTypeParameterConstraints(it, tracedAppendable, config); }
public void generateMethodBody(final TestCase test, final ITreeAppendable output) { final Function1<SpecificationStepImplementation, EList<TestStepContext>> _function = (SpecificationStepImplementation it) -> { return it.getContexts(); }; final Procedure1<ITreeAppendable> _function_1 = (ITreeAppendable it) -> { final Consumer<SpecificationStepImplementation> _function_2 = (SpecificationStepImplementation it_1) -> { this.generate(it_1, output.trace(it_1)); }; test.getSteps().forEach(_function_2); }; this.wrapTestWithAssertionErrorHandler(output, Iterables.<TestStepContext>concat(ListExtensions.<SpecificationStepImplementation, EList<TestStepContext>>map(test.getSteps(), _function)), _function_1); }
private void _generateContext(final MacroTestStepContext context, final ITreeAppendable output) { final String id = this.generateNewIDVar(); this.appendReporterEnterCall(output, TestRunReporter.SemanticUnit.MACRO_LIB, this._tclElementStringifier.stringify(context), id, TestRunReporter.Status.STARTED, output.getTraceRegion()); final Consumer<TestStep> _function = (TestStep it) -> { this.generateMacroCall(it, context, output.trace(it)); }; Iterables.<TestStep>filter(context.getSteps(), TestStep.class).forEach(_function); this.appendReporterLeaveCall(output, TestRunReporter.SemanticUnit.MACRO_LIB, this._tclElementStringifier.stringify(context), id, TestRunReporter.Status.OK, output.getTraceRegion()); }
protected void writeIf(XExpression condition) { ITreeAppendable debugAppendable = appendable.trace(condition.eContainer(), true); internalToJavaStatement(condition, debugAppendable, true); debugAppendable.newLine(); debugAppendable.append("if ("); internalToJavaExpression(condition, debugAppendable); debugAppendable.append(") {").increaseIndentation(); }
protected void compileAnonymousClassBody(AnonymousClass anonymousClass, JvmDeclaredType type, ITreeAppendable b) { ITreeAppendable appendable = b.trace(anonymousClass, true); appendable.append(" "); appendable.openScope(); GeneratorConfig config = generatorConfigProvider.get(anonymousClass); jvmModelGenerator.assignThisAndSuper(appendable, type, config); jvmModelGenerator.generateMembersInBody(type, appendable, config); appendable.closeScope(); }
protected void _toJavaExpression(AnonymousClass anonymousClass, ITreeAppendable b) { String varName = getReferenceName(anonymousClass, b); if (varName != null) { b.trace(anonymousClass, false).append(varName); } else { XConstructorCall constructorCall = anonymousClass.getConstructorCall(); constructorCallToJavaExpression(constructorCall, b); JvmDeclaredType declaringType = constructorCall.getConstructor().getDeclaringType(); compileAnonymousClassBody(anonymousClass, declaringType, b); } }
private void generate(final SpecificationStepImplementation step, final ITreeAppendable output) { final String id = this.generateNewIDVar(); this.appendReporterEnterCall(output, TestRunReporter.SemanticUnit.SPECIFICATION_STEP, this._tclElementStringifier.stringify(step), id, TestRunReporter.Status.STARTED, output.getTraceRegion()); final Consumer<TestStepContext> _function = (TestStepContext it) -> { this.generateContext(it, output.trace(it)); }; step.getContexts().forEach(_function); this.appendReporterLeaveCall(output, TestRunReporter.SemanticUnit.SPECIFICATION_STEP, this._tclElementStringifier.stringify(step), id, TestRunReporter.Status.OK, output.getTraceRegion()); }
private void _generateContext(final ComponentTestStepContext context, final ITreeAppendable output) { final String id = this.generateNewIDVar(); this.appendReporterEnterCall(output, TestRunReporter.SemanticUnit.COMPONENT, this._tclElementStringifier.stringify(context), id, TestRunReporter.Status.STARTED, output.getTraceRegion()); final Consumer<AbstractTestStep> _function = (AbstractTestStep it) -> { this.generate(it, output.trace(it)); }; context.getSteps().forEach(_function); this.appendReporterLeaveCall(output, TestRunReporter.SemanticUnit.COMPONENT, this._tclElementStringifier.stringify(context), id, TestRunReporter.Status.OK, output.getTraceRegion()); }
protected void appendForLoopParameter(XForLoopExpression expr, ITreeAppendable appendable) { appendable.append("final "); JvmTypeReference paramType = getForLoopParameterType(expr); serialize(paramType, expr, appendable); appendable.append(" "); final String name = makeJavaIdentifier(expr.getDeclaredParam().getName()); String varName = appendable.declareVariable(expr.getDeclaredParam(), name); appendable.trace(expr.getDeclaredParam(), TypesPackage.Literals.JVM_FORMAL_PARAMETER__NAME, 0).append(varName); }
public void generateMethodBody(final Macro macro, final ITreeAppendable output, final EList<JvmFormalParameter> parameters) { final String id = this.generateNewIDVar(); final Procedure1<ITreeAppendable> _function = (ITreeAppendable it) -> { this.appendReporterEnterCall(output, TestRunReporter.SemanticUnit.MACRO, this._tclElementStringifier.stringify(macro), id, TestRunReporter.Status.STARTED, output.getTraceRegion()); final Consumer<TestStepContext> _function_1 = (TestStepContext it_1) -> { this.generateContext(it_1, output.trace(it_1)); }; macro.getContexts().forEach(_function_1); this.appendReporterLeaveCall(output, TestRunReporter.SemanticUnit.MACRO, this._tclElementStringifier.stringify(macro), id, TestRunReporter.Status.OK, output.getTraceRegion()); }; this.wrapWithAssertionErrorHandler(output, macro.getContexts(), _function); }