use of jadx.gui.ui.codearea.SmaliArea in project jadx by skylot.
the class JDebuggerPanel method regShortcuts.
private void regShortcuts() {
controllerShortCutDispatcher = new KeyEventDispatcher() {
@Override
public boolean dispatchKeyEvent(KeyEvent e) {
if (e.getID() == KeyEvent.KEY_PRESSED && mainWindow.getTabbedPane().getFocusedComp() instanceof SmaliArea) {
if (e.getModifiersEx() == KeyEvent.SHIFT_DOWN_MASK && e.getKeyCode() == KeyEvent.VK_F8) {
controller.stepOut();
return true;
}
switch(e.getKeyCode()) {
case KeyEvent.VK_F7:
controller.stepInto();
return true;
case KeyEvent.VK_F8:
controller.stepOver();
return true;
case KeyEvent.VK_F9:
controller.run();
return true;
}
}
return false;
}
};
KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(controllerShortCutDispatcher);
}
use of jadx.gui.ui.codearea.SmaliArea in project jadx by skylot.
the class TabbedPane method smaliJump.
public void smaliJump(JClass cls, int pos, boolean debugMode) {
ContentPanel panel = getOpenTabs().get(cls);
if (panel == null) {
showCode(new JumpPosition(cls, 0, 1));
panel = getOpenTabs().get(cls);
if (panel == null) {
throw new JadxRuntimeException("Failed to open panel for JClass: " + cls);
}
} else {
selectTab(panel);
}
ClassCodeContentPanel codePane = ((ClassCodeContentPanel) panel);
codePane.showSmaliPane();
SmaliArea smaliArea = (SmaliArea) codePane.getSmaliCodeArea();
if (debugMode) {
smaliArea.scrollToDebugPos(pos);
}
smaliArea.scrollToPos(pos);
smaliArea.requestFocus();
}
Aggregations