mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-02 11:54:36 +00:00
Tag preview in dump view
This commit is contained in:
@@ -305,6 +305,10 @@ public class Configuration {
|
||||
@ConfigurationName("gui.timeLineSplitPane.dividerLocationPercent")
|
||||
public static final ConfigurationItem<Double> guiTimeLineSplitPaneDividerLocationPercent = null;
|
||||
|
||||
@ConfigurationDefaultDouble(0.6)
|
||||
@ConfigurationName("gui.dump.splitPane.dividerLocationPercent")
|
||||
public static final ConfigurationItem<Double> guiDumpSplitPaneDividerLocationPercent = null;
|
||||
|
||||
@ConfigurationDefaultString("com.jpexs.decompiler.flash.gui.OceanicSkin")
|
||||
@ConfigurationName("gui.skin")
|
||||
@ConfigurationCategory("ui")
|
||||
|
||||
@@ -16,11 +16,16 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.dumpview;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.TagStub;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -34,6 +39,8 @@ public class DumpInfo {
|
||||
|
||||
public TagStub tagToResolve = null;
|
||||
|
||||
public Tag resolvedTag = null;
|
||||
|
||||
public Object previewValue;
|
||||
|
||||
public long startByte;
|
||||
@@ -117,4 +124,25 @@ public class DumpInfo {
|
||||
String value = previewValue == null ? "" : previewValue.toString();
|
||||
return name + " (" + type + ")" + (value.isEmpty() ? "" : " = " + value);
|
||||
}
|
||||
|
||||
public void resolveTag() {
|
||||
if (tagToResolve != null) {
|
||||
TagStub tagStub = tagToResolve;
|
||||
try {
|
||||
SWFInputStream sis = tagStub.getDataStream();
|
||||
sis.seek(tagStub.getDataPos());
|
||||
sis.dumpInfo = this;
|
||||
resolvedTag = SWFInputStream.resolveTag(tagStub, 0, false, true, false);
|
||||
} catch (InterruptedException | IOException ex) {
|
||||
Logger.getLogger(DumpInfo.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
tagToResolve = null;
|
||||
}
|
||||
}
|
||||
|
||||
public Tag getTag() {
|
||||
resolveTag();
|
||||
return resolvedTag;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user