feat(builder): per-language preference to disable the Check/Scope/Export/Format builder participant#1435
Draft
joaodinissf wants to merge 1 commit into
Draft
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
IXtextBuilderParticipantregenerates Java from.check/.scope/.export/.formatsources 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 theGenerate*.mwe2workflows. Disabling the participant gives a faster workspace for anyone not editing the meta-DSL, while authors editing it keep it on.Design
ConditionalBuilderParticipantgains an overridablegetBuilderParticipantEnabledPreferenceKey()(defaultnull→ always run) andisBuilderParticipantEnabled(IBuildContext), with an@Inject(optional = true) IPreferenceStoreAccessso non-UI/test setups are unaffected. Each language's participant returns early frombuild()before generation when disabled.CheckBuilderPreferenceAccess/ConfigurationBlock): per-language*BuilderPreferenceAccess(+Initializerdefaulting totrue) and*BuilderConfigurationBlock(adds the checkbox), bound in eachUiModule. Export/Scope additionally bind aConditionalBuilderParticipantsubclass in place of the stockBuilderParticipant. Noplugin.xmlchange (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*.mwe2still regenerates on demand).🤖 Generated with Claude Code