KeYProject / key

KeY Theorem Prover for Deductive Java Verification
https://key-project.org
Other
41 stars 24 forks source link

Proof independent settings seem to be no longer saved #3366

Closed unp1 closed 6 months ago

unp1 commented 9 months ago

Description

Please describe your concern in detail!

Deactivating an extension (like Javac, Caching) does not work.

Reproducible

Is the issue reproducible? Select one of: always, sometimes, random, have not tried, n/a

always

Steps to reproduce

Describe the steps needed to reproduce the issue.

  1. Delete (move) ~/.key
  2. Start KeY
  3. Deactivate, for instance the JavaC extension
  4. Quit KeY
  5. Restart KeY
  6. Deactivated extension is activated

What is your expected behavior and what was the actual behavior?

Extension is deactivated


Drodt commented 9 months ago

It seems that settings in general are not saved. Changing the appearance or font size also gets lost.

Drodt commented 9 months ago

I seem to have found the point where it goes wrong (using the extension example):

  1. ExtensionSettings are added to ProofIndependentSettings
  2. The lastReadedProperties are read to extract extension settings
  3. Reading is done by AbstractPropertiesSettings#readSettings(Properties)
  4. It looks for key "disabled" to get disabled extensions
  5. Disabled extensions are actually under Extensions > disabled in the JSON file
  6. No property for "disabled" is found; use default

I think the JSON file is not properly read and reading it as Properties seems incorrect. Iirc, @wadoon implemented this. I am not familiar enough to change it.

unp1 commented 9 months ago

@Drodt Thanks for looking into it!

FliegendeWurst commented 7 months ago

I fixed the particular case of not being able to disable extensions in #3392

FliegendeWurst commented 6 months ago

This is fixed now that #3392 is merged