++
решение проблемы совместимости с java 1.8._4xx
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.ProjectData.Files;
|
||||
import Common.Utils.Pair;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
@@ -14,12 +15,10 @@ import _VisualDVM.ProjectData.SapforData.FileObjectWithMessages;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FuncCall;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FuncInfo;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FunctionType;
|
||||
import _VisualDVM.ProjectData.SapforData.Includes.Include;
|
||||
import _VisualDVM.ProjectData.SapforData.Loops.Loop;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.Visual.Windows.FileForm;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import java.io.File;
|
||||
@@ -477,44 +476,43 @@ public class DBProjectFile extends ProjectFile {
|
||||
return res;
|
||||
}
|
||||
//---
|
||||
public void saveLoops(List<Loop> loopNests_in){
|
||||
public void saveLoops(List<Loop> loopNests_in) {
|
||||
AllLoops.clear();
|
||||
LoopNests.clear();
|
||||
//--
|
||||
LoopNests.addAll(loopNests_in);
|
||||
for (Loop loop: LoopNests){
|
||||
for (Loop loop : LoopNests) {
|
||||
loop.setFile(this.name);
|
||||
loop.toMap_r(AllLoops);
|
||||
}
|
||||
LoopGraphTitle = "Всего циклов: " +AllLoops.size();
|
||||
LoopGraphTitle = "Всего циклов: " + AllLoops.size();
|
||||
}
|
||||
public void saveFunctions(List<FuncInfo> funcInfos_in) throws Exception{
|
||||
public void saveFunctions(List<FuncInfo> funcInfos_in) throws Exception {
|
||||
function_decls.clear();
|
||||
int call_count = 0;
|
||||
//--
|
||||
for (FuncInfo funcInfo: funcInfos_in){
|
||||
for (FuncInfo funcInfo : funcInfos_in) {
|
||||
//--
|
||||
funcInfo.file = this.name;
|
||||
funcInfo.ownCalls = new LinkedHashMap<>();
|
||||
funcInfo.CheckMessagesPresence();
|
||||
//--
|
||||
for (FuncCall call: funcInfo.callsFrom){
|
||||
for (FuncCall call : funcInfo.callsFrom) {
|
||||
call.file = this.name;
|
||||
call.parentLineOffset = funcInfo.line - call.line;
|
||||
call.parentLineOffset = funcInfo.line - call.line;
|
||||
call.CheckMessagesPresence();
|
||||
}
|
||||
if (funcInfo.isMain!=0){
|
||||
if (funcInfo.isMain != 0) {
|
||||
isMain = 1;
|
||||
funcInfo.type = FunctionType.Main;
|
||||
father.main_function = funcInfo;
|
||||
father.db.Update(this);
|
||||
}else {
|
||||
} else {
|
||||
funcInfo.type = FunctionType.Default;
|
||||
}
|
||||
//--
|
||||
function_decls.put(funcInfo.funcName, funcInfo);
|
||||
call_count+=funcInfo.callsFrom.size();
|
||||
|
||||
call_count += funcInfo.callsFrom.size();
|
||||
}
|
||||
//--
|
||||
CallGraphTitle = "Объявлений : " + function_decls.size() + "; Вызовов : " + call_count;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.ProjectData.Files.UI.Editor;
|
||||
import Common.Utils.Pair;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Editor.BaseEditor;
|
||||
import Common.Visual.Menus.StyledPopupMenu;
|
||||
@@ -12,7 +13,6 @@ import _VisualDVM.Utils;
|
||||
import _VisualDVM.Visual.Editor.CaretInfo;
|
||||
import _VisualDVM.Visual.Interface.SPFEditorInterface;
|
||||
import _VisualDVM.Visual.Menus.MainEditorMenu;
|
||||
import javafx.util.Pair;
|
||||
import org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaHighlighter;
|
||||
|
||||
import javax.swing.event.DocumentEvent;
|
||||
|
||||
@@ -24,11 +24,11 @@ public class FileGraphTree extends DataTree {
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
Global.mainModule.getFile().form.EventsOff();
|
||||
Object o = Global.mainModule.get(currentName());
|
||||
if (o instanceof FileObjectWithMessages){
|
||||
if (o instanceof FileObjectWithMessages) {
|
||||
FileObjectWithMessages f = (FileObjectWithMessages) o;
|
||||
Global.mainModule.getFile().form.getEditor().gotoLine(f.line);
|
||||
Global.mainModule.getFile().form.ShowMessages(f);
|
||||
}else {
|
||||
} else {
|
||||
Global.mainModule.getFile().form.getEditor().gotoLine(1);
|
||||
Global.mainModule.getFile().form.ShowMessages();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.ProjectData.GCOV;
|
||||
import javafx.util.Pair;
|
||||
import Common.Utils.Pair;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
public class GCOV_info {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Message extends iDBObject {
|
||||
} else {
|
||||
if (Global.mainModule.HasProject()) {
|
||||
value = !Global.mainModule.getProject().sapforProperties.TRANSLATE_MESSAGES ? value_in : decodeRussianMessage(value_in);
|
||||
}else {
|
||||
} else {
|
||||
value = decodeRussianMessage(value_in);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@ import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.MainModule_;
|
||||
import Common.Passes.PassException;
|
||||
import Common.Utils.Index;
|
||||
import Common.Utils.TextLog;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Utils.Vector_;
|
||||
import Common.Utils.*;
|
||||
import Common.Visual.UI;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Current;
|
||||
@@ -41,7 +38,6 @@ import _VisualDVM.ProjectData.SapforData.Variants.ParallelVariantsSet;
|
||||
import _VisualDVM.Utils;
|
||||
import com.mxgraph.swing.mxGraphComponent;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
import javafx.util.Pair;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
@@ -777,8 +773,8 @@ public class db_project_info extends DBObject {
|
||||
if (call.funcName.equals(decl1.funcName)) {
|
||||
if (!decl1.ownCalls.containsKey(call.file))
|
||||
decl1.ownCalls.put(call.file, new Vector<>());
|
||||
if (decl1.needToInline==1) call.Select(true);
|
||||
call.canBeInlined = decl1.doNotInline==0;
|
||||
if (decl1.needToInline == 1) call.Select(true);
|
||||
call.canBeInlined = decl1.doNotInline == 0;
|
||||
decl1.ownCalls.get(call.file).add(call);
|
||||
node.add(new DefaultMutableTreeNode(call));
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays.Distribution;
|
||||
import Common.Utils.Index;
|
||||
import Common.Utils.Pair;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Vector;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays.Distribution;
|
||||
import Common.Utils.Pair;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ArrayLocation;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.Index;
|
||||
import Common.Utils.Pair;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -12,7 +13,6 @@ import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateDimensionState
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateLink;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.UI.ArrayAlignmentBar;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.math.BigInteger;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays.Templates;
|
||||
import Common.Utils.Index;
|
||||
import javafx.util.Pair;
|
||||
import Common.Utils.Pair;
|
||||
|
||||
import java.util.Vector;
|
||||
public class TemplateLink {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
package _VisualDVM.ProjectData.SapforData;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Selectable;
|
||||
import _VisualDVM.Global;
|
||||
@@ -11,6 +10,9 @@ public class FileObject implements Selectable {
|
||||
public String file = "";
|
||||
@Expose
|
||||
public int line = 1;
|
||||
//Selectable----
|
||||
@Description("IGNORE")
|
||||
boolean selected = false;
|
||||
public FileObject() {
|
||||
}
|
||||
public FileObject(String file_in) {
|
||||
@@ -22,9 +24,6 @@ public class FileObject implements Selectable {
|
||||
public void Show(boolean focus) {
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().GotoFile(file, line, focus);
|
||||
}
|
||||
//Selectable----
|
||||
@Description("IGNORE")
|
||||
boolean selected=false;
|
||||
public String getSelectionText() {
|
||||
return "файл " + Utils_.Brackets(file) + " строка: " + line;
|
||||
}
|
||||
@@ -37,7 +36,7 @@ public class FileObject implements Selectable {
|
||||
selected = flag;
|
||||
}
|
||||
//-------
|
||||
public void setFile(String file_in){
|
||||
public void setFile(String file_in) {
|
||||
file = file_in;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObjectWithMessages;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
public class FuncCall extends FileObjectWithMessages{
|
||||
public class FuncCall extends FileObjectWithMessages {
|
||||
//JSON------------------------------------------
|
||||
@Expose
|
||||
public String funcName = "";
|
||||
|
||||
@@ -26,7 +26,6 @@ public class FuncInfo extends FileObjectWithMessages {
|
||||
@Expose
|
||||
public List<FunctionParameterJson> params = new Vector<>();
|
||||
//END OF JSON-----------------------------------------
|
||||
|
||||
public FunctionType type = FunctionType.Default;
|
||||
//вызовы функций в теле этой функции
|
||||
@Expose
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Functions.Json;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import java.util.List;
|
||||
public class FunctionParameterJson {
|
||||
@Expose
|
||||
public Integer inoutType;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Functions.Json;
|
||||
import _VisualDVM.ProjectData.SapforData.Loops.Json.FileLoopsJson;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Functions.UI.Graph;
|
||||
import javafx.util.Pair;
|
||||
import Common.Utils.Pair;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Functions.UI.Graph;
|
||||
import Common.Utils.Pair;
|
||||
import Common.Utils.Utils_;
|
||||
import com.mxgraph.swing.mxGraphComponent;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
@@ -10,24 +10,6 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
public class Loop extends FileObjectWithMessages {
|
||||
@Expose
|
||||
private int lineNumAfterLoop;
|
||||
@Expose
|
||||
private int perfectLoop;
|
||||
@Expose
|
||||
private int hasNonRectangularBounds;
|
||||
@Expose
|
||||
private int loopState;
|
||||
public LoopState getLoopState(){
|
||||
switch (loopState){
|
||||
case 1:
|
||||
return LoopState.GoodLoop;
|
||||
case 2:
|
||||
return LoopState.BadLoop;
|
||||
default:
|
||||
return LoopState.Loop;
|
||||
}
|
||||
}
|
||||
//---
|
||||
@Expose
|
||||
public List<Integer> extGotos = new Vector<>();
|
||||
@@ -42,28 +24,45 @@ public class Loop extends FileObjectWithMessages {
|
||||
public List<FuncCall> funcCalls = new Vector<>();
|
||||
@Expose
|
||||
public List<Loop> children = new Vector<>();
|
||||
@Expose
|
||||
private int lineNumAfterLoop;
|
||||
@Expose
|
||||
private int perfectLoop;
|
||||
@Expose
|
||||
private int hasNonRectangularBounds;
|
||||
@Expose
|
||||
private int loopState;
|
||||
public LoopState getLoopState() {
|
||||
switch (loopState) {
|
||||
case 1:
|
||||
return LoopState.GoodLoop;
|
||||
case 2:
|
||||
return LoopState.BadLoop;
|
||||
default:
|
||||
return LoopState.Loop;
|
||||
}
|
||||
}
|
||||
//--
|
||||
public List<FileObjectWithMessages> getGraphNodes(DBProjectFile dbProjectFile){
|
||||
public List<FileObjectWithMessages> getGraphNodes(DBProjectFile dbProjectFile) {
|
||||
List<FileObjectWithMessages> all_children = new Vector<>();
|
||||
//-
|
||||
if (hasNonRectangularBounds!=0)
|
||||
if (hasNonRectangularBounds != 0)
|
||||
all_children.add(new NonRectIter(dbProjectFile, line));
|
||||
//-
|
||||
all_children.addAll(funcCalls);
|
||||
//-
|
||||
for (int line_: extGotos)
|
||||
for (int line_ : extGotos)
|
||||
all_children.add(new EGoto(dbProjectFile, line_));
|
||||
for (int line_: intGotos)
|
||||
for (int line_ : intGotos)
|
||||
all_children.add(new IGoto(dbProjectFile, line_));
|
||||
for (int line_: ios)
|
||||
for (int line_ : ios)
|
||||
all_children.add(new IO(dbProjectFile, line_));
|
||||
for (int line_: stops)
|
||||
for (int line_ : stops)
|
||||
all_children.add(new Stop(dbProjectFile, line_));
|
||||
//-
|
||||
for (FileObjectWithMessages fileObjectWithMessages: all_children){
|
||||
for (FileObjectWithMessages fileObjectWithMessages : all_children) {
|
||||
fileObjectWithMessages.CheckMessagesPresence();
|
||||
}
|
||||
|
||||
all_children.addAll(children); //у них уже проверено. (?)
|
||||
return all_children;
|
||||
}
|
||||
@@ -87,18 +86,18 @@ public class Loop extends FileObjectWithMessages {
|
||||
public VisualiserFonts getFont() {
|
||||
return getLoopState().getFont();
|
||||
}
|
||||
public void toMap_r(LinkedHashMap<Integer, Loop> loops_map){
|
||||
public void toMap_r(LinkedHashMap<Integer, Loop> loops_map) {
|
||||
CheckMessagesPresence();
|
||||
loops_map.put(line, this);
|
||||
for (Loop loop: children)
|
||||
for (Loop loop : children)
|
||||
loop.toMap_r(loops_map);
|
||||
}
|
||||
@Override
|
||||
public void setFile(String file_in) {
|
||||
super.setFile(file_in);
|
||||
for (FuncCall funcCall: funcCalls)
|
||||
for (FuncCall funcCall : funcCalls)
|
||||
funcCall.setFile(file_in);
|
||||
for (Loop child: children)
|
||||
for (Loop child : children)
|
||||
child.setFile(file_in);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Regions;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.Index;
|
||||
import Common.Utils.Pair;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.AlignRule;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.DataDirective;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Regions.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Utils.Pair;
|
||||
import Common.Visual.Tables.StyledCellLabel;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Variants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.Pair;
|
||||
import _VisualDVM.ProjectData.PredictorStatistic.PredictorStatistics_2021;
|
||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import java.io.File;
|
||||
import java.math.BigInteger;
|
||||
|
||||
Reference in New Issue
Block a user