Created a separated 'externaltools' plugin: initial check-in
[phpeclipse.git] / net.sourceforge.phpeclipse.externaltools / src / net / sourceforge / phpdt / externaltools / variable / IVariableLocationExpander.java
1 package net.sourceforge.phpdt.externaltools.variable;
2
3 /**********************************************************************
4 Copyright (c) 2002 IBM Corp. and others. All rights reserved.
5 This file is made available under the terms of the Common Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/cpl-v10.html
8  
9 Contributors:
10 **********************************************************************/
11
12 import org.eclipse.core.runtime.IPath;
13
14 /**
15  * Responsible for expanding a variable into the location
16  * path of a file or directory.
17  * <p>
18  * Implementation of this interface will be treated like
19  * a singleton. That is, only one instance will be created
20  * per variable extension.
21  * </p><p>
22  * This interface is not to be extended by clients. Clients
23  * may implement this interface.
24  * </p>
25  */
26 public interface IVariableLocationExpander {
27         /**
28          * Returns the path location to a file or directory
29          * for the given variable tag and value. The path does
30          * not need to exist.
31          * 
32          * @param varTag the variable tag name
33          * @param varValue the value for the variable
34          * @param context the context the variable should use to expand itself
35          * @return the <code>IPath</code> to a file/directory
36          *              or <code>null</code> if not possible
37          */
38         public IPath getPath(String varTag, String varValue, ExpandVariableContext context);
39 }