Skip to content

Commit dbb55a9

Browse files
committed
fix
1 parent 7cf19b4 commit dbb55a9

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,26 @@ public void computeDefaults(ChoiceInformation ci) {
120120
}
121121

122122
if (currentDefaultChoices.isEmpty()) { // no choices have been read.
123-
currentDefaultChoices = new TreeMap<>();
123+
currentDefaultChoices = new TreeMap<>();
124124
for (var entry : category2DefaultChoice.entrySet()) {
125125
currentDefaultChoices.put(entry.getKey(), entry.getValue().name().toString());
126126
}
127127
ProofSettings.DEFAULT_SETTINGS.getChoiceSettings()
128128
.setDefaultChoices(currentDefaultChoices);
129129
}
130130

131-
// activate by \settings {} in file KeYUserProblemFile
132-
if(settings != null) {
131+
// activate by \settings {} in file KeYUserProblemFile
132+
if (settings != null) {
133133
for (var choice : settings.getChoiceSettings().getDefaultChoicesAsSet()) {
134134
activatedChoices.put(choice.category(), choice);
135135
}
136+
137+
138+
Map<String, String> defaults = new TreeMap<>();
139+
for (var ac : getActivatedChoices()) {
140+
defaults.put(ac.category(), ac.name().toString());
141+
}
142+
settings.getChoiceSettings().setDefaultChoices(defaults);
136143
}
137144
}
138145

@@ -399,13 +406,6 @@ public void setSettings(ProofSettings newSettings) {
399406

400407

401408
public ProofSettings getSettings() {
402-
if (settings == null)
403-
return null;
404-
Map<String, String> defaults = new TreeMap<>();
405-
for (var ac : getActivatedChoices()) {
406-
defaults.put(ac.category(), ac.name().toString());
407-
}
408-
settings.getChoiceSettings().setDefaultChoices(defaults);
409409
return settings;
410410
}
411411

key.core/src/main/java/de/uka/ilkd/key/proof/init/ProblemInitializer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import de.uka.ilkd.key.rule.Rule;
3636
import de.uka.ilkd.key.rule.Taclet;
3737
import de.uka.ilkd.key.settings.Configuration;
38-
import de.uka.ilkd.key.settings.Configuration;
3938
import de.uka.ilkd.key.settings.ProofIndependentSettings;
4039
import de.uka.ilkd.key.settings.ProofSettings;
4140
import de.uka.ilkd.key.speclang.PositionedString;
@@ -467,7 +466,6 @@ private InitConfig createInitConfigFor(EnvInput envInput) throws ProofInputExcep
467466
// cache the last used init config
468467
BaseConfigCache.setBaseInputConfig(config, inputDigest);
469468
config = config.copy();
470-
profile.prepareInitConfig(config);
471469
return config;
472470
}
473471

@@ -490,7 +488,8 @@ public InitConfig prepare(EnvInput envInput) throws ProofInputException {
490488
}
491489

492490
// applied after envInput/KeYUserProblemFile was read, and its setting are active.
493-
var warnings = profile.prepareInitConfig(ic, additionalProfileOptions);
491+
var warnings = ic.getProfile()
492+
.prepareInitConfig(ic, additionalProfileOptions);
494493
addWarnings(warnings);
495494

496495
return ic;

key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public class ChoiceSettings extends AbstractSettings {
3636

3737

3838
public ChoiceSettings() {
39-
category2Default = new LinkedHashMap<>();
4039
}
4140

4241

0 commit comments

Comments
 (0)