Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to 2.36.0.M2 and regenerate with @XbaseGenerated #3138

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.ListExtensions;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

@SuppressWarnings("all")
public class Case_6 {
Expand All @@ -45,6 +46,7 @@ protected Object _transform(final EClass model) {
return ListExtensions.<ETypeParameter, Object>map(model.getETypeParameters(), _function);
}

@XbaseGenerated
public Object transform(final ENamedElement model) {
if (model instanceof EClass) {
return _transform((EClass)model);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

@SuppressWarnings("all")
public class Case_9 extends Case_8 {
Expand Down Expand Up @@ -50,6 +51,7 @@ public <T1 extends Object> List<List<T1>> foo(final T1 t) {
return null;
}

@XbaseGenerated
public CharSequence generateTypeRef(final EObject c) {
if (c instanceof ENamedElement) {
return _generateTypeRef((ENamedElement)c);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xtext.generator.CodeConfig;
import org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessExtensions;
import org.eclipse.xtext.xtext.generator.parser.antlr.AntlrGrammarGenUtil;
Expand Down Expand Up @@ -230,6 +231,7 @@ protected void _collectTokens(final EObject it, final List<String> known) {
}
}

@XbaseGenerated
public void collectTokens(final EObject it, final List<String> known) {
if (it instanceof Keyword) {
_collectTokens((Keyword)it, known);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessExtensions;
import org.eclipse.xtext.xtext.generator.parser.antlr.AntlrGrammarGenUtil;
import org.eclipse.xtext.xtext.generator.parser.antlr.AntlrOptions;
Expand Down Expand Up @@ -93,6 +94,7 @@ protected void _collectTokens(final EObject it, final Set<String> tokens) {
it.eContents().forEach(_function);
}

@XbaseGenerated
public void collectTokens(final EObject it, final Set<String> tokens) {
if (it instanceof Keyword) {
_collectTokens((Keyword)it, tokens);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.eclipse.xtext.common.types.JvmTypeReference;
import org.eclipse.xtext.xbase.compiler.output.ImportingStringConcatenation;
import org.eclipse.xtext.xbase.compiler.output.SharedAppendableState;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xbase.typesystem.references.ITypeReferenceOwner;
import org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference;

Expand All @@ -36,6 +37,7 @@ protected String _getStringRepresentation(final JvmTypeDeclarationImpl<?> object
return this._getStringRepresentation(type);
}

@XbaseGenerated
protected String getStringRepresentation(final Object object) {
if (object instanceof JvmTypeDeclarationImpl) {
return _getStringRepresentation((JvmTypeDeclarationImpl<?>)object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.StringExtensions;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

/**
* cases to distinguish:
Expand Down Expand Up @@ -354,6 +355,7 @@ protected void _format(final RichStringForLoop expr, @Extension final IFormattab
doc.surround(this._iTextRegionExtensions.regionFor(expr).keyword("ENDFOR"), _function_8);
}

@XbaseGenerated
public void format(final EObject richString, final IFormattableDocument doc) {
if (richString instanceof RichString) {
_format((RichString)richString, doc);
Expand Down Expand Up @@ -382,6 +384,7 @@ public void format(final EObject richString, final IFormattableDocument doc) {
}
}

@XbaseGenerated
protected boolean hasSyntaxError(final IEObjectRegion region) {
if (region instanceof NodeEObjectRegion) {
return _hasSyntaxError((NodeEObjectRegion)region);
Expand All @@ -393,6 +396,7 @@ protected boolean hasSyntaxError(final IEObjectRegion region) {
}
}

@XbaseGenerated
protected void suppressLineWraps(final Object it) {
if (it instanceof HiddenRegionReplacer) {
_suppressLineWraps((HiddenRegionReplacer)it);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import org.eclipse.xtext.xbase.lib.IntegerRange;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xtype.XFunctionTypeRef;
import org.eclipse.xtext.xtype.XImportDeclaration;
import org.eclipse.xtext.xtype.XImportSection;
Expand Down Expand Up @@ -684,6 +685,7 @@ protected XClosure builder(final List<XExpression> params) {
}

@Override
@XbaseGenerated
public void format(final Object anonymousClass, final IFormattableDocument format) {
if (anonymousClass instanceof AnonymousClass) {
_format((AnonymousClass)anonymousClass, format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.ListExtensions;
import org.eclipse.xtext.xbase.lib.Pair;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xbase.typesystem.computation.NumberLiterals;
import org.eclipse.xtext.xbase.typesystem.util.PendingLinkingCandidateResolver;
import org.eclipse.xtext.xbase.typesystem.util.TypeLiteralLinkingCandidateResolver;
Expand Down Expand Up @@ -707,6 +708,7 @@ protected void resolveFeature(final XAbstractFeatureCall featureCall, final JvmI
new PendingLinkingCandidateResolver<XAbstractFeatureCall>(featureCall).resolveLinkingProxy(((InternalEObject) featureCall), feature, XbasePackage.Literals.XABSTRACT_FEATURE_CALL__FEATURE, XbasePackage.XABSTRACT_FEATURE_CALL__FEATURE);
}

@XbaseGenerated
public Object internalEvaluate(final XExpression it, final Context ctx) {
if (it instanceof XBinaryOperation) {
return _internalEvaluate((XBinaryOperation)it, ctx);
Expand Down Expand Up @@ -740,6 +742,7 @@ public Object internalEvaluate(final XExpression it, final Context ctx) {
}
}

@XbaseGenerated
public String getFullName(final XExpression call) {
if (call instanceof XFeatureCall) {
return _getFullName((XFeatureCall)call);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

/**
* @author kosyakov - Initial contribution and API
Expand Down Expand Up @@ -833,6 +834,7 @@ protected String getAnnotationValueTypeName(final JvmType type) {
return _switchResult;
}

@XbaseGenerated
public void internalSet(final String name, final Object value, final boolean mustBeArray) {
if (value instanceof EnumerationValueDeclaration) {
_internalSet(name, (EnumerationValueDeclaration)value, mustBeArray);
Expand Down Expand Up @@ -921,6 +923,7 @@ public void internalSet(final String name, final Object value, final boolean mus
}
}

@XbaseGenerated
protected void setValue(final JvmAnnotationValue it, final Object value, final String componentType, final boolean mustBeArray) {
if (it instanceof JvmCustomAnnotationValue
&& value instanceof XtendAnnotationReferenceImpl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.eclipse.xtext.xbase.XSynchronizedExpression;
import org.eclipse.xtext.xbase.XTryCatchFinallyExpression;
import org.eclipse.xtext.xbase.XTypeLiteral;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xbase.validation.ImplicitReturnFinder;
import org.eclipse.xtext.xbase.validation.XbaseImplicitReturnFinder;

Expand All @@ -44,6 +45,7 @@ protected void _findImplicitReturns(final RichString expression, final ImplicitR
acceptor.accept(expression);
}

@XbaseGenerated
public void findImplicitReturns(final XExpression expression, final ImplicitReturnFinder.Acceptor acceptor) {
if (expression instanceof AnonymousClass) {
_findImplicitReturns((AnonymousClass)expression, acceptor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.eclipse.xtext.common.types.JvmType;
import org.eclipse.xtext.xbase.jvmmodel.JvmTypeExtensions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xbase.typesystem.override.IResolvedConstructor;
import org.eclipse.xtext.xbase.typesystem.override.IResolvedField;
import org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation;
Expand Down Expand Up @@ -193,6 +194,7 @@ protected IXtendOutlineContext buildFeature(final JvmDeclaredType inferredType,

protected abstract void buildType(final EObject someType, final IXtendOutlineContext context);

@XbaseGenerated
public void build(final EObject modelElement, final IXtendOutlineContext context) {
if (modelElement != null) {
_build(modelElement, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.eclipse.xtend.core.xtend.XtendFile;
import org.eclipse.xtend.core.xtend.XtendTypeDeclaration;
import org.eclipse.xtext.common.types.JvmDeclaredType;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

/**
* @author kosyakov - Initial contribution and API
Expand Down Expand Up @@ -47,6 +48,7 @@ protected void buildType(final EObject someType, final IXtendOutlineContext cont
}
}

@XbaseGenerated
public void build(final EObject jvmDeclaredType, final IXtendOutlineContext context) {
if (jvmDeclaredType instanceof JvmDeclaredType) {
_build((JvmDeclaredType)jvmDeclaredType, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

/**
* @author kosyakov - Initial contribution and API
Expand Down Expand Up @@ -186,6 +187,7 @@ protected void buildType(final EObject someType, final IXtendOutlineContext cont
}
}

@XbaseGenerated
public void build(final EObject xtendType, final IXtendOutlineContext context) {
if (xtendType instanceof XtendTypeDeclaration) {
_build((XtendTypeDeclaration)xtendType, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.junit.Assert;
import org.junit.Test;

Expand Down Expand Up @@ -886,6 +887,7 @@ public ResourceSet getResourceSet() {
return this.getInjector().<IResourceSetProvider>getInstance(IResourceSetProvider.class).get(this.testHelper.getProject());
}

@XbaseGenerated
public void assertCopyQualifiedName(final EObject featureCall, final String expectedQualifiedName) {
if (featureCall instanceof XAbstractFeatureCall) {
_assertCopyQualifiedName((XAbstractFeatureCall)featureCall, expectedQualifiedName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.eclipse.xtext.xbase.XAbstractFeatureCall;
import org.eclipse.xtext.xbase.XConstructorCall;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xbase.ui.editor.copyqualifiedname.XbaseCopyQualifiedNameService;

/**
Expand Down Expand Up @@ -70,6 +71,7 @@ protected String toQualifiedName(final XtendConstructor it) {
return _builder.toString();
}

@XbaseGenerated
public String getQualifiedName(final EObject it, final EObject context) {
if (it instanceof JvmConstructor
&& context instanceof XConstructorCall) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.eclipse.xtext.naming.QualifiedName;
import org.eclipse.xtext.xbase.XVariableDeclaration;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xbase.scoping.featurecalls.OperatorMapping;
import org.eclipse.xtext.xbase.typesystem.override.IResolvedConstructor;
import org.eclipse.xtext.xbase.typesystem.override.IResolvedField;
Expand Down Expand Up @@ -252,6 +253,7 @@ protected JvmTypeReference getDisplayedType(final XtendField field) {
}

@Override
@XbaseGenerated
protected ImageDescriptor imageDescriptor(final Object operation) {
if (operation instanceof JvmConstructor) {
return _imageDescriptor((JvmConstructor)operation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.StringExtensions;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

/**
* @since 2.7
Expand Down Expand Up @@ -502,6 +503,7 @@ protected void _transform(final MutableClassDeclaration it, @Extension final Tra
IterableExtensions.filter(it.getDeclaredFields(), _function).forEach(_function_1);
}

@XbaseGenerated
public void transform(final MutableMemberDeclaration it, final TransformationContext context) {
if (it instanceof MutableClassDeclaration) {
_transform((MutableClassDeclaration)it, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.ListExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

/**
* @since 2.7
Expand Down Expand Up @@ -522,6 +523,7 @@ public String returnIfNeeded(final ResolvedMethod it) {
return _xifexpression;
}

@XbaseGenerated
public boolean isValidDelegate(final MemberDeclaration it) {
if (it instanceof MethodDeclaration) {
return _isValidDelegate((MethodDeclaration)it);
Expand All @@ -533,6 +535,7 @@ public boolean isValidDelegate(final MemberDeclaration it) {
}
}

@XbaseGenerated
public TypeReference getType(final MemberDeclaration it) {
if (it instanceof MethodDeclaration) {
return _getType((MethodDeclaration)it);
Expand All @@ -544,6 +547,7 @@ public TypeReference getType(final MemberDeclaration it) {
}
}

@XbaseGenerated
public CharSequence delegateAccess(final MemberDeclaration it, final MethodDeclaration method) {
if (it instanceof MethodDeclaration) {
return _delegateAccess((MethodDeclaration)it, method);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

/**
* @since 2.7
Expand Down Expand Up @@ -270,6 +271,7 @@ protected void _transform(final MutableConstructorDeclaration it, @Extension fin
util.makeFinalFieldsConstructor(it);
}

@XbaseGenerated
public void transform(final MutableTypeParameterDeclarator it, final TransformationContext context) {
if (it instanceof MutableConstructorDeclaration) {
_transform((MutableConstructorDeclaration)it, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.eclipse.xtext.xbase.jvmmodel.JvmTypesBuilder;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;

/**
* <p>Infers a JVM model from the source model.</p>
Expand Down Expand Up @@ -64,6 +65,7 @@ public String name(final Resource res) {
return s.substring(0, _minus);
}

@XbaseGenerated
public void infer(final EObject m, final IJvmDeclaredTypeAcceptor acceptor, final boolean prelinkingPhase) {
if (m instanceof Model) {
_infer((Model)m, acceptor, prelinkingPhase);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.StringExtensions;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
Expand Down Expand Up @@ -1553,6 +1554,7 @@ protected Map<String, List<Diagnostic>> getDiagnostics() {
}
}

@XbaseGenerated
protected String toExpectation(final Object it) {
if (it instanceof Integer) {
return _toExpectation((Integer)it);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.eclipse.xtext.xbase.formatting2.XbaseFormatter;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.XbaseGenerated;
import org.eclipse.xtext.xtype.XFunctionTypeRef;
import org.eclipse.xtext.xtype.XImportDeclaration;
import org.eclipse.xtext.xtype.XImportSection;
Expand Down Expand Up @@ -104,6 +105,7 @@ protected void _format(final XAnnotation ann, @Extension final IFormattableDocum
}
}

@XbaseGenerated
public void format(final Object ann, final IFormattableDocument document) {
if (ann instanceof JvmTypeParameter) {
_format((JvmTypeParameter)ann, document);
Expand Down
Loading
Loading