Package org.eclipse.debug.core
Interface IExpressionManager
public interface IExpressionManager
The expression manager manages the collection of registered
expressions in the workspace. An expression is a snippet of code
that can be evaluated to produce a value. Expression creation
and evaluation are client responsibilities.
Clients interested in expression change notification may
register with the expression manager - see
IExpressionListener and IExpressionsListener.
- Since:
- 2.0
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpression(IExpression expression) Adds the given expression to the collection of registered expressions in the workspace and notifies all registered listeners.voidaddExpressionListener(IExpressionListener listener) Adds the given listener to the collection of registered expression listeners.voidaddExpressionListener(IExpressionsListener listener) Adds the given listener to the collection of registered expression listeners.voidaddExpressions(IExpression[] expressions) Adds the given expressions to the collection of registered expressions in the workspace and notifies all registered listeners.Returns a collection of all registered expressions, possibly empty.getExpressions(String modelIdentifier) Returns a collection of all expressions registered for the given debug model,possibly empty.booleanReturns whether there are any registered expressionsbooleanReturns whether a watch expression delegate has been contributed for the given debug model.newWatchExpression(String expressionText) Creates and returns a new watch expression with the given text.Returns a new watch expression delegate for the given debug model ornullif no delegate is available.voidremoveExpression(IExpression expression) Removes the given expression from the expression manager, and notifies all registered listeners.voidremoveExpressionListener(IExpressionListener listener) Removes the given listener from the collection of registered expression listeners.voidremoveExpressionListener(IExpressionsListener listener) Removes the given listener from the collection of registered expression listeners.voidremoveExpressions(IExpression[] expressions) Removes the given expressions from the collection of registered expressions in the workspace and notifies all registered listeners.
-
Method Details
-
addExpression
Adds the given expression to the collection of registered expressions in the workspace and notifies all registered listeners. This has no effect if the given expression is already registered.- Parameters:
expression- the expression to add
-
addExpressions
Adds the given expressions to the collection of registered expressions in the workspace and notifies all registered listeners. Has no effect on expressions already registered.- Parameters:
expressions- the expressions to add- Since:
- 2.1
-
newWatchExpression
Creates and returns a new watch expression with the given text. The returned expression is not added to this manager.- Parameters:
expressionText- the text for the new expression- Returns:
- new watch expression
- Since:
- 3.0
-
getExpressions
IExpression[] getExpressions()Returns a collection of all registered expressions, possibly empty.- Returns:
- an array of expressions
-
hasExpressions
boolean hasExpressions()Returns whether there are any registered expressions- Returns:
- whether there are any registered expressions
-
getExpressions
Returns a collection of all expressions registered for the given debug model,possibly empty.- Parameters:
modelIdentifier- identifier of a debug model plug-in- Returns:
- an array of expressions
-
removeExpression
Removes the given expression from the expression manager, and notifies all registered listeners. Has no effect if the given expression is not currently registered.- Parameters:
expression- the expression to remove
-
removeExpressions
Removes the given expressions from the collection of registered expressions in the workspace and notifies all registered listeners. Has no effect on expressions not already registered.- Parameters:
expressions- the expressions to remove- Since:
- 2.1
-
addExpressionListener
Adds the given listener to the collection of registered expression listeners. Has no effect if an identical listener is already registered.- Parameters:
listener- the listener to add
-
removeExpressionListener
Removes the given listener from the collection of registered expression listeners. Has no effect if an identical listener is not already registered.- Parameters:
listener- the listener to remove
-
addExpressionListener
Adds the given listener to the collection of registered expression listeners. Has no effect if an identical listener is already registered.- Parameters:
listener- the listener to add- Since:
- 2.1
-
removeExpressionListener
Removes the given listener from the collection of registered expression listeners. Has no effect if an identical listener is not already registered.- Parameters:
listener- the listener to remove- Since:
- 2.1
-
newWatchExpressionDelegate
Returns a new watch expression delegate for the given debug model ornullif no delegate is available.- Parameters:
id- the unique identifier of a debug model for which a watch expression delegate has been contributed- Returns:
- a watch expression delegate associated with the given model
or
nullif none - Since:
- 3.0
- See Also:
-
hasWatchExpressionDelegate
Returns whether a watch expression delegate has been contributed for the given debug model.- Parameters:
id- the unique identifier of a debug model- Returns:
- whether a watch expression delegate has been contributed for the given debug model
- Since:
- 3.1
- See Also:
-