mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +02:00
[230285] [shells] Remote shells should be restored on quit and re-start of RSE
This commit is contained in:
parent
3134763bfc
commit
96541e116e
1 changed files with 22 additions and 11 deletions
|
@ -19,6 +19,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||||
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
|
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
|
||||||
* Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
|
* Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
|
||||||
|
* David McKnight (IBM) - [230285] [shells] Remote shells should be restored on quit and re-start of RSE
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.shells.core.subsystems;
|
package org.eclipse.rse.subsystems.shells.core.subsystems;
|
||||||
|
@ -521,11 +522,13 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
|
||||||
// DKM: changing this so that only first active shell is saved
|
// DKM: changing this so that only first active shell is saved
|
||||||
StringBuffer shellBuffer = new StringBuffer();
|
StringBuffer shellBuffer = new StringBuffer();
|
||||||
boolean gotShell = false;
|
boolean gotShell = false;
|
||||||
for (int i = 0; i < cmdShells.size() && !gotShell; i++)
|
for (int i = 0; i < cmdShells.size() /*&& !gotShell*/; i++)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* if (i != 0) { shellBuffer.append('|'); }
|
if (i != 0) {
|
||||||
*/
|
shellBuffer.append('|');
|
||||||
|
}
|
||||||
|
|
||||||
IRemoteCommandShell cmd = (IRemoteCommandShell) cmdShells.get(i);
|
IRemoteCommandShell cmd = (IRemoteCommandShell) cmdShells.get(i);
|
||||||
if (cmd.isActive())
|
if (cmd.isActive())
|
||||||
{
|
{
|
||||||
|
@ -543,14 +546,22 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IPropertySet set = getPropertySet("Remote"); //$NON-NLS-1$
|
if (gotShell){
|
||||||
if (set != null)
|
IPropertySet set = getPropertySet("Remote"); //$NON-NLS-1$
|
||||||
{
|
if (set == null){
|
||||||
IProperty property = set.getProperty(COMMAND_SHELLS_MEMENTO);
|
set = createPropertySet("Remote"); //$NON-NLS-1$
|
||||||
if (property != null)
|
|
||||||
{
|
|
||||||
property.setValue(shellBuffer.toString());
|
|
||||||
}
|
}
|
||||||
|
if (set != null)
|
||||||
|
{
|
||||||
|
IProperty property = set.getProperty(COMMAND_SHELLS_MEMENTO);
|
||||||
|
if (property == null){
|
||||||
|
property = set.addProperty(COMMAND_SHELLS_MEMENTO, shellBuffer.toString());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
property.setValue(shellBuffer.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue