Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.debug.core.model
Interface IWatchExpression

All Superinterfaces:
IAdaptable, IDebugElement, IErrorReportingExpression, IExpression

public interface IWatchExpression
extends IErrorReportingExpression

A watch expression is an expression that is evaluated in the context of a specific stack frame, thread, debug target, process, or launch. Generally, a watch expression is a snippet of code that is evaluated each time a debug target suspends, or when a user provides a context for an evaluation by selecting a debug target or thread. An expression updates its value when it is provided with a context in which it can perform an evaluation.

An implementation is provided by the debug platform. Clients that support watch expressions should contribute and implement a watch expression delegate. Watch expressions can be created via the IExpressionManager.

Since:
3.0
See Also:
IWatchExpressionDelegate, IExpressionManager
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.

Method Summary
 void evaluate ()
          Updates this watch expression's value based on the current evaluation context.
 boolean isEnabled ()
          Returns whether this expression is enabled.
 boolean isPending ()
          Returns whether the result of this watch expression is pending.
 void setEnabled (boolean enabled)
          Sets this expression's enabled state.
 void setExpressionContext ( IDebugElement context)
          Sets the context for this watch expression, or null if none.
 void setExpressionText ( String expressionText)
          Sets this watch expression's snippet of code.
 
Methods inherited from interface org.eclipse.debug.core.model. IErrorReportingExpression
getErrorMessages, hasErrors
 
Methods inherited from interface org.eclipse.debug.core.model. IExpression
dispose, getDebugTarget, getExpressionText, getValue
 
Methods inherited from interface org.eclipse.debug.core.model. IDebugElement
getLaunch, getModelIdentifier
 
Methods inherited from interface org.eclipse.core.runtime. IAdaptable
getAdapter
 

Method Detail

evaluate

void evaluate()
Updates this watch expression's value based on the current evaluation context. This watch expression fires a debug change event when the evaluation is complete. A watch expression can be asked to evaluate even when it is disabled. Note that implementations should generally be asynchronous to avoid blocking the calling thread.


setExpressionContext

void setExpressionContext(
IDebugElement context)
Sets the context for this watch expression, or null if none. If the given context is valid for this expression, this expression may update its value. When the value update is complete, a debug change event is fired. When null is specified as a context, this expression may choose to retain its previous value.

The context is usually one of (but not limited to):

  • a debug target (IDebugTarget)
  • a thread (IThread)
  • a stack frame (IStackFrame)

Parameters:
context - context in which to update this expression's value, or null if none

setExpressionText

void setExpressionText(
String expressionText)
Sets this watch expression's snippet of code. This method causes the new snippet to be evaluated immediately in the expression's last context.

Parameters:
expressionText - the snippet which will be evaluated

isPending

boolean isPending()
Returns whether the result of this watch expression is pending. An expression is pending if an evaluation has been requested, but the value has not yet been returned.

Returns:
whether this expression's result is pending

isEnabled

boolean isEnabled()
Returns whether this expression is enabled. An enabled expression will update its value. A disabled expression will not.

Returns:
whether this expression is enabled

setEnabled

void setEnabled(boolean enabled)
Sets this expression's enabled state. This method causes the new snippet to be evaluated immediately in the expression's last context.

Parameters:
enabled - whether this expression should be enabled

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire