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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.core;
14 import org.eclipse.core.runtime.IPath;
15 import org.eclipse.core.runtime.IProgressMonitor;
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.
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>.
26 * @see IClasspathEntry
29 public abstract class ClasspathVariableInitializer {
32 * Creates a new classpath variable initializer.
34 public ClasspathVariableInitializer() {
38 * Binds a value to the workspace classpath variable with the given name,
39 * or fails silently if this cannot be done.
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>.
46 * @param variable the name of the workspace classpath variable
47 * that requires a binding
49 * @see JavaCore#getClasspathVariable(String)
50 * @see JavaCore#setClasspathVariable(String, IPath, IProgressMonitor)
51 * @see JavaCore#setClasspathVariables(String[], IPath[], IProgressMonitor)
53 public abstract void initialize(String variable);