Исправление недочета с spf директивами. Пустые версии пакета отображаются серым. v++
This commit is contained in:
6
src/TestingSystem/SAPFOR/Json/SapforVersionState.java
Normal file
6
src/TestingSystem/SAPFOR/Json/SapforVersionState.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package TestingSystem.SAPFOR.Json;
|
||||
public enum SapforVersionState {
|
||||
Empty, //версия оказалась пуста.
|
||||
Normal, //версия построена
|
||||
HasErrors //в журнале версии есть ошибки. то есть, не удалось построить следующую версию.
|
||||
}
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user