рефакторинг

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 Visual_DVM_2021.Passes.All;
import Common.Constants.Constants;
import Common.Current;
import Common.Global;
import Common.UI.UI;
@@ -89,7 +90,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
prepareForParse(); //---->
//-
performanceTime = 0;
exitCode = Utils.Nan;
exitCode = Constants.Nan;
//------------------
workspace = Paths.get(Global.TempDirectory.getAbsolutePath(), Utils.getDateName("precompilation")).toFile();
FileUtils.forceMkdir(workspace);
@@ -138,8 +139,8 @@ public class Precompilation extends Pass_2021<db_project_info> {
protected static void unpackPrecompilationMessages(db_project_info target, String text) throws Exception {
boolean messageStarted = false;
String messageFile = "";
int messageLine = Utils.Nan;
int messageType = Utils.Nan;
int messageLine = Constants.Nan;
int messageType = Constants.Nan;
Vector<String> messageText = new Vector<>();
String[] nw = text.split("\n");
for (String S : nw) {
@@ -155,7 +156,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
messageText.add(S.substring(6));
messageType = 2;
}
if (messageType != Utils.Nan) {
if (messageType != Constants.Nan) {
target.db.files.Data.get(messageFile).CreateAndAddNewMessage(messageType, String.join("\n", messageText), messageLine, Message.parser_group);
messageStarted = false;
} else {
@@ -170,7 +171,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
if (data.length > 1) {
messageFile = name;
messageLine = Integer.parseInt(data[1]);
messageType = Utils.Nan;
messageType = Constants.Nan;
messageText = new Vector<>();
messageStarted = true;
}