Skip to content

refactor: migrate Xtend to Java - com.avaloq.tools.ddk.checkcfg.*#1408

Open
joaodinissf wants to merge 3 commits into
dsldevkit:masterfrom
joaodinissf:migrate/xtend-to-java/checkcfg
Open

refactor: migrate Xtend to Java - com.avaloq.tools.ddk.checkcfg.*#1408
joaodinissf wants to merge 3 commits into
dsldevkit:masterfrom
joaodinissf:migrate/xtend-to-java/checkcfg

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

Migrates all 11 Xtend files in the checkcfg.* bundles to Java 21, taking the bundle family fully off Xtend. One commit per module.

com.avaloq.tools.ddk.checkcfg.core (4 files)

CheckCfgGenerator, CheckCfgJvmModelInferrer, PropertiesInferenceHelper, ConfiguredParameterChecks converted; .xtend originals deleted; xtend-gen removed from .classpath/build.properties. The bundle keeps its Xtext nature (it hosts the CheckCfg.xtext grammar).

com.avaloq.tools.ddk.checkcfg.core.test (7 files)

CheckCfgContentAssistTest, CheckCfgScopeProviderTest, CheckCfgSyntaxTest, CheckCfgModelUtil, CheckCfgTestUtil, CheckCfgConfiguredParameterValidationsTest, CheckCfgTest converted; full infrastructure cleanup including the now-unused org.eclipse.xtend.lib manifest entry and the Xtext builder/nature in .project.

com.avaloq.tools.ddk.checkcfg.ide

Pure scaffolding removal: the bundle never had Xtend sources, but carried xtend-gen entries in .classpath/build.properties and an empty xtend-gen directory.

Intentional deviations from the Xtend compiler output (all behavior-equivalent)

  • Test methods declare throws Exception instead of Xtend's generated sneakyThrow wrapping.
  • CheckCfgScopeProviderTest throws IllegalStateException where the Xtend source threw a raw Exception and an explicit NullPointerException (static-analysis-clean, same failure semantics); local constants renamed to camelCase per Java naming rules.
  • Templates follow the string-building conventions: text blocks for static sources, .formatted() for interpolation without control flow, StringBuilder only where there is loop/conditional logic. String outputs match the Xtend compiler output exactly, including trailing newlines.
  • PropertiesInferenceHelper.inferType uses an exhaustive Java 21 switch expression over the enum, with the original null-tolerance preserved (a null PropertyType still yields null, as in Xtend's switch semantics).
  • Stdlib collections replace Guava where the consumer only iterates (new ArrayList<>(0), new HashMap<>()); Sets.newHashSet(array) kept where Guava is genuinely more concise.
  • A malformed Javadoc tag (@param parameterto check.) is minimally corrected to @param parameter to check.

Verification

Full mvn verify with Checkstyle and PMD: all 10 checkcfg test methods pass (the only suite failure is the known local-machine-only testBulkApplyingQuickfix SWTBot flake in an untouched bundle, which is consistently green in CI).

🤖 Generated with Claude Code

…eckcfg.ide

The bundle has no Xtend sources; the xtend-gen entries in .classpath and
build.properties and the empty xtend-gen directory are leftovers.
@joaodinissf joaodinissf force-pushed the migrate/xtend-to-java/checkcfg branch 3 times, most recently from ea7aba4 to 6bb6de8 Compare June 11, 2026 17:00
@joaodinissf joaodinissf marked this pull request as ready for review June 11, 2026 17:05
@joaodinissf joaodinissf requested a review from rubenporras June 11, 2026 17:05
@joaodinissf joaodinissf enabled auto-merge (rebase) June 11, 2026 17:06
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.

1 participant