mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
2005-03-23 Alain Magloire
NPE fix. * src/org/eclipse/cdt/internal/core/PathEntryVariableresolver.java
This commit is contained in:
parent
88e9c1712a
commit
2531e9354f
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-03-23 Alain Magloire
|
||||
NPE fix.
|
||||
* src/org/eclipse/cdt/internal/core/PathEntryVariableresolver.java
|
||||
|
||||
2005-03-23 Alain Magloire
|
||||
Optimize the pathentry markers.
|
||||
* model/org/eclipse/cdt/internal/core/model/BinaryRunner.java
|
||||
|
|
|
@ -15,7 +15,9 @@ package org.eclipse.cdt.internal.core;
|
|||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.resources.IPathEntryVariableManager;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.variables.IDynamicVariable;
|
||||
import org.eclipse.core.variables.IDynamicVariableResolver;
|
||||
|
@ -31,7 +33,11 @@ public class PathEntryVariableResolver implements IDynamicVariableResolver {
|
|||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.ERROR, CCorePlugin.getResourceString("PathEntryVariableResolver.0"), null)); //$NON-NLS-1$
|
||||
}
|
||||
IPathEntryVariableManager manager = CCorePlugin.getDefault().getPathEntryVariableManager();
|
||||
return manager.getValue(argument).toString();
|
||||
IPath path = manager.getValue(argument);
|
||||
if (path == null) {
|
||||
path = Path.EMPTY;
|
||||
}
|
||||
return path.toPortableString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue