mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
[187732] can only do the reget of "remote" items
This commit is contained in:
parent
6e3638f499
commit
04efec958b
1 changed files with 27 additions and 22 deletions
|
@ -2107,33 +2107,38 @@ public class SystemView extends SafeTreeViewer
|
|||
}
|
||||
else
|
||||
{
|
||||
// get up-to-date version of the container (need to make sure it still exists)
|
||||
if (ss == null)
|
||||
// only do this if the object is "remote"
|
||||
Object remoteAdapter = getRemoteAdapter(src);
|
||||
if (remoteAdapter != null)
|
||||
{
|
||||
ss = adapter.getSubSystem(src);
|
||||
}
|
||||
if (ss != null)
|
||||
{
|
||||
String key = adapter.getAbsoluteName(src);
|
||||
if (key != null)
|
||||
// get up-to-date version of the container (need to make sure it still exists)
|
||||
if (ss == null)
|
||||
{
|
||||
try
|
||||
ss = adapter.getSubSystem(src);
|
||||
}
|
||||
if (ss != null)
|
||||
{
|
||||
String key = adapter.getAbsoluteName(src);
|
||||
if (key != null)
|
||||
{
|
||||
Object srcParent = adapter.getParent(src); // get parent before we query
|
||||
// because if after query src doesn't exist,
|
||||
// we can't get parent
|
||||
|
||||
src = ss.getObjectWithAbsoluteName(key);
|
||||
hasChildren = adapter.hasChildren((IAdaptable)src);
|
||||
if (!hasChildren)
|
||||
try
|
||||
{
|
||||
// make the src the parent of the src
|
||||
src = srcParent;
|
||||
Object srcParent = adapter.getParent(src); // get parent before we query
|
||||
// because if after query src doesn't exist,
|
||||
// we can't get parent
|
||||
|
||||
src = ss.getObjectWithAbsoluteName(key);
|
||||
hasChildren = adapter.hasChildren((IAdaptable)src);
|
||||
if (!hasChildren)
|
||||
{
|
||||
// make the src the parent of the src
|
||||
src = srcParent;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue