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