1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 23:15:24 +02:00

[362700] SystemTableTreeViewProvider should not use context object in adapter call to get subsystem

This commit is contained in:
David McKnight 2011-11-02 16:47:38 +00:00
parent 8731a9cb2f
commit 6a2fe632f9

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * Copyright (c) 2002, 2011 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* David McKnight (IBM) - [362700] SystemTableTreeViewProvider should not use context object in adapter call to get subsystem
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -211,17 +212,13 @@ public class SystemTableTreeViewProvider implements ILabelProvider, ITableLabelP
{ {
if (manager != null) if (manager != null)
{ {
ISubSystem ss = adapter.getSubSystem(object); ISubSystem ss = adapter.getSubSystem(element); // should be element (not object) - since object could be context
if (ss != null && adapter.supportsDeferredQueries(ss)) if (ss != null && adapter.supportsDeferredQueries(ss))
{ {
// if (ss.isConnected())
{
results = manager.getChildren(object); results = manager.getChildren(object);
} }
} }
} }
}
else else
{ {
if (object instanceof IContextObject) if (object instanceof IContextObject)
@ -258,6 +255,7 @@ public class SystemTableTreeViewProvider implements ILabelProvider, ITableLabelP
return new Object[0]; return new Object[0];
} }
return results; return results;
} }