1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / ClasspathVariableInitializer.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11
12 package net.sourceforge.phpdt.core;
13
14 import org.eclipse.core.runtime.IPath;
15 import org.eclipse.core.runtime.IProgressMonitor;
16
17 /**
18  * Abstract base implementation of all classpath variable initializers.
19  * Classpath variable initializers are used in conjunction with the
20  * "net.sourceforge.phpdt.core.classpathVariableInitializer" extension point.
21  * <p>
22  * Clients should subclass this class to implement a specific classpath variable
23  * initializer. The subclass must have a public 0-argument constructor and a
24  * concrete implementation of <code>initialize</code>.
25  * 
26  * @see IClasspathEntry
27  * @since 2.0
28  */
29 public abstract class ClasspathVariableInitializer {
30
31         /**
32          * Creates a new classpath variable initializer.
33          */
34         public ClasspathVariableInitializer() {
35         }
36
37         /**
38          * Binds a value to the workspace classpath variable with the given name, or
39          * fails silently if this cannot be done.
40          * <p>
41          * A variable initializer is automatically activated whenever a variable
42          * value is needed and none has been recorded so far. The implementation of
43          * the initializer can set the corresponding variable using
44          * <code>JavaCore#setClasspathVariable</code>.
45          * 
46          * @param variable
47          *            the name of the workspace classpath variable that requires a
48          *            binding
49          * 
50          * @see JavaCore#getClasspathVariable(String)
51          * @see JavaCore#setClasspathVariable(String, IPath, IProgressMonitor)
52          * @see JavaCore#setClasspathVariables(String[], IPath[], IProgressMonitor)
53          */
54         public abstract void initialize(String variable);
55 }