Skip to content

refactor: migrate Xtend to Java - com.avaloq.tools.ddk.xtext.generator.test#1418

Merged
joaodinissf merged 1 commit into
dsldevkit:masterfrom
joaodinissf:migrate/xtend-to-java/xtext-generator-test
Jun 16, 2026
Merged

refactor: migrate Xtend to Java - com.avaloq.tools.ddk.xtext.generator.test#1418
joaodinissf merged 1 commit into
dsldevkit:masterfrom
joaodinissf:migrate/xtend-to-java/xtext-generator-test

Conversation

@joaodinissf

@joaodinissf joaodinissf commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

What

Migrates XbaseGeneratorFragmentTest from Xtend to idiomatic Java 21 — the last .xtend in com.avaloq.tools.ddk.xtext.generator.test — and removes the module's Xtend build infrastructure (.classpath/.project/build.properties/xtend-gen).

How

  • Output verified against the freshly built xtend-gen/ ground truth.
  • @RegisterExtension rule field kept public per the project convention (programmatic-extension fields can't be private).
  • The Xtend -> pairs are modelled with a small private record PackageAndRuleName(String packageName, String ruleName) rather than carrying org.eclipse.xtext.xbase.lib.Pair (an Xtend runtime type) into the migrated Java — a record also handles the null package-name cases (Map.entry would NPE) and removes the need for @SafeVarargs. No xbase.lib reference remains in this file.
  • Behaviour preserved; .xtend deleted and .java added in one commit.

Local gate green: compile + checkstyle:check + pmd:check + spotbugs:check on the module (JUnit tests run in CI).

…r.test

Convert XbaseGeneratorFragmentTest from Xtend to idiomatic Java 21, the last
.xtend file in the module, and remove the now-unused Xtend build infrastructure
(.classpath, .project, build.properties, xtend-gen).

Output verified against the freshly built xtend-gen/ ground truth. The
@RegisterExtension rule field stays public per the project convention. The
Xtend '->' pairs become a small private record (PackageAndRuleName) instead of
carrying org.eclipse.xtext.xbase.lib.Pair into the migrated Java, which also
removes the need for @SafeVarargs. Behaviour is preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joaodinissf joaodinissf force-pushed the migrate/xtend-to-java/xtext-generator-test branch from 71f5a7e to e988712 Compare June 15, 2026 23:07
@joaodinissf joaodinissf marked this pull request as ready for review June 15, 2026 23:27
@joaodinissf joaodinissf requested a review from rubenporras June 15, 2026 23:27
@joaodinissf joaodinissf merged commit b43b7c7 into dsldevkit:master Jun 16, 2026
7 of 8 checks passed
@joaodinissf joaodinissf deleted the migrate/xtend-to-java/xtext-generator-test branch June 16, 2026 13:10
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