}
}
private Configuration readPreviousMapState() {
IEclipsePreferences node = getProjectPreferences(POINT_NODE_ID);
Builder builder = Configuration.builder();
try {
for (String key: node.keys()) {
String pointString = node.get(key, null);
if (pointString == null) continue;
String[] split = pointString.split("@");
// cover legacy format
if (split.length != 2 ) split = pointString.split("#");
if (split.length != 2 ) {
Log.error(new RuntimeException("Invalid format of point storage for " + getProject().getName() + ": " + pointString));
continue;
}
double x = Double.parseDouble(split[0]);
double y = Double.parseDouble(split[1]);
builder.add(key, x, y);
}
return builder.build();
} catch (BackingStoreException e) {
Log.error(e);
}
return null;
}