mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 09:20:47 +00:00
Debug tooltips on hover
When in Debug mode and stopped at a breakpoint, hovering over dientifiers will show up their name and value in a tooltip. All matching locals will be shown, one on each line.
This commit is contained in:
@@ -84,6 +84,7 @@ import javax.swing.SwingConstants;
|
||||
import javax.swing.event.CaretEvent;
|
||||
import javax.swing.event.CaretListener;
|
||||
import javax.swing.text.Highlighter;
|
||||
import javax.swing.text.JTextComponent;
|
||||
import javax.swing.tree.TreePath;
|
||||
import jsyntaxpane.SyntaxDocument;
|
||||
import jsyntaxpane.Token;
|
||||
@@ -182,10 +183,12 @@ public class ActionPanel extends JPanel implements SearchListener<ActionSearchRe
|
||||
|
||||
public String getStringUnderCursor() {
|
||||
View.checkAccess();
|
||||
|
||||
int pos = decompiledEditor.getCaretPosition();
|
||||
|
||||
SyntaxDocument sDoc = ActionUtils.getSyntaxDocument(decompiledEditor);
|
||||
return getStringUnderPosition(pos, decompiledEditor);
|
||||
}
|
||||
|
||||
public String getStringUnderPosition(int pos, JTextComponent component) {
|
||||
SyntaxDocument sDoc = ActionUtils.getSyntaxDocument(component);
|
||||
if (sDoc != null) {
|
||||
Token t = sDoc.getTokenAt(pos + 1);
|
||||
String ident = null;
|
||||
|
||||
Reference in New Issue
Block a user