mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 16:50:46 +00:00
Issue #156 Fixed search freezing
This commit is contained in:
@@ -467,15 +467,14 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener {
|
||||
decompiledTextArea.setScript(found.get(foundPos), list);
|
||||
hilightScript(found.get(foundPos));
|
||||
decompiledTextArea.setCaretPosition(0);
|
||||
java.util.Timer t = new java.util.Timer();
|
||||
t.schedule(new TimerTask() {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
DocumentSearchData dsd = DocumentSearchData.getFromEditor(decompiledTextArea);
|
||||
dsd.setPattern(searchFor, searchRegexp, searchIgnoreCase);
|
||||
dsd.showQuickFindDialogEx(decompiledTextArea, searchIgnoreCase, searchRegexp);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ import javax.swing.JScrollPane;
|
||||
import javax.swing.JSplitPane;
|
||||
import javax.swing.JToggleButton;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.border.BevelBorder;
|
||||
import javax.swing.event.CaretEvent;
|
||||
import javax.swing.event.CaretListener;
|
||||
@@ -663,14 +664,14 @@ public class ActionPanel extends JPanel implements ActionListener {
|
||||
Main.mainFrame.tagTree.scrollPathToVisible(tp);
|
||||
decompiledEditor.setCaretPosition(0);
|
||||
java.util.Timer t = new java.util.Timer();
|
||||
t.schedule(new TimerTask() {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
DocumentSearchData dsd = DocumentSearchData.getFromEditor(decompiledEditor);
|
||||
dsd.setPattern(searchFor, searchRegexp, searchIgnoreCase);
|
||||
dsd.showQuickFindDialogEx(decompiledEditor, searchIgnoreCase, searchRegexp);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
|
||||
private void uncache(ASMSource pack) {
|
||||
|
||||
@@ -68,15 +68,15 @@ public class Graph {
|
||||
|
||||
private void fixGraph(GraphPart part) {
|
||||
//if(true) return;
|
||||
try{
|
||||
try {
|
||||
while (fixGraphOnce(part, new ArrayList<GraphPart>(), false)) {
|
||||
}
|
||||
}catch(Exception | Error ex){
|
||||
}
|
||||
} catch (Exception | Error ex) {
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
|
||||
private boolean fixGraphOnce(GraphPart part, List<GraphPart> visited, boolean doChildren) {
|
||||
private boolean fixGraphOnce(GraphPart part, List<GraphPart> visited, boolean doChildren) {
|
||||
if (visited.contains(part)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user