public void _format(final ProposalCreator proposalcreator, @Extension final IFormattableDocument document) { final Procedure1<WithFields> _function = new Procedure1<WithFields>() { @Override public void apply(final WithFields it) { EmfParsleyDslFormatter.this.<FeatureAssociatedExpression>formatAndSeparateElementsWithNewlines(proposalcreator.getProposalsSpecifications(), document); } }; this.formatWithFields(proposalcreator, document, _function); }
public void _format(final ViewerContentProvider viewercontentprovider, @Extension final IFormattableDocument document) { final Procedure1<WithFields> _function = new Procedure1<WithFields>() { @Override public void apply(final WithFields it) { EmfParsleyDslFormatter.this.<EObject>formatSpecifications(viewercontentprovider.getElements(), document); EmfParsleyDslFormatter.this.<EObject>formatSpecifications(viewercontentprovider.getChildren(), document); } }; this.formatWithFields(viewercontentprovider, document, _function); }
public void _format(final TableViewerContentProvider tableviewercontentprovider, @Extension final IFormattableDocument document) { final Procedure1<WithFields> _function = new Procedure1<WithFields>() { @Override public void apply(final WithFields it) { EmfParsleyDslFormatter.this.<EObject>formatSpecifications(tableviewercontentprovider.getElements(), document); } }; this.formatWithFields(tableviewercontentprovider, document, _function); }
@Override public void doTransform(final List<? extends MutableTypeParameterDeclarator> elements, @Extension final TransformationContext context) { final Consumer<MutableTypeParameterDeclarator> _function = (MutableTypeParameterDeclarator it) -> { this.transform(it, context); }; elements.forEach(_function); }
protected void _format(final XExpression expr, @Extension final IFormattableDocument format) { EList<EObject> _eContents = expr.eContents(); for (final EObject obj : _eContents) { boolean _matched = false; if (obj instanceof XExpression) { _matched=true; format.<XExpression>format(((XExpression)obj)); } } }
protected void _format(final Metadata metadata, @Extension final IFormattableDocument document) { EList<EObject> _values = metadata.getValues(); for (final EObject values : _values) { document.<EObject>format(values); } }
protected void _format(final JvmTypeConstraint constraint, @Extension final IFormattableDocument document) { final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.oneSpace(); }; document.<JvmTypeReference>format(document.<JvmTypeReference>prepend(constraint.getTypeReference(), _function)); }
protected void _format(final IntegerRange element, @Extension final IFormattableDocument document) { final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.oneSpace(); }; document.surround(this.textRegionExtensions.regionFor(element).keyword(".."), _function); }
protected void _format(final StepContentText stepContentText, @Extension final IFormattableDocument document) { final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.oneSpace(); }; document.prepend(this.textRegionExtensions.regionFor(stepContentText).feature(TslPackage.Literals.STEP_CONTENT_VALUE__VALUE), _function); }
public void _format(final TypeBinding typebinding, @Extension final IFormattableDocument document) { this.<TypeBinding>oneSpaceAfterKeyword(typebinding, "type", document); this.format(typebinding.getTypeToBind(), document); this.formatBinding(typebinding, document); }
protected void _transform(final MutableFieldDeclaration it, @Extension final TransformationContext context) { @Extension final AccessorsProcessor.Util util = new AccessorsProcessor.Util(context); boolean _shouldAddGetter = util.shouldAddGetter(it); if (_shouldAddGetter) { util.addGetter(it, util.toVisibility(util.getGetterType(it))); } boolean _shouldAddSetter = util.shouldAddSetter(it); if (_shouldAddSetter) { util.addSetter(it, util.toVisibility(util.getSetterType(it))); } }
protected void formatFeatureCallParams(final List<XExpression> params, final ISemanticRegion open, final ISemanticRegion close, @Extension final IFormattableDocument format) { final XClosure builder = this.builder(params); final Iterable<XExpression> explicitParams = this.explicitParams(params); this.formatCommaSeparatedList(IterableExtensions.<XExpression>toList(explicitParams), open, close, format); this.formatBuilderWithLeadingGap(builder, format); }
@Override protected void _format(final XVariableDeclaration expr, @Extension final IFormattableDocument format) { final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.oneSpace(); }; format.append(this.textRegionExtensions.regionFor(expr).keyword("extension"), _function); super._format(expr, format); }
protected void _format(final XReturnExpression expr, @Extension final IFormattableDocument format) { final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.oneSpace(); }; format.<XExpression>prepend(expr.getExpression(), _function); format.<XExpression>format(expr.getExpression()); }
protected void _format(final XtendAnnotationType annotationType, @Extension final IFormattableDocument format) { this.formatAnnotations(annotationType, format, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations); this.formatModifiers(annotationType, format); final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.oneSpace(); }; format.append(this.textRegionExtensions.regionFor(annotationType).keyword("annotation"), _function); this.formatBody(annotationType, format); }
protected void _format(final XCastedExpression expr, @Extension final IFormattableDocument doc) { final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.oneSpace(); }; doc.surround(this.textRegionExtensions.regionFor(expr).keyword("as"), _function); doc.<XExpression>format(expr.getTarget()); doc.<JvmTypeReference>format(expr.getType()); }
protected void _format(final XDoWhileExpression expr, @Extension final IFormattableDocument format) { format.append(this.textRegionExtensions.regionFor(expr).keyword("while"), XbaseFormatterPreferenceKeys.whitespaceBetweenKeywordAndParenthesisML); final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.noSpace(); }; final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> { it.noSpace(); }; format.<XExpression>format(format.<XExpression>append(format.<XExpression>prepend(expr.getPredicate(), _function), _function_1)); this.formatBodyInline(expr.getBody(), true, format); }
protected void _format(final XWhileExpression expr, @Extension final IFormattableDocument format) { format.append(this.textRegionExtensions.regionFor(expr).keyword("while"), XbaseFormatterPreferenceKeys.whitespaceBetweenKeywordAndParenthesisML); final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> { it.noSpace(); }; final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> { it.noSpace(); }; format.<XExpression>format(format.<XExpression>append(format.<XExpression>prepend(expr.getPredicate(), _function), _function_1)); this.formatBody(expr.getBody(), true, format); }
protected void generateProductionGrammar() { @Extension final GrammarNaming naming = this.productionNaming; final IXtextGeneratorFileSystemAccess fsa = this.getProjectConfig().getRuntime().getSrcGen(); this.productionGenerator.generate(this.getGrammar(), this.getOptions(), fsa); this.runAntlr(naming.getParserGrammar(this.getGrammar()), naming.getLexerGrammar(this.getGrammar()), fsa); this.simplifyUnorderedGroupPredicatesIfRequired(this.getGrammar(), fsa, naming.getInternalParserClass(this.getGrammar())); this.splitParserAndLexerIfEnabled(fsa, naming.getInternalParserClass(this.getGrammar()), naming.getLexerClass(this.getGrammar())); this.normalizeTokens(fsa, naming.getLexerGrammar(this.getGrammar()).getTokensFileName()); this.suppressWarnings(fsa, naming.getInternalParserClass(this.getGrammar()), naming.getLexerClass(this.getGrammar())); this.normalizeLineDelimiters(fsa, naming.getInternalParserClass(this.getGrammar()), naming.getLexerClass(this.getGrammar())); }