diff --git a/CHANGELOG.md b/CHANGELOG.md index 07c13a63f..365190b34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ All notable changes to this project will be documented in this file. - Exceptions on cancelling file loading - Switching between openables on session load and on view type change - Float/Float4 ABC format support +- AS3 Hilighting (go to) scripts when script has obfuscated name ### Changed - [#2070] String values inside SWF to XML export are backslash escaped diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3ClassTreeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3ClassTreeItem.java index 0b9892c8b..4b8be2e26 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3ClassTreeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3ClassTreeItem.java @@ -44,6 +44,14 @@ public abstract class AS3ClassTreeItem implements TreeItem { } return ret; } + + public String getPrintableNameWithNamespaceSuffix() { + String ret = IdentifiersDeobfuscation.printIdentifier(true, name); + if (namespaceSuffix != null) { + ret += namespaceSuffix; + } + return ret; + } public String getPath() { return path.toString(); @@ -51,10 +59,6 @@ public abstract class AS3ClassTreeItem implements TreeItem { @Override public String toString() { - String ret = IdentifiersDeobfuscation.printIdentifier(true, name); - if (namespaceSuffix != null) { - ret += namespaceSuffix; - } - return ret; + return getPrintableNameWithNamespaceSuffix(); } } diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java index 36ed9ad02..0d55a9f89 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java @@ -546,7 +546,7 @@ public class ABCExplorerDialog extends AppDialog { } if (found) { DottedChain scriptNameDc = abc.script_info.get(scriptIndex).getSimplePackName(abc); - String scriptName = (scriptNameDc == null ? "script_" + scriptIndex : scriptNameDc.toRawString()); + String scriptName = (scriptNameDc == null ? "script_" + scriptIndex : scriptNameDc.toPrintableString(true)); mainPanel.gotoScriptTrait(abc.getSwf(), scriptName, classIndex, globalTraitIndex); } return found; @@ -616,7 +616,7 @@ public class ABCExplorerDialog extends AppDialog { case SCRIPT_INFO: scriptIndex = vwi.getIndex(); DottedChain scriptNameDc = abc.script_info.get(scriptIndex).getSimplePackName(abc); - String scriptName = (scriptNameDc == null ? "script_" + scriptIndex : scriptNameDc.toRawString()); + String scriptName = (scriptNameDc == null ? "script_" + scriptIndex : scriptNameDc.toPrintableString(true)); mainPanel.gotoScriptName(abc.getSwf(), scriptName); break; case METHOD_BODY: @@ -646,7 +646,7 @@ public class ABCExplorerDialog extends AppDialog { } if (scriptIndex != -1) { DottedChain scriptNameDc2 = abc.script_info.get(scriptIndex).getSimplePackName(abc); - String scriptName2 = (scriptNameDc2 == null ? "script_" + scriptIndex : scriptNameDc2.toRawString()); + String scriptName2 = (scriptNameDc2 == null ? "script_" + scriptIndex : scriptNameDc2.toPrintableString(true)); mainPanel.gotoScriptTrait(abc.getSwf(), scriptName2, classIndex, GraphTextWriter.TRAIT_CLASS_INITIALIZER); } break; @@ -693,7 +693,7 @@ public class ABCExplorerDialog extends AppDialog { if (scriptIndex != -1) { DottedChain scriptNameDc = abc.script_info.get(scriptIndex).getSimplePackName(abc); - String scriptName = (scriptNameDc == null ? "script_" + scriptIndex : scriptNameDc.toRawString()); + String scriptName = (scriptNameDc == null ? "script_" + scriptIndex : scriptNameDc.toPrintableString(true)); mainPanel.gotoScriptTrait(abc.getSwf(), scriptName, classIndex, globalTraitIndex); } diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 134b95747..519ddc41c 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -1458,7 +1458,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener