mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-27 10:55:33 +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
|
else
|
||||||
{
|
{
|
||||||
// get up-to-date version of the container (need to make sure it still exists)
|
// only do this if the object is "remote"
|
||||||
if (ss == null)
|
Object remoteAdapter = getRemoteAdapter(src);
|
||||||
|
if (remoteAdapter != null)
|
||||||
{
|
{
|
||||||
ss = adapter.getSubSystem(src);
|
// get up-to-date version of the container (need to make sure it still exists)
|
||||||
}
|
if (ss == null)
|
||||||
if (ss != null)
|
|
||||||
{
|
|
||||||
String key = adapter.getAbsoluteName(src);
|
|
||||||
if (key != 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
|
try
|
||||||
// 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
|
Object srcParent = adapter.getParent(src); // get parent before we query
|
||||||
src = srcParent;
|
// 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