mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-24 17:11:03 +00:00
Debugging in the browser, improved
This commit is contained in:
@@ -451,6 +451,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
private boolean loadingScrollPosEnabled = true;
|
||||
|
||||
private static final DataFlavor TREE_FILE_FLAVOR = new DataFlavor(TreeFileFlavor.class, "TreeFile");
|
||||
|
||||
private boolean editingStatusSet = false;
|
||||
|
||||
public synchronized void setLoadingScrollPosEnabled(boolean loadingScrollPosEnabled) {
|
||||
this.loadingScrollPosEnabled = loadingScrollPosEnabled;
|
||||
@@ -972,11 +974,15 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
|
||||
public void setEditingStatus() {
|
||||
editingStatusSet = true;
|
||||
statusPanel.setStatus(translate(Configuration.autoSaveTagModifications.get() ? "status.editing.autosave" : "status.editing"));
|
||||
}
|
||||
|
||||
public void clearEditingStatus() {
|
||||
statusPanel.setStatus("");
|
||||
if (editingStatusSet) {
|
||||
statusPanel.setStatus("");
|
||||
editingStatusSet = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void setWorkStatus(String s, CancellableWorker worker) {
|
||||
@@ -1116,7 +1122,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
debugStackPanel = new DebugStackPanel();
|
||||
Main.getDebugHandler().addBreakListener(new DebuggerHandler.BreakListener() {
|
||||
@Override
|
||||
public void breakAt(String scriptName, int line, int classIndex, int traitIndex, int methodIndex) {
|
||||
public void breakAt(DebuggerSession session, String scriptName, int line, int classIndex, int traitIndex, int methodIndex) {
|
||||
View.execInEventDispatchLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -1126,23 +1132,25 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doContinue() {
|
||||
public void doContinue(DebuggerSession session) {
|
||||
View.execInEventDispatchLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showDetail(DETAILCARDEMPTYPANEL);
|
||||
if (Main.getDebugHandler().getNumberOfPausedSessions() == 0) {
|
||||
showDetail(DETAILCARDEMPTYPANEL);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Main.getDebugHandler().addConnectionListener(new DebuggerHandler.ConnectionListener() {
|
||||
@Override
|
||||
public void connected() {
|
||||
public void connected(DebuggerSession session) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnected() {
|
||||
public void disconnected(DebuggerSession session) {
|
||||
View.execInEventDispatchLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -1628,6 +1636,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
|
||||
private void updateUi(final Openable openable) {
|
||||
View.checkAccess();
|
||||
Main.updateSession();
|
||||
SWF swf = null;
|
||||
if (openable instanceof SWF) {
|
||||
swf = (SWF) openable;
|
||||
@@ -1646,7 +1655,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
if (!abcFound) {
|
||||
getABCPanel().setAbc(abcList.get(0).getABC());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mainMenu.updateComponents(openable);
|
||||
|
||||
@@ -5766,7 +5775,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
|
||||
private void valueChanged(Object source, TreePath selectedPath) {
|
||||
TreeItem treeItem = selectedPath == null ? null : (TreeItem) selectedPath.getLastPathComponent();
|
||||
|
||||
|
||||
Main.updateSession();
|
||||
if (treeItem == null) {
|
||||
updateUi(null);
|
||||
reload(false);
|
||||
@@ -6360,7 +6370,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
if (openable instanceof SWF) {
|
||||
SwfSpecificCustomConfiguration swfCustomConf = Configuration.getOrCreateSwfSpecificCustomConfiguration(openable.getShortPathTitle());
|
||||
SWF swf = (SWF) openable;
|
||||
Map<String, Set<Integer>> breakpoints = Main.getDebugHandler().getAllBreakPoints(swf, false);
|
||||
Map<String, Set<Integer>> breakpoints = Main.getDebugHandler().getAllSessionsBreakPoints(swf);
|
||||
List<String> breakpointList = new ArrayList<>();
|
||||
for (String scriptName : breakpoints.keySet()) {
|
||||
for (int line : breakpoints.get(scriptName)) {
|
||||
@@ -7053,4 +7063,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
public EasyPanel getEasyPanel() {
|
||||
return easyPanel;
|
||||
}
|
||||
|
||||
public void showDebugStackFrame() {
|
||||
showDetail(DETAILCARDDEBUGSTACKFRAME);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user