From 679ef705a16e92a86c0e81f4708e7a6c69d5f9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Mon, 15 Jun 2026 23:11:01 +0200 Subject: [PATCH] refactor: migrate Xtend to Java - com.avaloq.tools.ddk.xtext.test.core (Tag) DRAFT CHECKPOINT - DO NOT MERGE until the active-annotation question is resolved. Converts the Tag active annotation (@Active(TagCompilationParticipant)) from Xtend to Java, keeping @Active + the processor + org.eclipse.xtext.xtend.lib, and removes the module's Xtend build infrastructure (.classpath, .project, build.properties, xtend-gen). Local gate (-DskipTests) is green. BLOCKED: Tag is an Xtend active annotation whose macro assigns each @Tag field a unique integer at Xtend-compile time. DDK declares no @Tag fields itself (the consumers are downstream), so DDK CI cannot validate that the macro still fires for a Java-authored @interface. See the PR description for the resolution plan. Co-Authored-By: Claude Opus 4.8 (1M context) --- com.avaloq.tools.ddk.xtext.test.core/.classpath | 5 ----- com.avaloq.tools.ddk.xtext.test.core/.project | 6 ------ .../build.properties | 3 +-- .../tools/ddk/xtext/test/{Tag.xtend => Tag.java} | 13 +++++++------ .../xtend-gen/.gitignore | 0 5 files changed, 8 insertions(+), 19 deletions(-) rename com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/{Tag.xtend => Tag.java} (75%) delete mode 100644 com.avaloq.tools.ddk.xtext.test.core/xtend-gen/.gitignore diff --git a/com.avaloq.tools.ddk.xtext.test.core/.classpath b/com.avaloq.tools.ddk.xtext.test.core/.classpath index 907a12b9cb..71aee59a71 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/.classpath +++ b/com.avaloq.tools.ddk.xtext.test.core/.classpath @@ -1,11 +1,6 @@ - - - - - diff --git a/com.avaloq.tools.ddk.xtext.test.core/.project b/com.avaloq.tools.ddk.xtext.test.core/.project index 326acc3457..a65f2423c0 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/.project +++ b/com.avaloq.tools.ddk.xtext.test.core/.project @@ -20,11 +20,6 @@ - - org.eclipse.xtext.ui.shared.xtextBuilder - - - net.sf.eclipsecs.core.CheckstyleBuilder @@ -44,7 +39,6 @@ org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature - org.eclipse.xtext.ui.shared.xtextNature net.sourceforge.pmd.eclipse.plugin.pmdNature net.sf.eclipsecs.core.CheckstyleNature edu.umd.cs.findbugs.plugin.eclipse.findbugsNature diff --git a/com.avaloq.tools.ddk.xtext.test.core/build.properties b/com.avaloq.tools.ddk.xtext.test.core/build.properties index ea832598c9..b107977f4e 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/build.properties +++ b/com.avaloq.tools.ddk.xtext.test.core/build.properties @@ -1,4 +1,3 @@ -source.. = src/,\ - xtend-gen/ +source.. = src/ bin.includes = META-INF/,\ . diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/Tag.xtend b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/Tag.java similarity index 75% rename from com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/Tag.xtend rename to com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/Tag.java index 892e50810b..5cc4a24878 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/Tag.xtend +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/Tag.java @@ -8,19 +8,20 @@ * Contributors: * Avaloq Group AG - initial API and implementation *******************************************************************************/ -package com.avaloq.tools.ddk.xtext.test +package com.avaloq.tools.ddk.xtext.test; -import java.lang.annotation.Retention -import java.lang.annotation.RetentionPolicy -import org.eclipse.xtend.lib.macro.Active +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import org.eclipse.xtend.lib.macro.Active; /** * Initializes global tags in linking tests. * The annotated field must be of integer type. * Usage example: @Tag int MEM_DOC */ -@Active(typeof(TagCompilationParticipant)) +@Active(TagCompilationParticipant.class) @Retention(RetentionPolicy.RUNTIME) -annotation Tag { +public @interface Tag { } diff --git a/com.avaloq.tools.ddk.xtext.test.core/xtend-gen/.gitignore b/com.avaloq.tools.ddk.xtext.test.core/xtend-gen/.gitignore deleted file mode 100644 index e69de29bb2..0000000000