mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 07:10:46 +00:00
Added: AS2 - Information about need of decompiling all scripts to detect uninitialized class fields
Fixed: #2338 AS decompiling threads got stuck after cancelling / timeout CancellableWorker refactoring
This commit is contained in:
@@ -529,7 +529,7 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
|
||||
boolean decompileNeeded = decompiledText == null;
|
||||
|
||||
if (disassemblingNeeded || decompileNeeded) {
|
||||
CancellableWorker worker = new CancellableWorker() {
|
||||
CancellableWorker worker = new CancellableWorker("actionPanel") {
|
||||
@Override
|
||||
protected Void doInBackground() throws Exception {
|
||||
|
||||
@@ -550,10 +550,15 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
|
||||
asm.removeDisassemblyListener(listener);
|
||||
}
|
||||
|
||||
if (decompileNeeded) {
|
||||
if (decompileNeeded) {
|
||||
View.execInEventDispatch(() -> {
|
||||
decompiledEditor.setShowMarkers(false);
|
||||
setDecompiledText("-", "-", "// " + AppStrings.translate("work.decompiling") + "...");
|
||||
if (src.getSwf().needsCalculatingAS2UninitializeClassTraits(src)) {
|
||||
setEditorText(asm.getScriptName(), asm.getExportedScriptName(), "; ...", "text/flasm");
|
||||
setDecompiledText("-", "-", "// " + AppStrings.translate("work.decompiling.allScripts.ucf") + "...");
|
||||
} else {
|
||||
setDecompiledText("-", "-", "// " + AppStrings.translate("work.decompiling") + "...");
|
||||
}
|
||||
});
|
||||
|
||||
HighlightedText htext = SWF.getCached(asm, innerActions);
|
||||
@@ -584,6 +589,7 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
|
||||
} catch (CancellationException ex) {
|
||||
editor.setShowMarkers(false);
|
||||
setEditorText("-", "-", "; " + AppStrings.translate("work.canceled"), "text/flasm");
|
||||
setDecompiledText("-", "-", "// " + AppStrings.translate("work.canceled"));
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Error", ex);
|
||||
decompiledEditor.setShowMarkers(false);
|
||||
|
||||
Reference in New Issue
Block a user