Skip to content

feat(builder): per-language preference to disable the Check/Scope/Export/Format builder participant#1435

Draft
joaodinissf wants to merge 1 commit into
dsldevkit:masterfrom
joaodinissf:feat/builder-participant-disable-pref
Draft

feat(builder): per-language preference to disable the Check/Scope/Export/Format builder participant#1435
joaodinissf wants to merge 1 commit into
dsldevkit:masterfrom
joaodinissf:feat/builder-participant-disable-pref

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

What

Adds one boolean workspace preference per meta-DSL (Check, Scope, Export, Format) — "Run the builder participant on workspace build (regenerate generated artifacts)" — on each language's existing Compiler preference page.

Why

Each language's IXtextBuilderParticipant regenerates Java from .check/.scope/.export/.format sources on every Eclipse workspace build, even though most developers never edit those sources. The generated artifacts are committed, so skipping regeneration is safe; on-demand regeneration still happens via the Generate*.mwe2 workflows. Disabling the participant gives a faster workspace for anyone not editing the meta-DSL, while authors editing it keep it on.

Design

  • Default ENABLED — no behavior change for existing workspaces; disabling is opt-in. Workspace/instance-scoped (one toggle per language).
  • Core: ConditionalBuilderParticipant gains an overridable getBuilderParticipantEnabledPreferenceKey() (default null → always run) and isBuilderParticipantEnabled(IBuildContext), with an @Inject(optional = true) IPreferenceStoreAccess so non-UI/test setups are unaffected. Each language's participant returns early from build() before generation when disabled.
  • Wiring reuses the existing DDK pattern (CheckBuilderPreferenceAccess/ConfigurationBlock): per-language *BuilderPreferenceAccess (+Initializer defaulting to true) and *BuilderConfigurationBlock (adds the checkbox), bound in each UiModule. Export/Scope additionally bind a ConditionalBuilderParticipant subclass in place of the stock BuilderParticipant. No plugin.xml change (the stock Compiler page instantiates the bound config block); no MANIFEST change (Scope/Export use the plain non-Xbase builder.ui classes already on their classpath).

Status / how to verify

Draft — build/runtime not yet exercised locally (CI is the compile gate). Worth a one-time smoke test: open each language's Compiler preferences, confirm the checkbox renders, toggle it off, and verify a workspace build skips regeneration (and the Generate*.mwe2 still regenerates on demand).

🤖 Generated with Claude Code

…pant

Adds one boolean workspace preference per meta-DSL (Check, Scope, Export,
Format) — "Run the builder participant on workspace build (regenerate generated
artifacts)" — on each language's existing Compiler preference page.

Motivation: each language's IXtextBuilderParticipant regenerates Java from
.check/.scope/.export/.format sources on every workspace build, even though most
developers never edit those sources. The generated artifacts are committed, so
skipping regeneration is safe; on-demand regeneration still runs via the
Generate*.mwe2 workflows. Disabling the participant therefore gives a faster
workspace for everyone not editing the meta-DSL, while authors who are can keep
it on.

Default ENABLED — no behavior change for existing workspaces; disabling is opt-in.

Core: ConditionalBuilderParticipant gains an overridable
getBuilderParticipantEnabledPreferenceKey() (default null → always run) and
isBuilderParticipantEnabled(IBuildContext), with an optional IPreferenceStoreAccess
so non-UI/test setups are unaffected. Each language's participant returns early
from build() before generation when disabled.

Wiring reuses the existing DDK preference pattern (CheckBuilderPreferenceAccess/
ConfigurationBlock): per-language *BuilderPreferenceAccess (+Initializer defaulting
to true) and *BuilderConfigurationBlock (adds the checkbox), bound in each UiModule.
Export/Scope additionally bind a ConditionalBuilderParticipant subclass in place of
the stock BuilderParticipant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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