提交 bfe729e9 编写于 作者: S Serge Rider

#6883 Dialog settings map fix. Processor settings save/load fix


Former-commit-id: ed2c0ac1
上级 2dcdc0b2
......@@ -450,7 +450,6 @@ public class DataTransferWizard extends TaskConfigurationWizard implements IExpo
// Save processors' properties
Map<String, Object> processorsSection = new LinkedHashMap<>();
config.put("processors", processorsSection);
for (DataTransferProcessorDescriptor procDescriptor : settings.getProcessorPropsHistory().keySet()) {
Map<String, Object> procSettings = new LinkedHashMap<>();
......@@ -468,6 +467,8 @@ public class DataTransferWizard extends TaskConfigurationWizard implements IExpo
}
processorsSection.put(procDescriptor.getFullId(), procSettings);
}
config.put("processors", processorsSection);
return config;
}
......
......@@ -40,7 +40,14 @@ public class DialogSettingsMap extends AbstractMap<String, Object> {
@NotNull
@Override
public Set<Entry<String, Object>> entrySet() {
return new LinkedHashSet<>();
Set<Entry<String, Object>> sectionSet = new LinkedHashSet<>();
IDialogSettings[] sections = settings.getSections();
if (sections != null) {
for (IDialogSettings section : sections) {
sectionSet.add(new SimpleEntry<>(section.getName(), new DialogSettingsMap(section)));
}
}
return sectionSet;
}
@Override
......@@ -90,4 +97,13 @@ public class DialogSettingsMap extends AbstractMap<String, Object> {
return settingsMap;
}
@Override
public int hashCode() {
return settings.hashCode();
}
@Override
public boolean equals(Object o) {
return o instanceof DialogSettingsMap && settings.equals(((DialogSettingsMap) o).settings);
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册