Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 62e99640b5349b884ebb09b7b13b591d6f86f970 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.core.variables;


/**
 * A variable that can be referenced in an expression, which resolves to a string
 * value. Variables are referenced in expressions via their name, in the following
 * format.
 * <pre>
 * ${varname} or ${varname:argument}
 * </pre>
 * <p>
 * A variable is identified by its name, and optionally accepts an argument. When an
 * argument is present, a colon separates the variable name from its argument.
 * </p>
 * <p>
 * Variables can be contributed by extensions or programmatically. There are two
 * kinds of variables.
 * <ul>
 * <li><code>IValueVariable</code> - variables that have a value (with getter and setter), and
 *       accept no arguments. The value of this type of variable is resolved at the time
 *       its value is set via its setter API.</li>
 * <li><code>IDynamicVariable</code> - variables whose value is resolved at the time
 * 		a string substitution is performed by a contributed resolver. Dynamic variables
 * 		may accept an argument.</li>
 * </ul>
 * </p>
 * @since 3.0
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface IStringVariable {

	/**
	 * Returns the name of this variable. A variable is uniquely identified by
	 * its name.
	 *
	 * @return variable name
	 */
	String getName();

	/**
	 * Returns a human readable description of this variable, possibly <code>null</code>
	 *
	 * @return a description of this variable, or <code>null</code> if none
	 */
	String getDescription();

}

Back to the top