рефакторинг

This commit is contained in:
2023-09-29 21:46:08 +03:00
parent 12898b07bb
commit 760707e6fb
41 changed files with 510 additions and 486 deletions

View File

@@ -1,4 +1,5 @@
package ProjectData.Project;
import Common.Constants.Constants;
import Common.Current;
import Common.Database.DBObject;
import Common.Global;
@@ -82,7 +83,7 @@ public class db_project_info extends DBObject {
public String Log = "";//текст выдаваемый сапфором
//-----------------------------------------------
@Description("DEFAULT -1")
public long creationDate = Utils.Nan; //--------------------------------------------------NEW.
public long creationDate = Constants.Nan; //--------------------------------------------------NEW.
@Description("DEFAULT ''")
public String compilation_output = "";
@Description("DEFAULT ''")
@@ -105,19 +106,19 @@ public class db_project_info extends DBObject {
public int maxdim = 0;
//<editor-fold desc="Метрика">
@Description("DEFAULT -1")
public int numLines = Utils.Nan;
public int numLines = Constants.Nan;
@Description("DEFAULT -1")
public int numSPF = Utils.Nan;
public int numSPF = Constants.Nan;
@Description("DEFAULT -1")
public int numDVM = Utils.Nan;
public int numDVM = Constants.Nan;
@Description("DEFAULT -1")
public int numArrays = Utils.Nan;
public int numArrays = Constants.Nan;
@Description("DEFAULT -1")
public int numLoops = Utils.Nan;
public int numLoops = Constants.Nan;
@Description("DEFAULT -1")
public int numFunctions = Utils.Nan;
public int numFunctions = Constants.Nan;
@Description("DEFAULT -1")
public int numAddicted = Utils.Nan;
public int numAddicted = Constants.Nan;
//-------------------------------------
//параметры графа функций. храним для каждого проекта.
@Description("DEFAULT 500")
@@ -435,13 +436,13 @@ public class db_project_info extends DBObject {
allIncludes.clear();
files_order.clear();
functionsGraph.Clear();
numLines = Utils.Nan;
numSPF = Utils.Nan;
numDVM = Utils.Nan;
numArrays = Utils.Nan;
numFunctions = Utils.Nan;
numAddicted = Utils.Nan;
numLoops = Utils.Nan;
numLines = Constants.Nan;
numSPF = Constants.Nan;
numDVM = Constants.Nan;
numArrays = Constants.Nan;
numFunctions = Constants.Nan;
numAddicted = Constants.Nan;
numLoops = Constants.Nan;
Log = "";
Scenario = "";
declaratedArrays.clear();
@@ -565,10 +566,10 @@ public class db_project_info extends DBObject {
return numLoops == ParallelVariant.statNaN ? recommendAnalysis(PassCode_2021.SPF_GetGraphLoops) : String.valueOf(numLoops);
}
public String FunctionsCount() {
return numFunctions == Utils.Nan ? recommendAnalysis(PassCode_2021.SPF_GetGraphFunctions) : String.valueOf(numFunctions);
return numFunctions == Constants.Nan ? recommendAnalysis(PassCode_2021.SPF_GetGraphFunctions) : String.valueOf(numFunctions);
}
public String AddictedCount() {
return numAddicted == Utils.Nan ? recommendAnalysis(PassCode_2021.SPF_GetIncludeDependencies) : String.valueOf(numAddicted);
return numAddicted == Constants.Nan ? recommendAnalysis(PassCode_2021.SPF_GetIncludeDependencies) : String.valueOf(numAddicted);
}
public boolean UpdateLinesCount() {
try {