Added Opening ABC file format (*.abc)

This commit is contained in:
Jindra Petřík
2022-11-20 22:12:19 +01:00
parent dd63487dd8
commit 344bdfa6ea
70 changed files with 1576 additions and 906 deletions
@@ -626,7 +626,7 @@ public class DumpTree extends JTree {
return null;
}
long address = range.getPos();
return searchTimelinedForTag(item.getSwf(), address);
return searchTimelinedForTag((SWF) item.getOpenable(), address);
}
public Timelined getTimelinedForItem(TreeItem item) {
@@ -674,7 +674,7 @@ public class DumpTree extends JTree {
for (DumpInfo sd : d.getChildInfos()) {
if (sd instanceof DumpInfoSwfNode) {
DumpInfoSwfNode si = (DumpInfoSwfNode) sd;
if (si.getSwf() == item.getSwf()) {
if (si.getSwf() == item.getOpenable()) {
DumpInfo di = si;
while (model.getChildCount(di) > 0) {
boolean found = false;
@@ -18,7 +18,8 @@ package com.jpexs.decompiler.flash.gui.dumpview;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
import com.jpexs.decompiler.flash.treeitems.SWFList;
import com.jpexs.decompiler.flash.treeitems.Openable;
import com.jpexs.decompiler.flash.treeitems.OpenableList;
import java.util.ArrayList;
import java.util.List;
import javax.swing.event.TreeModelEvent;
@@ -36,20 +37,23 @@ public final class DumpTreeModel implements TreeModel {
private final List<TreeModelListener> listeners = new ArrayList<>();
private final List<SWFList> swfs;
private final List<OpenableList> openables;
public DumpTreeModel(List<SWFList> swfs) {
this.swfs = swfs;
public DumpTreeModel(List<OpenableList> openables) {
this.openables = openables;
root = new DumpInfo("root", "", null, 0, 0);
updateSwfs();
}
public void updateSwfs() {
root.getChildInfos().clear();
for (SWFList swfList : swfs) {
for (SWF swf : swfList) {
swf.dumpInfo.name = swf.getFileTitle();
root.getChildInfos().add(swf.dumpInfo);
for (OpenableList openableList : openables) {
for (Openable openable : openableList) {
if (openable instanceof SWF) {
SWF swf = (SWF) openable;
swf.dumpInfo.name = swf.getFileTitle();
root.getChildInfos().add(swf.dumpInfo);
}
}
}