mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[181069] can't do a query to get context for saving shell states. Need a new API for IRemoteCommandShell to getContextString() so that a query can be avoided at this point.
This commit is contained in:
parent
a718276754
commit
1ba9a8256e
1 changed files with 12 additions and 1 deletions
|
@ -258,9 +258,20 @@ public abstract class RemoteCommandShell implements IAdaptable, IRemoteCommandSh
|
|||
return _cwd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the context of this Shell as a String for persistence.
|
||||
* The context is typically the current working directory.
|
||||
* Returns an empty String if no context can be determined.
|
||||
*
|
||||
* @return The current context as String, or an empty String
|
||||
* if no context exists. Never returns <code>null</code>.
|
||||
*/
|
||||
public String getContextString()
|
||||
{
|
||||
return _cwd.getAbsolutePath();
|
||||
if(_cwd != null) {
|
||||
return _cwd.getAbsolutePath();
|
||||
}
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue