1) Fixed variable hovering (did not work in all circumstances).
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.ui / src / net / sourceforge / phpdt / internal / debug / ui / PHPDebugHover.java
index 2826591..703772e 100644 (file)
@@ -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;
        }