Исправление недочета с spf директивами. Пустые версии пакета отображаются серым. v++

This commit is contained in:
2023-11-29 14:25:10 +03:00
parent ac3024a2d4
commit bc9c19b14c
13 changed files with 56 additions and 33 deletions

View File

@@ -25,7 +25,6 @@ public class SapforVersion_json implements Serializable {
public String version = "";
@Expose
public String description = "";
public boolean success = true;
//поля для отображения деревьев.
public File Home = null;
public LinkedHashMap<String, ProjectFile> files = new LinkedHashMap<>();
@@ -50,7 +49,8 @@ public class SapforVersion_json implements Serializable {
public String toString() {
return Home.getName() + " : " + Utils.Brackets(description);
}
public void init(File configurationRoot) {
public SapforVersionState init(File configurationRoot) {
SapforVersionState state = SapforVersionState.Empty;
String relativePath = Global.isWindows ? Utils.toW(version) : version;
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
files = new LinkedHashMap<>();
@@ -66,11 +66,14 @@ public class SapforVersion_json implements Serializable {
}
}
}
if (!files.isEmpty())
state = SapforVersionState.Normal;
}
parse_out = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.parse_out_file).toFile());
parse_err = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.parse_err_file).toFile());
out = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.out_file).toFile());
err = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.err_file).toFile());
return state;
}
public boolean isMatch(SapforVersion_json version_json) {
if (!description.equals(version_json.description)) {