mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 12:50:47 +00:00
Issue #431: Canceling background threads (after timeout, or after user action, e.g new treeitem selected) fixed + small fixes
This commit is contained in:
@@ -37,7 +37,10 @@ public abstract class GraphSource implements Serializable {
|
||||
|
||||
public abstract List<GraphTargetItem> translatePart(GraphPart part, List<Object> localData, Stack<GraphTargetItem> stack, int start, int end, int staticOperation, String path) throws InterruptedException;
|
||||
|
||||
private void visitCode(int ip, int lastIp, HashMap<Integer, List<Integer>> refs, int endIp) {
|
||||
private void visitCode(int ip, int lastIp, HashMap<Integer, List<Integer>> refs, int endIp) throws InterruptedException {
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
}
|
||||
boolean debugMode = false;
|
||||
while (((endIp == -1) || (ip < endIp)) && (ip < size())) {
|
||||
refs.get(ip).add(lastIp);
|
||||
@@ -87,7 +90,7 @@ public abstract class GraphSource implements Serializable {
|
||||
};
|
||||
}
|
||||
|
||||
public HashMap<Integer, List<Integer>> visitCode(List<Integer> alternateEntries) {
|
||||
public HashMap<Integer, List<Integer>> visitCode(List<Integer> alternateEntries) throws InterruptedException {
|
||||
HashMap<Integer, List<Integer>> refs = new HashMap<>();
|
||||
int siz = size();
|
||||
for (int i = 0; i < siz; i++) {
|
||||
|
||||
Reference in New Issue
Block a user