Skip to content

Add user-defined strategy presets to the strategy options pane#3902

Open
unp1 wants to merge 1 commit into
mainfrom
bubel/strategy-preset-save
Open

Add user-defined strategy presets to the strategy options pane#3902
unp1 wants to merge 1 commit into
mainfrom
bubel/strategy-preset-save

Conversation

@unp1

@unp1 unp1 commented Jul 9, 2026

Copy link
Copy Markdown
Member

Intended Change

The strategy pane offered already a few built-in presets. This PR extends the functionality by allowing the user to save their own presets.

A "stash" options allows to quickly save the current strategy options so that one can return quickly back to them. Stashes are tought for quick, non-persistent capturing of the current strategy properties without giving them a name and/or making them persistent.

Functionalities:

  • save the current strategy settings as a named preset ("Save current as…"),
  • stash them into a single reusable "Stash" slot (overwritten each time),
  • rename a preset, and
  • delete a preset via a small "x" on its row in the combo box dropdown.

Presets capture the current strategy properties and max. rule
applications, are stored in the proof-independent settings and survive restarts.

Type of pull request

  • New feature (non-breaking change which adds functionality)

Ensuring quality

  • I made sure that introduced/changed code is well documented (javadoc and inline comments).
  • I added new test case(s) for new functionality.
  • I have tested the feature as follows: manual GUI tests

Additional information and contact(s)

Created with AI tooling support

The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.

Besides the built-in presets, users can now:
- save the current strategy settings as a named preset ("Save current as…"),
- stash them into a single reusable "Stash" slot (overwritten each time),
- rename a preset, and
- delete a preset via a small "x" on its row in the combo box dropdown.

Presets capture the current strategy properties and max. rule
applications, are stored in the proof-independent settings
(Configuration/JSON) and survive restarts.

Implementation:
- new StrategyPresetsSettings (key.core), registered in
  ProofIndependentSettings;
- StrategySelectionView reworked to a typed PresetEntry combo box model
  with a custom renderer (per-row delete affordance + built-in/user
  separator) and an adjacent gear menu for save/stash/rename;
- tests covering the Configuration persistence round-trip and the
  add/overwrite/stash/rename/remove bookkeeping.

Created with AI tooling support
@unp1 unp1 self-assigned this Jul 9, 2026
@unp1 unp1 added the GUI label Jul 9, 2026
@unp1 unp1 added this to the v3.1.0 milestone Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant