no message

This commit is contained in:
2024-10-07 14:22:52 +03:00
parent 6b1576461d
commit 61fc37b574
173 changed files with 960 additions and 1526 deletions

View File

@@ -1,4 +1,6 @@
package Visual_DVM_2021.Passes.All;
import Common.CommonConstants;
import Common.Utils.CommonUtils;
import Common_old.Constants;
import Common_old.Current;
import _VisualDVM.Global;
@@ -89,7 +91,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
prepareForParse(); //---->
//-
performanceTime = 0;
exitCode = Constants.Nan;
exitCode = CommonConstants.Nan;
//------------------
workspace = Paths.get(Global.TempDirectory.getAbsolutePath(), Utils.getDateName("precompilation")).toFile();
FileUtils.forceMkdir(workspace);
@@ -138,8 +140,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 = Constants.Nan;
int messageType = Constants.Nan;
int messageLine = CommonConstants.Nan;
int messageType = CommonConstants.Nan;
Vector<String> messageText = new Vector<>();
String[] nw = text.split("\n");
for (String S : nw) {
@@ -155,7 +157,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
messageText.add(S.substring(6));
messageType = 2;
}
if (messageType != Constants.Nan) {
if (messageType != CommonConstants.Nan) {
target.db.files.Data.get(messageFile).CreateAndAddNewMessage(messageType, String.join("\n", messageText), messageLine, Constants.compiler_group);
messageStarted = false;
} else {
@@ -165,12 +167,12 @@ public class Precompilation extends Pass_2021<db_project_info> {
} else {
//анализ начала строки.
for (String name : target.db.files.Data.keySet()) {
if (S.startsWith(Utils.toU(name))) {
if (S.startsWith(CommonUtils.toU(name))) {
String[] data = S.split(":");
if (data.length > 1) {
messageFile = name;
messageLine = Integer.parseInt(data[1]);
messageType = Constants.Nan;
messageType = CommonConstants.Nan;
messageText = new Vector<>();
messageStarted = true;
}
@@ -184,7 +186,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
protected void body() throws Exception {
if (Global.isWindows) {
name_to_kill = "make.exe";
StartProcess(Utils.DQuotes(Global.db.settings.get(SettingName.LocalMakePathWindows).Value) + " -j " + Global.db.settings.get(SettingName.Kernels).toString(),
StartProcess(CommonUtils.DQuotes(Global.db.settings.get(SettingName.LocalMakePathWindows).Value) + " -j " + Global.db.settings.get(SettingName.Kernels).toString(),
target.compilation_maxtime);
} else
StartProcess("make -j " + Global.db.settings.get(SettingName.Kernels).toString(), target.compilation_maxtime);
@@ -221,7 +223,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
protected void performFinish() throws Exception {
for (DBProjectFile file : target.db.files.Data.values()) {
if (!file.last_assembly_name.isEmpty()) {
String replacement = file.last_assembly_name + " " + Utils.RBrackets(file.name);
String replacement = file.last_assembly_name + " " + CommonUtils.RBrackets(file.name);
output = output.replace(file.last_assembly_name, replacement);
}
}