Skip to content

refactor: migrate Xtend to Java - com.avaloq.tools.ddk.sample.helloworld.ui.test#1407

Merged
joaodinissf merged 2 commits into
dsldevkit:masterfrom
joaodinissf:migrate/xtend-to-java/sample-helloworld
Jun 11, 2026
Merged

refactor: migrate Xtend to Java - com.avaloq.tools.ddk.sample.helloworld.ui.test#1407
joaodinissf merged 2 commits into
dsldevkit:masterfrom
joaodinissf:migrate/xtend-to-java/sample-helloworld

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

Migrates the last three Xtend files in the sample.helloworld.* bundles to Java 21, taking the bundle family fully off Xtend.

Migration (com.avaloq.tools.ddk.sample.helloworld.ui.test)

  • CheckConfigurationIsAppliedTest, CheckExecutionEnvironmentProjectTest, IssueLabelTest converted to Java; .xtend originals deleted.
  • Module infrastructure cleaned up: xtend-gen removed from .classpath and build.properties, xtend-gen/.gitignore deleted, Xtext builder/nature removed from .project.

Intentional deviations from the Xtend compiler output, all behavior-equivalent:

  • Test methods declare throws Exception instead of Xtend's generated sneakyThrow wrapping.
  • getInjector() is protected, matching the AbstractCheckTestCase supertype (Xtend widened it to public); all call sites are internal to the test framework.
  • List.of/Map.of replace Lists.newArrayList/newHashMap for the collection literals — consumers only iterate them.

Stale Xtend dependency cleanup (sibling bundles)

org.eclipse.xtend.lib is removed from the helloworld, helloworld.ide, and helloworld.ui manifests. The only remaining source reference was the inert @FinalFieldsConstructor annotation on HelloWorldUiModule — an Xtend active annotation that generates nothing in Java source (the constructor it would generate is declared explicitly right below it) — which is dropped along with its import. No source in these bundles references org.eclipse.xtend.* or org.eclipse.xtend2.* after this change.

Verification

Full mvn verify with Checkstyle and PMD: BUILD SUCCESS, 357/357 tests passing, including all 7 test methods of the migrated classes (via HelloWorldSampleTestSuite in AllTests).

🤖 Generated with Claude Code

org.eclipse.xtend.lib is no longer used by any source in the
sample.helloworld bundles. The only remaining reference was the inert
@FinalFieldsConstructor annotation on HelloWorldUiModule, an Xtend
active annotation that generates nothing in Java source - the
constructor it would generate is declared explicitly.
@joaodinissf joaodinissf merged commit 932bac7 into dsldevkit:master Jun 11, 2026
4 checks passed
@joaodinissf joaodinissf deleted the migrate/xtend-to-java/sample-helloworld branch June 11, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants