Debugger stub - TODO

This commit is contained in:
Jindra Petřík
2015-11-05 06:20:43 +01:00
parent 88ce1ed405
commit 668e1e2f14
11 changed files with 204 additions and 12 deletions

View File

@@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.SWFBundle;
import com.jpexs.decompiler.flash.SWFSourceInfo;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.ClassPath;
import com.jpexs.decompiler.flash.abc.RenameType;
import com.jpexs.decompiler.flash.abc.ScriptPack;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
@@ -1526,6 +1527,32 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
}
}
public void gotoClassLine(SWF swf, String cls, int line) {
gotoClass(swf, cls);
if (abcPanel != null) {
abcPanel.decompiledTextArea.selectLine(line);
}
}
public void debuggerBreakAt(SWF swf, String cls, int line) {
gotoClassLine(swf, cls, line);
if (abcPanel != null) {
abcPanel.decompiledTextArea.setLineColor(line, Color.green);
}
}
public void gotoClass(SWF swf, String cls) {
if (swf == null) {
return;
}
List<ABCContainerTag> abcList = swf.getAbcList();
if (!abcList.isEmpty()) {
ABCPanel abcPanel = getABCPanel();
abcPanel.setAbc(abcList.get(0).getABC());
abcPanel.hilightScript(swf, cls);
}
}
public void gotoDocumentClass(SWF swf) {
if (swf == null) {
return;