search: small improvement/fix

This commit is contained in:
honfika@gmail.com
2016-12-24 22:56:41 +01:00
parent 407d1c2235
commit 9ecb2e4a81
4 changed files with 27 additions and 14 deletions

View File

@@ -247,10 +247,18 @@ public class ActionPanel extends JPanel implements SearchListener<ActionSearchRe
public List<ActionSearchResult> search(SWF swf, final String txt, boolean ignoreCase, boolean regexp, boolean pcode, CancellableWorker<Void> worker) {
if (txt != null && !txt.isEmpty()) {
searchPanel.setOptions(ignoreCase, regexp);
String workText = AppStrings.translate("work.searching");
String decAdd = AppStrings.translate("work.decompiling");
return new ActionScriptSearch().searchAs2(swf, txt, ignoreCase, regexp, pcode, new ScriptSearchListener() {
@Override
public void onWork(String message) {
Main.startWork(message, worker);
public void onDecompile(int pos, int total, String name) {
Main.startWork(workText + " \"" + txt + "\", " + decAdd + " - (" + pos + "/" + total + ") " + name + "... ", worker);
}
@Override
public void onSearch(int pos, int total, String name) {
Main.startWork(workText + " \"" + txt + "\" - (" + pos + "/" + total + ") " + name + "... ", worker);
}
});
}