public HashSet<FType> getDataTypes(final FModel fModel) { final HashSet<FType> referencedFTypes = new HashSet<FType>(); final Consumer<FTypeCollection> _function = (FTypeCollection typeCollection) -> { referencedFTypes.addAll(typeCollection.getTypes()); }; fModel.getTypeCollections().forEach(_function); final Consumer<FInterface> _function_1 = (FInterface anInterface) -> { referencedFTypes.addAll(anInterface.getTypes()); }; fModel.getInterfaces().forEach(_function_1); return referencedFTypes; }
/** * check that all (except the explicitly excluded) variables are used according to their actual type (transitively in their fixture) */ private void checkReferencedVariablesAreUsedWellTypedExcluding(final TestStepContext ctx, final Map<String, JvmTypeReference> declaredVariablesTypeMap, final Set<String> excludedVariableNames) { final Consumer<AbstractTestStep> _function = (AbstractTestStep it) -> { this.checkReferencedVariablesAreUsedWellTypedExcluding(it, declaredVariablesTypeMap, ctx, excludedVariableNames); }; ctx.getSteps().forEach(_function); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public void connect() throws ClientException { try { getPools().forEach(pool -> pool.connect()); } catch (Exception e) { throw new ClientException(e); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public void disconnect() throws ClientException { try { getPools().forEach(pool -> pool.disconnect()); } catch (Exception e) { throw new ClientException(e); } }
private void collectTypes(final Component component, final Set<ComponentType> result) { ComponentType _type = component.getType(); boolean _tripleNotEquals = (_type != null); if (_tripleNotEquals) { ComponentType _type_1 = component.getType(); result.add(_type_1); } final Consumer<Component> _function = (Component it) -> { this.collectTypes(it, result); }; component.getParents().forEach(_function); }
protected void _format(final Template template, @Extension final IFormattableDocument document) { final Consumer<TemplateContent> _function = (TemplateContent it) -> { final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_1) -> { it_1.oneSpace(); }; document.<TemplateContent>prepend(it, _function_1); }; template.getContents().forEach(_function); }
/** * @since 1.7 */ public void loadParameterVariableTypes(final Pattern pattern, final TypeInformation information) { final Consumer<Variable> _function = (Variable parameter) -> { final IInputKey typeKey = this.typeSystem.extractTypeDescriptor(parameter.getType()); information.declareType(parameter, typeKey); }; pattern.getParameters().forEach(_function); }
@Override public void copy(StoreAdapter source, StoreAdapter target) { copyContainer(source, target); object.eClass().getEAllStructuralFeatures().forEach(f -> copyFeature(f, source, target)); }
protected void _findImplicitReturns(final XTryCatchFinallyExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { this.findImplicitReturns(expression.getExpression(), acceptor); final Consumer<XCatchClause> _function = (XCatchClause it) -> { this.findImplicitReturns(it.getExpression(), acceptor); }; expression.getCatchClauses().forEach(_function); }
protected void _findImplicitReturns(final XSwitchExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { final Consumer<XCasePart> _function = (XCasePart it) -> { this.findImplicitReturns(it.getThen(), acceptor); }; expression.getCases().forEach(_function); this.findImplicitReturns(expression.getDefault(), acceptor); }
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); }
@Check public void checkInteractionNameIsUnique(final AmlModel amlModel) { final HashMap<String, EObject> mapInteractionName2InteractionTypes = CollectionLiterals.<String, EObject>newHashMap(); final Consumer<InteractionType> _function = (InteractionType it) -> { boolean _containsKey = mapInteractionName2InteractionTypes.containsKey(it.getName()); if (_containsKey) { final String message = MessageFormat.format(Messages.Validation_InteractionType_Name_Dublicate, it.getName()); this.error(message, mapInteractionName2InteractionTypes.get(it.getName()), mapInteractionName2InteractionTypes.get(it.getName()).eContainer().eContainingFeature(), AmlValidator.INTERACTION_NAME_DUPLICATION); this.error(message, it, it.eContainer().eContainingFeature(), AmlValidator.INTERACTION_NAME_DUPLICATION); } else { mapInteractionName2InteractionTypes.put(it.getName(), it); } }; amlModel.getInteractionTypes().forEach(_function); }
private OperationCall createAggregatedOperationCall(final OperationCall call) { final OperationCall aggregatedCall = this.traceFactory.createOperationCall(); if (this.considerFailed) { aggregatedCall.setFailed(call.isFailed()); aggregatedCall.setFailedCause(call.getFailedCause()); } call.getChildren().forEach(c -> aggregatedCall.getChildren().add(this.createAggregatedOperationCall(c))); return aggregatedCall; }
/** * Translates the contents of the given node by an offset. * * @param parent parent node whose children shall be translated * @param xoffset x coordinate offset * @param yoffset y coordinate offset */ public static void translate(final ElkNode parent, final double xoffset, final double yoffset) { for (ElkNode child : parent.getChildren()) { // Translate node position child.setLocation(child.getX() + xoffset, child.getY() + yoffset); } // Translates all edges contained in the parent. This includes edges connecting the parent to its // children. For these edges the start or end point might get separated from the node boundary. parent.getContainedEdges().forEach(edge -> translate(edge, xoffset, yoffset)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ @Override public void connect() throws ChannelPoolException { if (isConnected()) return; try { getProvider().doConnect(this); connected = true; getChannels().forEach(channel -> channel.open()); } catch (Exception e) { throw new ChannelPoolException(e); } }
protected void _format(final MacroCollection macroCollection, @Extension final IFormattableDocument document) { final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.setNewLines(2); }; final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> { it.oneSpace(); }; document.append(document.prepend(this.textRegionExtensions.regionFor(macroCollection).keyword("#"), _function), _function_1); final Consumer<Macro> _function_2 = (Macro it) -> { document.<Macro>format(it); }; macroCollection.getMacros().forEach(_function_2); }
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 _format(final AmlModel model, @Extension final IFormattableDocument document) { final Consumer<EObject> _function = (EObject it) -> { final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_1) -> { it_1.setNewLines(2, 2, 2); }; document.<EObject>prepend(it, _function_1); this.formatBrackets(it, document); this.formatKeywords(it, document); }; model.eContents().forEach(_function); final Procedure1<EObject> _function_1 = (EObject it) -> { document.<EObject>format(it); }; IteratorExtensions.<EObject>forEach(model.eAllContents(), _function_1); }
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); }