фикс бага с регулярным выражением при парсе сообщений от парсера. был сплит по оф без пробелов
v++
This commit is contained in:
5
.idea/workspace.xml
generated
5
.idea/workspace.xml
generated
@@ -7,7 +7,10 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforTransformation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforTransformation.java" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/bug_1723053809" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/bug_1723053818" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package ProjectData.Files;
|
|||||||
import Common.Constants;
|
import Common.Constants;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
import Common.Global;
|
import Common.Global;
|
||||||
|
import Common.UI.UI;
|
||||||
import Common.Utils.Utils;
|
import Common.Utils.Utils;
|
||||||
import ProjectData.GCOV.GCOV_info;
|
import ProjectData.GCOV.GCOV_info;
|
||||||
import ProjectData.LanguageName;
|
import ProjectData.LanguageName;
|
||||||
@@ -18,10 +19,12 @@ import ProjectData.SapforData.Loops.Loop;
|
|||||||
import Visual_DVM_2021.UI.Main.FileForm;
|
import Visual_DVM_2021.UI.Main.FileForm;
|
||||||
import com.sun.org.glassfish.gmbal.Description;
|
import com.sun.org.glassfish.gmbal.Description;
|
||||||
import javafx.util.Pair;
|
import javafx.util.Pair;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
|
||||||
import javax.swing.tree.DefaultMutableTreeNode;
|
import javax.swing.tree.DefaultMutableTreeNode;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.PrintStream;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
@@ -62,6 +65,7 @@ public class DBProjectFile extends ProjectFile {
|
|||||||
public Vector<ArrayDecl> array_decls = new Vector<>();
|
public Vector<ArrayDecl> array_decls = new Vector<>();
|
||||||
public LinkedHashMap<String, DBProjectFile> relativeHeaders = new LinkedHashMap<>();
|
public LinkedHashMap<String, DBProjectFile> relativeHeaders = new LinkedHashMap<>();
|
||||||
public GCOV_info gcov_info = new GCOV_info();
|
public GCOV_info gcov_info = new GCOV_info();
|
||||||
|
private PrintStream Sys;
|
||||||
public DBProjectFile() {
|
public DBProjectFile() {
|
||||||
}
|
}
|
||||||
public DBProjectFile(File file_, db_project_info father_) {
|
public DBProjectFile(File file_, db_project_info father_) {
|
||||||
@@ -73,17 +77,18 @@ public class DBProjectFile extends ProjectFile {
|
|||||||
public static Pair<Integer, String> decodeParserMessage(String S, String file_in) {
|
public static Pair<Integer, String> decodeParserMessage(String S, String file_in) {
|
||||||
Integer line = 1;
|
Integer line = 1;
|
||||||
String file = file_in;
|
String file = file_in;
|
||||||
String[] data = S.split("on line ");
|
String[] data = S.split("\\son\\sline\\s");
|
||||||
if (data.length > 1) {
|
if (data.length > 1) {
|
||||||
String[] data1 = data[1].split(" ");
|
String[] data1 = data[1].split(" ");
|
||||||
if (data1.length > 0)
|
if (data1.length > 0)
|
||||||
line = Integer.parseInt(data1[0]);
|
line = Integer.parseInt(data1[0]);
|
||||||
}
|
}
|
||||||
data = S.split("of");
|
data = S.split("\\sof\\s");
|
||||||
if (data.length > 1) {
|
if (data.length > 1) {
|
||||||
String[] data1 = data[1].split(":");
|
String[] data1 = data[1].split(":");
|
||||||
if (data1.length > 0) {
|
if (data1.length > 0) {
|
||||||
file = Utils.toW(data1[0].substring(1)); //первый символ тут всегда пробел. слеши всегда виндовые.
|
file = Utils.toW(data1[0]);//.substring(1));
|
||||||
|
//первый символ тут всегда пробел. слеши всегда виндовые.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Pair<>(line, file);
|
return new Pair<>(line, file);
|
||||||
@@ -176,6 +181,7 @@ public class DBProjectFile extends ProjectFile {
|
|||||||
String[] nw = text.split("\n");
|
String[] nw = text.split("\n");
|
||||||
for (String S : nw) {
|
for (String S : nw) {
|
||||||
Pair<Integer, String> p = decodeParserMessage(S, name);
|
Pair<Integer, String> p = decodeParserMessage(S, name);
|
||||||
|
//----
|
||||||
if (S.toLowerCase().startsWith("note")) {
|
if (S.toLowerCase().startsWith("note")) {
|
||||||
father.db.files.Data.get(p.getValue()).CreateAndAddNewMessage(2, S, p.getKey(), Constants.parser_group);
|
father.db.files.Data.get(p.getValue()).CreateAndAddNewMessage(2, S, p.getKey(), Constants.parser_group);
|
||||||
} else if (S.toLowerCase().startsWith("warning")) {
|
} else if (S.toLowerCase().startsWith("warning")) {
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ public class Message extends FileObject {
|
|||||||
file = file_in;
|
file = file_in;
|
||||||
line = line_in;
|
line = line_in;
|
||||||
setGroup(group_in);
|
setGroup(group_in);
|
||||||
if ((group == Constants.parser_group) || (Current.mode != Current.Mode.Normal)) {
|
if ((group == Constants.parser_group) ||
|
||||||
|
(group == Constants.compiler_group) ||
|
||||||
|
(Current.mode != Current.Mode.Normal)) {
|
||||||
value = value_in;
|
value = value_in;
|
||||||
} else {
|
} else {
|
||||||
value = !Global.getSetting(SettingName.TRANSLATE_MESSAGES).toBoolean() ? value_in : decodeRussianMessage(value_in);
|
value = !Global.getSetting(SettingName.TRANSLATE_MESSAGES).toBoolean() ? value_in : decodeRussianMessage(value_in);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class Visualiser extends Component {
|
|||||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||||
@Override
|
@Override
|
||||||
public void GetVersionInfo() {
|
public void GetVersionInfo() {
|
||||||
version = 1113;
|
version = 1114;
|
||||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||||
date_text = df.format(getClassBuildTime());
|
date_text = df.format(getClassBuildTime());
|
||||||
|
|||||||
Reference in New Issue
Block a user