From d5de31973ed6e36f0db2bc08b9ccf7ead542d67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 30 Sep 2023 19:23:52 +0200 Subject: [PATCH] More hilighting fix --- src/com/jpexs/decompiler/flash/gui/MainPanel.java | 10 ++++++---- src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java | 5 +++++ src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 397cdb2ba..9fe8d4fcb 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -215,6 +215,7 @@ import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; import com.jpexs.decompiler.flash.types.sound.SoundFormat; import com.jpexs.decompiler.flash.xfl.FLAVersion; +import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.helpers.ByteArrayRange; import com.jpexs.helpers.CancellableWorker; import com.jpexs.helpers.Helper; @@ -1852,7 +1853,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se updateClassesList(); reload(true); ABCPanel abcPanel = getABCPanel(); - abcPanel.hilightScript(abcPanel.getSwf(), abcPanel.decompiledTextArea.getScriptLeaf().getClassPath().toRawString()); + abcPanel.hilightScript(abcPanel.getSwf(), abcPanel.decompiledTextArea.getScriptLeaf().getClassPath().toString()); }); } } @@ -2555,15 +2556,16 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se return; } - String documentClass = swf.getDocumentClass(); + String documentClass = swf.getDocumentClass(); if (documentClass != null && currentView != VIEW_DUMP) { + String documentClassPrintable = DottedChain.parseNoSuffix(documentClass).toPrintableString(true); List abcList = swf.getAbcList(); if (!abcList.isEmpty()) { ABCPanel abcPanel = getABCPanel(); for (ABCContainerTag c : abcList) { - if (c.getABC().findClassByName(documentClass) > -1) { + if (c.getABC().findClassByName(documentClassPrintable) > -1) { abcPanel.setAbc(c.getABC()); - abcPanel.hilightScript(swf, documentClass); + abcPanel.hilightScript(swf, documentClassPrintable); break; } } diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 519ddc41c..4bce246fa 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -1393,6 +1393,11 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener -1) { - scriptName = icu.getAbc().instance_info.get(icu.getClassIndex()).getName(icu.getAbc().constants).getNameWithNamespace(icu.getAbc().constants, true).toRawString(); + scriptName = icu.getAbc().instance_info.get(icu.getClassIndex()).getName(icu.getAbc().constants).getNameWithNamespace(icu.getAbc().constants, true).toPrintableString(true); } else if (icu.getScriptIndex() > -1) { - scriptName = icu.getAbc().script_info.get(icu.getScriptIndex()).getSimplePackName(icu.getAbc()).toRawString(); + scriptName = icu.getAbc().script_info.get(icu.getScriptIndex()).getSimplePackName(icu.getAbc()).toPrintableString(true); } else { scriptName = ""; }