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.debug.core.model.IVariable; 14 15 /** 16 * Optional extension to the watch expression factory adapter to dynamically enable the 17 * 'Create Watch Expression' action, based on the selected variable. 18 * <p> 19 * By default, 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 that implements 24 * this interface, the factory is consulted to enable the action. 25 * </p> 26 * <p> 27 * Clients may implementing {@link IWatchExpressionFactoryAdapter} may also implement 28 * this interface. 29 * </p> 30 * @since 3.3 31 */ 32 public interface IWatchExpressionFactoryAdapterExtension extends IWatchExpressionFactoryAdapter { 33 34 /** 35 * Returns whether a watch expression can be created for the specified variable. 36 * 37 * @param variable variable a watch expression is required for 38 * @return whether an expression can be created 39 * @exception org.eclipse.core.runtime.CoreException if unable to create a watch 40 * expression 41 */ 42 public boolean canCreateWatchExpression(IVariable variable); 43 44 } 45