org.eclipse.xtext.xbase.lib.Extension.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(9.8k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.eclipse.xtext.xbase.lib.Extension.<init>()方法的一些代码示例,展示了Extension.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extension.<init>()方法的具体详情如下:
包路径:org.eclipse.xtext.xbase.lib.Extension
类名称:Extension
方法名:<init>

Extension.<init>介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.xtend/org.eclipse.xtend.lib

protected void _transform(final MutableConstructorDeclaration it, @Extension final TransformationContext context) {
 @Extension
 final FinalFieldsConstructorProcessor.Util util = new FinalFieldsConstructorProcessor.Util(context);
 util.makeFinalFieldsConstructor(it);
}

代码示例来源:origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

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);
}

代码示例来源:origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

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);
}

代码示例来源:origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

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);
}

代码示例来源:origin: org.eclipse.xtend/org.eclipse.xtend.lib

@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);
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

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));
  }
 }
}

代码示例来源:origin: org.integratedmodelling/org.integratedmodelling.kim

protected void _format(final Metadata metadata, @Extension final IFormattableDocument document) {
 EList<EObject> _values = metadata.getValues();
 for (final EObject values : _values) {
  document.<EObject>format(values);
 }
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

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));
}

代码示例来源:origin: org.testeditor/org.testeditor.aml.dsl

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);
}

代码示例来源:origin: org.testeditor/org.testeditor.tcl.dsl

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);
}

代码示例来源:origin: org.eclipse.emf.parsley/org.eclipse.emf.parsley.dsl

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);
}

代码示例来源:origin: org.eclipse.xtend/org.eclipse.xtend.lib

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)));
 }
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

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);
}

代码示例来源:origin: org.eclipse.xtend/org.eclipse.xtend.core

@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);
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

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());
}

代码示例来源:origin: org.eclipse.xtend/org.eclipse.xtend.core

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);
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

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());
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

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);
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

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);
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xtext.generator

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()));
}

相关文章

Extension类方法