/******************************************************************************* * Copyright (c) 2000, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.debug.core.model; /** * 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
.
*
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): *
IDebugTarget
)IThread
)IStackFrame
)null
if none
*/
public void setExpressionContext(IDebugElement context);
/**
* Sets this watch expression's snippet of code. This method
* causes the new snippet to be evaluated immediately in
* the expression's last context.
*
* @param expressionText the snippet which will be evaluated
*/
public void setExpressionText(String expressionText);
/**
* 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.
*
* @return whether this expression's result is pending
*/
public boolean isPending();
/**
* Returns whether this expression is enabled. An enabled expression will
* update its value. A disabled expression will not.
*
* @return whether this expression is enabled
*/
public boolean isEnabled();
/**
* Sets this expression's enabled state. This method
* causes the new snippet to be evaluated immediately in
* the expression's last context.
*
* @param enabled whether this expression should be enabled
*/
public void setEnabled(boolean enabled);
}