mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[189262] don't cast Tree to Item..only assume widget
This commit is contained in:
parent
f782738bf8
commit
977a4c3317
1 changed files with 7 additions and 4 deletions
|
@ -2917,7 +2917,7 @@ public class SystemView extends SafeTreeViewer
|
||||||
// STEP 3: process all references to the object
|
// STEP 3: process all references to the object
|
||||||
boolean firstSelection = true;
|
boolean firstSelection = true;
|
||||||
for (int idx = 0; idx < matches.size(); idx++) {
|
for (int idx = 0; idx < matches.size(); idx++) {
|
||||||
Item match = (Item) matches.elementAt(idx);
|
Widget match = (Widget) matches.elementAt(idx);
|
||||||
// a reference to this remote object
|
// a reference to this remote object
|
||||||
if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
|
if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
|
||||||
Object data = match.getData();
|
Object data = match.getData();
|
||||||
|
@ -2934,10 +2934,13 @@ public class SystemView extends SafeTreeViewer
|
||||||
{
|
{
|
||||||
allowExpand = rmtAdapter.hasChildren((IAdaptable)data);
|
allowExpand = rmtAdapter.hasChildren((IAdaptable)data);
|
||||||
}
|
}
|
||||||
if (allowExpand && wasExpanded && !getExpanded(match)) // assume if callers wants to select kids that they want to expand parent
|
if (match instanceof Item)
|
||||||
{
|
{
|
||||||
createChildren(match);
|
if (allowExpand && wasExpanded && !getExpanded((Item)match)) // assume if callers wants to select kids that they want to expand parent
|
||||||
setExpanded(match, true);
|
{
|
||||||
|
createChildren(match);
|
||||||
|
setExpanded((Item)match, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// todo: handle cumulative selections.
|
// todo: handle cumulative selections.
|
||||||
// STEP 4: If requested, select the kids in the newly refreshed object.
|
// STEP 4: If requested, select the kids in the newly refreshed object.
|
||||||
|
|
Loading…
Add table
Reference in a new issue