1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 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.core.expressions; 12 13 import org.eclipse.core.runtime.CoreException; 14 15 /** 16 * A variable resolver can be used to add additional variable resolving 17 * strategies to an {@link EvaluationContext}. 18 * 19 * @see org.eclipse.core.expressions.EvaluationContext#resolveVariable(String, Object[]) 20 * 21 * @since 3.0 22 */ 23 public interface IVariableResolver { 24 25 /** 26 * Resolves a variable for the given name and arguments. The 27 * handler is allowed to return <code>null</code> to indicate 28 * that it is not able to resolve the requested variable. 29 * 30 * @param name the variable to resolve 31 * @param args an object array of arguments used to resolve the 32 * variable 33 * @return the variable's value or <code>null</code> if no variable 34 * could be resolved 35 * @exception CoreException if an errors occurs while resolving 36 * the variable 37 */ 38 public Object resolve(String name, Object[] args) throws CoreException; 39 } 40