Organized imports
[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
23  * variable initializer. The subclass must have a public 0-argument
24  * constructor and a 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,
39      * or fails silently if this cannot be done. 
40      * <p>
41      * A variable initializer is automatically activated whenever a variable value
42      * 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 the name of the workspace classpath variable
47      *    that requires a binding
48      * 
49      * @see JavaCore#getClasspathVariable(String)
50      * @see JavaCore#setClasspathVariable(String, IPath, IProgressMonitor)
51      * @see JavaCore#setClasspathVariables(String[], IPath[], IProgressMonitor)
52      */
53     public abstract void initialize(String variable);
54 }