|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.internal.core.PathEntryVariableManager
public class PathEntryVariableManager
Core's implementation of IPathEntryVariableManager.
Method Summary | |
---|---|
void |
addChangeListener(IPathEntryVariableChangeListener listener)
Registers the given listener to receive notification of changes to variables. |
org.eclipse.core.runtime.IPath |
getValue(java.lang.String varName)
Note that if a user changes the key in the preferences file to be invalid and then calls #getValue using that key, they will get the value back for that. |
java.lang.String[] |
getVariableNames()
Returns an array containing all defined variable names. |
boolean |
isDefined(java.lang.String varName)
Returns true if the given variable is defined and
false otherwise. |
void |
removeChangeListener(IPathEntryVariableChangeListener listener)
Removes the given variable change listener from the listeners list. |
org.eclipse.core.runtime.IPath |
resolvePath(org.eclipse.core.runtime.IPath path)
Resolves a String potentially containing a
variable reference, replacing the variable reference
(if any) with the variable's value (which is a concrete absolute path). |
void |
setValue(java.lang.String varName,
org.eclipse.core.runtime.IPath newValue)
Sets the variable with the given name to be the specified value. |
void |
shutdown()
|
void |
startup()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public org.eclipse.core.runtime.IPath getValue(java.lang.String varName)
getValue
in interface IPathEntryVariableManager
varName
- the name of the variable to return the value for
null
if there is no
variable defined with the given nameorg.eclipse.core.resources.IPathEntryVariableManager#getValue(String)
public void setValue(java.lang.String varName, org.eclipse.core.runtime.IPath newValue) throws org.eclipse.core.runtime.CoreException
IPathEntryVariableManager
null
.
null
.null
.
null
, or if it is
defined but the given value is equal to its current value.
If a variable is effectively changed, created or removed by a call to this method, notification will be sent to all registered listeners.
setValue
in interface IPathEntryVariableManager
varName
- the name of the variablenewValue
- the value for the variable (may be null
)
org.eclipse.core.runtime.CoreException
- if this method fails. Reasons include:
org.eclipse.core.resources.IPathEntryVariableManager#setValue(String, IPath)
public org.eclipse.core.runtime.IPath resolvePath(org.eclipse.core.runtime.IPath path)
IPathEntryVariableManager
String
potentially containing a
variable reference, replacing the variable reference
(if any) with the variable's value (which is a concrete absolute path).
If the given String is null
then null
will be
returned. In all other cases the result will be non-null
.
For example, consider the following collection of path variables:
The following paths would be resolved as:
c:/bin => c:/bin
c:${TEMP} => c:/temp
/TEMP => /TEMP
${TEMP}/foo => /temp/foo
${BACKUP} => /tmp/backup
${BACKUP}/bar.txt => /tmp/backup/bar.txt
SOMEPATH/foo => SOMEPATH/foo
resolvePath
in interface IPathEntryVariableManager
path
- the path to be resolved
null
org.eclipse.core.resources.IPathEntryVariableManager#resolvePath(IPath)
public java.lang.String[] getVariableNames()
IPathEntryVariableManager
getVariableNames
in interface IPathEntryVariableManager
IPathVariableManager.getPathVariableNames()
public void addChangeListener(IPathEntryVariableChangeListener listener)
IPathEntryVariableManager
addChangeListener
in interface IPathEntryVariableManager
listener
- the listenerIPathEntryVariableManager#addChangeListener(IPathEntryVariableChangeListener)
public void removeChangeListener(IPathEntryVariableChangeListener listener)
IPathEntryVariableManager
removeChangeListener
in interface IPathEntryVariableManager
listener
- the listenerIPathEntryVariableManager#removeChangeListener(IPathEntryVariableChangeListener)
public boolean isDefined(java.lang.String varName)
IPathEntryVariableManager
true
if the given variable is defined and
false
otherwise. Returns false
if the given
name is not a valid path variable name.
isDefined
in interface IPathEntryVariableManager
varName
- the variable's name
true
if the variable exists, false
otherwiseIPathVariableManager.isDefined(String)
public void startup()
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |