решение проблемы совместимости с java 1.8._4xx
This commit is contained in:
2025-04-21 15:27:20 +03:00
parent e8c748eb7e
commit b37e20e4a4
71 changed files with 361 additions and 154 deletions

View File

@@ -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);
}
}