KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > actions > IWatchExpressionFactoryAdapter


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.ui.actions;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.debug.core.model.IVariable;
15
16 /**
17  * An optional adapter used to create a watch expression for a selected variable.
18  * <p>
19  * The 'Create Watch Expression' action is enabled for instances of
20  * {@link org.eclipse.debug.core.model.IVariable} that have an associated
21  * {@link org.eclipse.debug.core.model.IWatchExpressionDelegate} registered
22  * for that debug model.
23  * When a watch expression factory adapter is available for a variable, the factory is
24  * consulted to create a watch expression for that variable. When no adapter is provided,
25  * the watch expression is generated based on the variable's name.
26  * </p>
27  * <p>
28  * Also see the optional interface {@link IWatchExpressionFactoryAdapterExtension}.
29  * </p>
30  * <p>
31  * Clients may implement this interface.
32  * </p>
33  * @since 3.2
34  */

35 public interface IWatchExpressionFactoryAdapter {
36     
37     /**
38      * Creates and returns an expression for the specified variable
39      * which is used to created an {@link org.eclipse.debug.core.model.IWatchExpression}.
40      *
41      * @param variable variable a watch expression is required for
42      * @return text used to create a watch expression
43      * @exception org.eclipse.core.runtime.CoreException if unable to create a watch
44      * expression
45      */

46     public String JavaDoc createWatchExpression(IVariable variable) throws CoreException;
47
48 }
49
Popular Tags