diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java index 6da51071d..49f42fd84 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java @@ -944,6 +944,14 @@ public abstract class MainFrameMenu implements MenuBuilder { SWF swf = (openable instanceof SWF) ? (SWF) openable : null; boolean openableSelected = openable != null; boolean swfSelected = openable instanceof SWF; + boolean abcSelected = openable instanceof ABC; + boolean isAs3 = false; + if (swf != null) { + isAs3 = swf.isAS3(); + } + if (abcSelected) { + isAs3 = true; + } boolean isWorking = Main.isWorking(); List abcList = swf != null ? swf.getAbcList() : null; boolean hasAbc = openableSelected && abcList != null && !abcList.isEmpty(); @@ -1033,7 +1041,7 @@ public abstract class MainFrameMenu implements MenuBuilder { setMenuEnabled("/tools/search", openableSelected); setMenuEnabled("/tools/replace", swfSelected); setMenuEnabled("/tools/timeline", swfSelected); - setMenuEnabled("/tools/abcExplorer", openableSelected); + setMenuEnabled("/tools/abcExplorer", isAs3); setMenuEnabled("/tools/showProxy", !isWorking); setMenuEnabled("/tools/gotoDocumentClass", hasAbc); diff --git a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java index 84ea779fd..ba29e8304 100644 --- a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java @@ -1169,6 +1169,17 @@ public class TagTreeContextMenu extends JPopupMenu { abcExplorerMenuItem.setVisible(true); } + if (firstItem instanceof ClassesListTreeModel) { + abcExplorerMenuItem.setVisible(true); + } + + if (firstItem instanceof SWF) { + SWF swf = (SWF) firstItem; + if (swf.isAS3()) { + abcExplorerMenuItem.setVisible(true); + } + } + if (firstItem instanceof Tag) { rawEditMenuItem.setVisible(true); } @@ -1832,12 +1843,22 @@ public class TagTreeContextMenu extends JPopupMenu { if (item == null) { return; } + if (item instanceof ClassesListTreeModel) { + ClassesListTreeModel clsTreeModel = (ClassesListTreeModel) item; + item = clsTreeModel.getOpenable(); + } + if (item instanceof ABCContainerTag) { ABCContainerTag cnt = (ABCContainerTag)item; mainPanel.showAbcExplorer(cnt.getSwf(), cnt.getABC()); return; } + if (item instanceof SWF) { + mainPanel.showAbcExplorer((SWF) item, null); + return; + } + if (item instanceof ABC) { ABC abc = (ABC) item; mainPanel.showAbcExplorer(abc, abc);