diff --git a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java --- a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java +++ b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java @@ -41,9 +41,8 @@ package org.netbeans.modules.debugger.jpda.projects; -import com.sun.source.tree.Tree; -import com.sun.source.tree.Tree.Kind; import com.sun.source.util.TreePath; +import java.awt.Color; import java.io.IOException; import java.util.Arrays; import java.util.Collections; @@ -51,7 +50,12 @@ import java.util.List; import java.util.Set; import javax.lang.model.element.ElementKind; +import javax.swing.BoxLayout; import javax.swing.JEditorPane; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.border.LineBorder; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import javax.swing.text.Element; @@ -75,6 +79,7 @@ import org.netbeans.api.debugger.jpda.Variable; import org.netbeans.api.java.source.CompilationController; import org.netbeans.api.java.source.JavaSource.Phase; +import org.netbeans.editor.Utilities; import org.netbeans.modules.parsing.api.ParserManager; import org.netbeans.modules.parsing.api.ResultIterator; import org.netbeans.modules.parsing.api.Source; @@ -133,8 +138,9 @@ // Debugger is likely finishing... rp = RequestProcessor.getDefault(); } + rp.post (this); - return null; + return ""; } public void run () { @@ -230,7 +236,16 @@ toolTipText = expression + " = >" + e.getMessage () + "<"; } } - firePropertyChange (PROP_SHORT_DESCRIPTION, null, toolTipText); + + JPanel panel = new JPanel(); + panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); + panel.setBorder(new LineBorder(Color.black, 1)); + panel.add(new JLabel("And the tooltip is...")); + panel.add(new JTextArea(toolTipText)); + + Utilities.getEditorUI(ep).getToolTipSupport().setToolTip(panel); + + //firePropertyChange (PROP_SHORT_DESCRIPTION, null, toolTipText); } public String getAnnotationType () {