Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ private ConfigurationWriter printMap(Map<?, ?> value) {
}
indent -= 4;
newline().printIndent();
out.format(" }");
out.format("}");
return this;
}

Expand Down Expand Up @@ -555,7 +555,7 @@ private ConfigurationWriter printSeq(Collection<?> value) {
}
indent -= 4;
newline().printIndent();
out.format(" ]");
out.format("]");
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public class ProofIndependentSettings {
private final List<Settings> settings = new LinkedList<>();

private final PropertyChangeListener settingsListener = e -> saveSettings();
private Properties lastReadedProperties;
private Configuration lastReadedConfiguration;
private Properties lastReadProperties;
private Configuration lastReadConfiguration;

private ProofIndependentSettings() {
addSettings(smtSettings);
Expand All @@ -74,11 +74,11 @@ public void addSettings(Settings settings) {
if (!this.settings.contains(settings)) {
this.settings.add(settings);
settings.addPropertyChangeListener(settingsListener);
if (lastReadedProperties != null) {
settings.readSettings(lastReadedProperties);
if (lastReadProperties != null) {
settings.readSettings(lastReadProperties);
}
if (lastReadedConfiguration != null) {
settings.readSettings(lastReadedConfiguration);
if (lastReadConfiguration != null) {
settings.readSettings(lastReadConfiguration);
}
}
}
Expand Down Expand Up @@ -106,19 +106,22 @@ private void load(File file) throws IOException {
for (Settings settings : settings) {
settings.readSettings(properties);
}
lastReadedProperties = properties;
lastReadProperties = properties;
}
} else {
this.lastReadedConfiguration = Configuration.load(file);
this.lastReadConfiguration = Configuration.load(file);
for (Settings settings : settings) {
settings.readSettings(lastReadedConfiguration);
settings.readSettings(lastReadConfiguration);
}
}
}

public void saveSettings() {
if (!filename.getName().endsWith(".json")) {
Properties result = new Properties();
Properties result = lastReadProperties == null
? new Properties()
: new Properties(lastReadProperties);

for (Settings settings : settings) {
settings.writeSettings(result);
}
Expand All @@ -135,6 +138,10 @@ public void saveSettings() {
}

Configuration config = new Configuration();
if (lastReadConfiguration != null) {
config.overwriteWith(lastReadConfiguration);
}

for (var settings : settings)
settings.writeSettings(config);
if (!filename.exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ private void loadProof(Proof selectedProof) throws RuntimeException {
updateLabel(data);
})).get();
} catch (InterruptedException | ExecutionException ex) {
lblStatus.setForeground(COLOR_ERROR.get());
lblStatus.setIcon(ICON_ERROR.get(16));
lblStatus.setText("Javac error");
throw new RuntimeException(ex);
}
}
Expand Down
Loading