From fb4d28cebc7efe36f683c5eeb223255a6903f757 Mon Sep 17 00:00:00 2001 From: cperkonig Date: Sun, 28 Mar 2004 08:34:24 +0000 Subject: [PATCH] changes for VariableHover --- .../internal/debug/core/model/PHPStackFrame.java | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPStackFrame.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPStackFrame.java index cf68846..2e1d71f 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPStackFrame.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPStackFrame.java @@ -64,6 +64,18 @@ public class PHPStackFrame implements IStackFrame { return variables; } + public IVariable findVariable(String s) throws DebugException { + if (this.hasVariables()) { + String name="$"+s; + for(int i= 0; i < variables.length; i++) { + String n= variables[i].getName(); + if((variables[i].getName()).equals(name)) + return variables[i]; + } + } + return null; + } + public boolean hasVariables() throws DebugException { if (variables == null) { return false; @@ -194,7 +206,10 @@ public class PHPStackFrame implements IStackFrame { } public Object getAdapter(Class arg0) { - return null; + if (arg0==PHPStackFrame.class) + return this; + else + return null; } public int getIndex() { -- 1.7.1