Eclipse Platform
Release 3.1

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.

This interface is not intended to be implemented by clients.

Since:
2.0
See Also:
IExpression, IExpressionListener, IExpressionsListener

Method Summary
 void addExpression(IExpression expression)
          Adds the given expression to the collection of registered expressions in the workspace and notifies all registered listeners.
 void addExpressionListener(IExpressionListener listener)
          Adds the given listener to the collection of registered expression listeners.
 void addExpressionListener(IExpressionsListener listener)
          Adds the given listener to the collection of registered expression listeners.
 void addExpressions(IExpression[] expressions)
          Adds the given expressions to the collection of registered expressions in the workspace and notifies all registered listeners.
 IExpression[] getExpressions()
          Returns a collection of all registered expressions, possibly empty.
 IExpression[] getExpressions(String modelIdentifier)
          Returns a collection of all expressions registered for the given debug model,possibly empty.
 boolean hasExpressions()
          Returns whether there are any registered expressions
 boolean hasWatchExpressionDelegate(String id)
          Returns whether a watch expression delegate has been contributed for the given debug model.
 IWatchExpression newWatchExpression(String expressionText)
          Creates and returns a new watch expression with the given text.
 IWatchExpressionDelegate newWatchExpressionDelegate(String id)
          Returns a new watch expression delegate for the given debug model or null if no delegate is available.
 void removeExpression(IExpression expression)
          Removes the given expression from the expression manager, and notifies all registered listeners.
 void removeExpressionListener(IExpressionListener listener)
          Removes the given listener from the collection of registered expression listeners.
 void removeExpressionListener(IExpressionsListener listener)
          Removes the given listener from the collection of registered expression listeners.
 void removeExpressions(IExpression[] expressions)
          Removes the given expressions from the collection of registered expressions in the workspace and notifies all registered listeners.
 

Method Detail

addExpression

public void addExpression(IExpression expression)
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

public void addExpressions(IExpression[] expressions)
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

public IWatchExpression newWatchExpression(String expressionText)
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
Since:
3.0

getExpressions

public IExpression[] getExpressions()
Returns a collection of all registered expressions, possibly empty.

Returns:
an array of expressions

hasExpressions

public boolean hasExpressions()
Returns whether there are any registered expressions

Returns:
whether there are any registered expressions

getExpressions

public IExpression[] getExpressions(String modelIdentifier)
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

public void removeExpression(IExpression expression)
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

public void removeExpressions(IExpression[] expressions)
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

public void addExpressionListener(IExpressionListener listener)
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

public void removeExpressionListener(IExpressionListener listener)
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

public void addExpressionListener(IExpressionsListener listener)
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

public void removeExpressionListener(IExpressionsListener listener)
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

public IWatchExpressionDelegate newWatchExpressionDelegate(String id)
Returns a new watch expression delegate for the given debug model or null if 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 null if none
Since:
3.0
See Also:
IWatchExpressionDelegate

hasWatchExpressionDelegate

public boolean hasWatchExpressionDelegate(String id)
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:
IWatchExpressionDelegate

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.