mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 19:54:37 +00:00
ABCExplorer - enabled only for AS3
This commit is contained in:
@@ -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<ABCContainerTag> 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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user