From 0a37c3a6ddeeabadd1162f9a125c5fa4058a0202 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Tue, 3 Sep 2024 23:47:27 +0200 Subject: [PATCH] Only add @XbaseGenerated annotation if available Fixes https://github.com/eclipse/xtext/issues/3182 --- .../org/eclipse/xtend/core/jvmmodel/XtendJvmModelInferrer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.xtend.core/src/org/eclipse/xtend/core/jvmmodel/XtendJvmModelInferrer.java b/org.eclipse.xtend.core/src/org/eclipse/xtend/core/jvmmodel/XtendJvmModelInferrer.java index 106a20f699d..77b950355ea 100644 --- a/org.eclipse.xtend.core/src/org/eclipse/xtend/core/jvmmodel/XtendJvmModelInferrer.java +++ b/org.eclipse.xtend.core/src/org/eclipse/xtend/core/jvmmodel/XtendJvmModelInferrer.java @@ -490,7 +490,7 @@ protected void appendSyntheticDispatchMethods(XtendTypeDeclaration source, final JvmOperation operation = deriveGenericDispatchOperationSignature(localOperations, target); if (operation != null) { dispatchHelper.markAsDispatcherFunction(operation); - if (generatorConfig.isUseXbaseGenerated()) { + if (generatorConfig.isUseXbaseGenerated() && typeReferences.findDeclaredType(XbaseGenerated.class, operation) != null) { operation.getAnnotations().add(_annotationTypesBuilder.annotationRef(XbaseGenerated.class)); } operation.setSimpleName(signature.getSimpleName());