From: robekras Date: Mon, 28 Mar 2011 16:05:37 +0000 (+0000) Subject: 1) Fixed variable hovering (did not work in all circumstances). X-Git-Url: http://git.phpeclipse.com?hp=c499a84c0c4216cffd12d8473ba8bb0cd5c2af16 1) Fixed variable hovering (did not work in all circumstances). 2) As the variable view is changed to show the variables with the php variable prefix '$', there is no need to cut off the '$' from php variable name. --- diff --git a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/PHPDebugHover.java b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/PHPDebugHover.java index 2826591..703772e 100644 --- a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/PHPDebugHover.java +++ b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/PHPDebugHover.java @@ -17,6 +17,7 @@ import net.sourceforge.phpdt.internal.ui.text.JavaWordFinder; import net.sourceforge.phpdt.ui.PreferenceConstants; import net.sourceforge.phpdt.ui.text.java.hover.IJavaEditorTextHover; +import net.sourceforge.phpeclipse.xdebug.php.model.XDebugAbstractValue; import net.sourceforge.phpeclipse.xdebug.php.model.XDebugStackFrame; import net.sourceforge.phpeclipse.xdebug.php.model.XDebugTarget; import net.sourceforge.phpeclipse.xdebug.php.model.XDebugValue; @@ -213,15 +214,10 @@ public class PHPDebugHover implements IJavaEditorTextHover, StringBuffer buffer = new StringBuffer(); try { if (frameDBG != null) { - variable = frameDBG.findVariable(variableName); + variable = frameDBG.findVariable (variableName); } else if (frameXD != null) { - if (variableName.startsWith ("$")) { - variable = frameXD.findVariable (variableName.substring (1)); - } - else { - variable = frameXD.findVariable (variableName); - } + variable = frameXD.findVariable (variableName); } if (variable != null) { @@ -284,8 +280,8 @@ public class PHPDebugHover implements IJavaEditorTextHover, if (value instanceof PHPValue) return ((PHPValue) value).getReferenceTypeName(); - if (value instanceof XDebugValue) - return ((XDebugValue) value).getReferenceTypeName (); + if (value instanceof XDebugAbstractValue) + return ((XDebugAbstractValue) value).getReferenceTypeName (); return null; }