построение дерева версий результатов тестирования(еще с багами), и фикс мелкого бага
This commit is contained in:
@@ -51,7 +51,6 @@ public class db_project_info extends DBObject {
|
||||
public static Vector<db_project_info> newVersions = new Vector<>();
|
||||
public static final String launch_script_name = "run";
|
||||
public static final String default_binary_name = "0";
|
||||
public static final String data = "visualiser_data";
|
||||
public static final String spf = "spf.proj";
|
||||
public static final String options = "options";
|
||||
public static final String gcov = "gcov";
|
||||
@@ -261,7 +260,7 @@ public class db_project_info extends DBObject {
|
||||
}
|
||||
//-
|
||||
public static File get_db_file(File project_home) {
|
||||
return new File(Paths.get(project_home.toString(), data,
|
||||
return new File(Paths.get(project_home.toString(), Constants.data,
|
||||
Global.properties.ProjectDBName).toString());
|
||||
}
|
||||
public static String recommendAnalysis(PassCode_2021 code_in) {
|
||||
@@ -345,22 +344,22 @@ public class db_project_info extends DBObject {
|
||||
return name + " " + Utils.DQuotes(description);
|
||||
}
|
||||
public File getProjFile() {
|
||||
return Paths.get(Home.getAbsolutePath(), data, spf).toFile();
|
||||
return Paths.get(Home.getAbsolutePath(), Constants.data, spf).toFile();
|
||||
}
|
||||
public File getDataDirectory() {
|
||||
return Paths.get(Home.getAbsolutePath(), data).toFile();
|
||||
return Paths.get(Home.getAbsolutePath(), Constants.data).toFile();
|
||||
}
|
||||
public File getOptionsDirectory() {
|
||||
return Paths.get(Home.getAbsolutePath(), data, options).toFile();
|
||||
return Paths.get(Home.getAbsolutePath(), Constants.data, options).toFile();
|
||||
}
|
||||
public File getGCOVDirectory() {
|
||||
return Paths.get(Home.getAbsolutePath(), data, gcov).toFile();
|
||||
return Paths.get(Home.getAbsolutePath(), Constants.data, gcov).toFile();
|
||||
}
|
||||
public File getAttachmentsDirectory() {
|
||||
return Paths.get(Home.getAbsolutePath(), data, attachments).toFile();
|
||||
return Paths.get(Home.getAbsolutePath(), Constants.data, attachments).toFile();
|
||||
}
|
||||
public File getAnalyzerDirectory() {
|
||||
return Paths.get(Home.getAbsolutePath(), data, Global.PerformanceAnalyzer).toFile();
|
||||
return Paths.get(Home.getAbsolutePath(), Constants.data, Global.PerformanceAnalyzer).toFile();
|
||||
}
|
||||
public Vector<File> getScreenShots() {
|
||||
Vector<File> res = new Vector<>();
|
||||
@@ -374,7 +373,7 @@ public class db_project_info extends DBObject {
|
||||
return res;
|
||||
}
|
||||
public File getStatisticDirectory() {
|
||||
return Paths.get(Home.getAbsolutePath(), data, statistic).toFile();
|
||||
return Paths.get(Home.getAbsolutePath(), Constants.data, statistic).toFile();
|
||||
}
|
||||
public db_project_info find_version_r(File v_home) {
|
||||
if (Home.equals(v_home)) return this;
|
||||
@@ -960,7 +959,7 @@ public class db_project_info extends DBObject {
|
||||
}
|
||||
public boolean isProjectDirectory(File dir) {
|
||||
if (!dir.isDirectory()) return false;
|
||||
if (dir.getName().equals(data)) return false;
|
||||
if (dir.getName().equals(Constants.data)) return false;
|
||||
for (db_project_info version : versions.values()) {
|
||||
if (version.Home.equals(dir)) return false;
|
||||
}
|
||||
@@ -1338,7 +1337,7 @@ public class db_project_info extends DBObject {
|
||||
//определить проект ли данная папка. и выделить его подпапки.
|
||||
for (File file : files_) {
|
||||
if (file.isDirectory()) {
|
||||
if (file.getName().equals(data)) {
|
||||
if (file.getName().equals(Constants.data)) {
|
||||
result = dir.equals(this.Home) ? this : new db_project_info(dir);
|
||||
result.node = new DefaultMutableTreeNode(result); //узел в древе версий.
|
||||
//не является нарушением разделения графики и данных. за графику все равно отвечает рендерер.
|
||||
|
||||
Reference in New Issue
Block a user