mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
make project file to json
same as with .workspace the .project file now saves as .project.json and falls back to .project
This commit is contained in:
@@ -111,7 +111,7 @@ public class Workspace implements ProjectTreeNode, Serializable, JsonSerializabl
|
||||
public static void setActive(File workspaceRoot) {
|
||||
Workspace w;
|
||||
File f2 = new File(workspaceRoot, WS_SETTINGS_FILE_JSON);
|
||||
if (workspaceRoot.exists() && f2.exists()) {
|
||||
if (f2.exists()) {
|
||||
w = loadWorkspaceFromJson(workspaceRoot, f2);
|
||||
w.refreshTransients();
|
||||
} else {
|
||||
@@ -134,12 +134,9 @@ public class Workspace implements ProjectTreeNode, Serializable, JsonSerializabl
|
||||
|
||||
private static Workspace loadWorkspaceFromJson(File workspaceRoot, File settingsFile) {
|
||||
Workspace w = w = new Workspace(workspaceRoot);
|
||||
String json = FileUtils.readFileToString(settingsFile);
|
||||
Map json = FileUtils.mapFromJsonFile(settingsFile);
|
||||
if (json!= null) {
|
||||
Map map = (Map)FileUtils.fromJsonString(json);
|
||||
if(map!= null){
|
||||
w.fromMap(map);
|
||||
}
|
||||
w.fromMap(json);
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user