фикс бага с регулярным выражением при парсе сообщений от парсера. был сплит по оф без пробелов
v++
This commit is contained in:
5
.idea/workspace.xml
generated
5
.idea/workspace.xml
generated
@@ -7,7 +7,10 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<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>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
@@ -2,6 +2,7 @@ package ProjectData.Files;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.UI.UI;
|
||||
import Common.Utils.Utils;
|
||||
import ProjectData.GCOV.GCOV_info;
|
||||
import ProjectData.LanguageName;
|
||||
@@ -18,10 +19,12 @@ import ProjectData.SapforData.Loops.Loop;
|
||||
import Visual_DVM_2021.UI.Main.FileForm;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
import javafx.util.Pair;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
@@ -62,6 +65,7 @@ public class DBProjectFile extends ProjectFile {
|
||||
public Vector<ArrayDecl> array_decls = new Vector<>();
|
||||
public LinkedHashMap<String, DBProjectFile> relativeHeaders = new LinkedHashMap<>();
|
||||
public GCOV_info gcov_info = new GCOV_info();
|
||||
private PrintStream Sys;
|
||||
public DBProjectFile() {
|
||||
}
|
||||
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) {
|
||||
Integer line = 1;
|
||||
String file = file_in;
|
||||
String[] data = S.split("on line ");
|
||||
String[] data = S.split("\\son\\sline\\s");
|
||||
if (data.length > 1) {
|
||||
String[] data1 = data[1].split(" ");
|
||||
if (data1.length > 0)
|
||||
line = Integer.parseInt(data1[0]);
|
||||
}
|
||||
data = S.split("of");
|
||||
data = S.split("\\sof\\s");
|
||||
if (data.length > 1) {
|
||||
String[] data1 = data[1].split(":");
|
||||
if (data1.length > 0) {
|
||||
file = Utils.toW(data1[0].substring(1)); //первый символ тут всегда пробел. слеши всегда виндовые.
|
||||
file = Utils.toW(data1[0]);//.substring(1));
|
||||
//первый символ тут всегда пробел. слеши всегда виндовые.
|
||||
}
|
||||
}
|
||||
return new Pair<>(line, file);
|
||||
@@ -176,6 +181,7 @@ public class DBProjectFile extends ProjectFile {
|
||||
String[] nw = text.split("\n");
|
||||
for (String S : nw) {
|
||||
Pair<Integer, String> p = decodeParserMessage(S, name);
|
||||
//----
|
||||
if (S.toLowerCase().startsWith("note")) {
|
||||
father.db.files.Data.get(p.getValue()).CreateAndAddNewMessage(2, S, p.getKey(), Constants.parser_group);
|
||||
} else if (S.toLowerCase().startsWith("warning")) {
|
||||
|
||||
@@ -23,7 +23,9 @@ public class Message extends FileObject {
|
||||
file = file_in;
|
||||
line = line_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;
|
||||
} else {
|
||||
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
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
version = 1113;
|
||||
version = 1114;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
Reference in New Issue
Block a user