mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 22:25:25 +02:00
[262930] Remote System Details view not restoring filter memento input
This commit is contained in:
parent
9dee00533d
commit
b22279e09b
2 changed files with 46 additions and 9 deletions
|
@ -15,6 +15,7 @@
|
|||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
|
||||
* Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
|
||||
* David McKnight (IBM) - [262930] Remote System Details view not restoring filter memento input
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
|
||||
|
@ -175,6 +176,12 @@ public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
|
|||
*/
|
||||
public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception
|
||||
{
|
||||
// first attempt getting filter
|
||||
Object filterRef = super.getObjectWithAbsoluteName(key, monitor);
|
||||
if (filterRef != null) {
|
||||
return filterRef;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
long pid = Long.parseLong(key);
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
* David McKnight (IBM) - [244270] Explicit check for isOffline and just returning block implementing a cache for Work Offline
|
||||
* Don Yantzi (IBM) - [244807] Delay connecting if resolving filters while restoring from cache
|
||||
* David McKnight (IBM) - [226787] [services] Dstore processes subsystem is empty after switching from shell processes
|
||||
* David McKnight (IBM) - [262930] Remote System Details view not restoring filter memento input
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.subsystems;
|
||||
|
@ -923,22 +924,51 @@ implements IAdaptable, ISubSystem, ISystemFilterPoolReferenceManagerProvider
|
|||
try
|
||||
{
|
||||
ISystemFilterPoolReferenceManager filterMgr = getFilterPoolReferenceManager();
|
||||
String modString = filterID.replace('.', ',');
|
||||
|
||||
String[] segments = modString.split(",");
|
||||
|
||||
int indexOfDot = filterID.indexOf('.');
|
||||
if (indexOfDot > 0)
|
||||
if (segments.length > 0)
|
||||
{
|
||||
String mgrName = filterID.substring(0, indexOfDot);
|
||||
// this is the profile
|
||||
String mgrName = segments[0];
|
||||
|
||||
// this is the filter pool manager for the profile
|
||||
ISystemFilterPoolManager mgr = parentSubSystemConfiguration.getSystemFilterPoolManager(mgrName);
|
||||
|
||||
int indexOfDot2 = filterID.indexOf('.', indexOfDot + 1);
|
||||
if (mgr != null && indexOfDot2 > 0)
|
||||
{
|
||||
String filterPoolName = filterID.substring(indexOfDot + 1, indexOfDot2);
|
||||
if (mgr != null && segments.length > 1){
|
||||
// name of the filter is the last segment
|
||||
String filterName = segments[segments.length - 1];
|
||||
|
||||
// filter pool name is the 3rd and 2nd to last segment
|
||||
//String filterPoolName =
|
||||
// segments[segments.length - 3] + '.' +
|
||||
// segments[segments.length - 2];
|
||||
|
||||
|
||||
ISystemFilterPool filterPool = null;
|
||||
ISystemFilterPool[] filterPools = mgr.getSystemFilterPools();
|
||||
for (int p = 0; p < filterPools.length && filterPool == null; p++){
|
||||
ISystemFilterPool pool = filterPools[p];
|
||||
String realPoolName = pool.getName();
|
||||
|
||||
// check for match
|
||||
String filterPoolName = segments[segments.length - 2];
|
||||
for (int s = 3; s < segments.length && filterPool == null; s++){
|
||||
if (filterPoolName.equals(realPoolName)){
|
||||
filterPool = pool;
|
||||
}
|
||||
else if (realPoolName.endsWith(filterPoolName)){
|
||||
filterPoolName = segments[segments.length - s] + '.' + filterPoolName;
|
||||
}
|
||||
else {
|
||||
// no match
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ISystemFilterPool filterPool = mgr.getSystemFilterPool(filterPoolName);
|
||||
|
||||
String filterName = filterID.substring(indexOfDot2 + 1, filterID.length());
|
||||
if (filterPool != null)
|
||||
{
|
||||
ISystemFilter filter = filterPool.getSystemFilter(filterName);
|
||||
|
|
Loading…
Add table
Reference in a new issue