import net.sourceforge.phpeclipse.xdebug.php.model.XDebugStackFrame;
import net.sourceforge.phpeclipse.xdebug.php.model.XDebugVariable;
import net.sourceforge.phpeclipse.xdebug.php.model.XDebugValue;
+import net.sourceforge.phpeclipse.xdebug.ui.XDebugUIPluginImages;
//import net.sourceforge.phpeclipse.xdebug.ui.XDebugUIPlugin;
//import net.sourceforge.phpeclipse.xdebug.ui.php.launching.CopyOfPHPDebugModelPresentation.StorageEditorInput;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.core.model.ILineBreakpoint;
if (element instanceof XDebugLineBreakpoint) {
return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT);
} else if (element instanceof IMarker) {
- return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT);
+ if (((IMarker) element).getAttribute(IBreakpoint.ENABLED, false)) {
+ return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT);
+ } else {
+ return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED);
+ }
} else if (element instanceof XDebugStackFrame
|| element instanceof XDebugThread
|| element instanceof XDebugTarget) {
}
private Image getVariableImage(XDebugVariable phpVar) {
- /*
- * if (phpVar != null) { if (phpVar.isLocal()) return
- * DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE); if
- * (phpVar.isHashValue()) return
- * DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE); }
- */
- return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE);
- }
+ if (phpVar.getVisibility().equals("protected")) {
+ return XDebugUIPluginImages.get(XDebugUIPluginImages.IMG_FIELD_PROTECTED);
+ } else if (phpVar.getVisibility().equals("private")) {
+ return (XDebugUIPluginImages.get(XDebugUIPluginImages.IMG_FIELD_PRIVATE));
+ }
+ return XDebugUIPluginImages.get(XDebugUIPluginImages.IMG_FIELD_PUBLIC);
+ }
private Image getValueImage(XDebugValue phpVar) {
if (phpVar != null) {
return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE);
return getBreakpointText((IBreakpoint) element);
} else if (element instanceof XDebugVariable) {
XDebugVariable phpVar = (XDebugVariable) element;
- return phpVar.toString();
+ return phpVar.getName() + "= " + phpVar.getValueString();//toString();
}
} catch (CoreException e) {
//return PHPDebugUiMessages
* @see IDebugModelPresentation#computeDetail(IValue, IValueDetailListener)
*/
public void computeDetail(IValue value, IValueDetailListener listener) {
- return;
+ String detail = "";
+ try {
+ detail = value.getValueString();
+ } catch (DebugException e) {
+ }
+ listener.detailComputed(value, detail);
+ //return;
}
protected IBreakpoint getBreakpoint(IMarker marker) {