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;
15 * Abstract base implementation of all classpath variable initializers.
16 * Classpath variable initializers are used in conjunction with the
17 * "net.sourceforge.phpdt.core.classpathVariableInitializer" extension point.
19 * Clients should subclass this class to implement a specific classpath
20 * variable initializer. The subclass must have a public 0-argument
21 * constructor and a concrete implementation of <code>initialize</code>.
23 * @see IClasspathEntry
26 public abstract class ClasspathVariableInitializer {
29 * Creates a new classpath variable initializer.
31 public ClasspathVariableInitializer() {
35 * Binds a value to the workspace classpath variable with the given name,
36 * or fails silently if this cannot be done.
38 * A variable initializer is automatically activated whenever a variable value
39 * is needed and none has been recorded so far. The implementation of
40 * the initializer can set the corresponding variable using
41 * <code>JavaCore#setClasspathVariable</code>.
43 * @param variable the name of the workspace classpath variable
44 * that requires a binding
46 * @see JavaCore#getClasspathVariable(String)
47 * @see JavaCore#setClasspathVariable(String, IPath, IProgressMonitor)
48 * @see JavaCore#setClasspathVariables(String[], IPath[], IProgressMonitor)
50 public abstract void initialize(String variable);