Tag preview in dump view

This commit is contained in:
Jindra Petřík
2016-01-24 09:12:23 +01:00
parent b9cb48c5e2
commit ea0a2d5569
9 changed files with 242 additions and 108 deletions

View File

@@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.gui.dumpview;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.SWFInputStream;
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.decompiler.flash.tags.TagStub;
import com.jpexs.decompiler.flash.treeitems.SWFList;
import java.io.IOException;
@@ -112,18 +113,7 @@ public final class DumpTreeModel implements TreeModel {
@Override
public int getChildCount(Object o) {
DumpInfo di = (DumpInfo) o;
if (di.tagToResolve != null) {
TagStub tagStub = di.tagToResolve;
try {
SWFInputStream sis = tagStub.getDataStream();
sis.seek(tagStub.getDataPos());
sis.dumpInfo = di;
SWFInputStream.resolveTag(tagStub, 0, false, true, false);
} catch (InterruptedException | IOException ex) {
Logger.getLogger(DumpTreeModel.class.getName()).log(Level.SEVERE, null, ex);
}
di.tagToResolve = null;
}
di.resolveTag();
return di.getChildCount();
}