mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 10:25:32 +02:00
[166345] applied patch for "empty list" problem
This commit is contained in:
parent
4a01aad91a
commit
a88fe3e775
2 changed files with 24 additions and 16 deletions
|
@ -2788,16 +2788,16 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
if (!isTreeItemSelected(widget)) // it is one of our kids that is selected
|
if (!isTreeItemSelected(widget)) // it is one of our kids that is selected
|
||||||
{
|
{
|
||||||
clearSelection(); // there is nothing much else we can do. Calling code will restore it anyway hopefully
|
clearSelection(); // there is nothing much else we can do. Calling code will restore it anyway hopefully
|
||||||
doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings);
|
doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings, true);
|
||||||
} else // it is us that is selected. This might be a refresh selected operation. TreeItem address won't change
|
} else // it is us that is selected. This might be a refresh selected operation. TreeItem address won't change
|
||||||
{
|
{
|
||||||
doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings);
|
doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final boolean finalDoTimings = doTimings;
|
final boolean finalDoTimings = doTimings;
|
||||||
preservingSelection(new Runnable() {
|
preservingSelection(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
doOurInternalRefresh(fWidget, fElement, fDoStruct, finalDoTimings);
|
doOurInternalRefresh(fWidget, fElement, fDoStruct, finalDoTimings, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2813,7 +2813,7 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doOurInternalRefresh(Widget widget, Object element, boolean doStruct, boolean doTimings) {
|
protected void doOurInternalRefresh(Widget widget, Object element, boolean doStruct, boolean doTimings, boolean firstCall) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
logDebugMsg("in doOurInternalRefresh on " + getAdapter(element).getName(element)); //$NON-NLS-1$
|
logDebugMsg("in doOurInternalRefresh on " + getAdapter(element).getName(element)); //$NON-NLS-1$
|
||||||
logDebugMsg("...current selection is " + getFirstSelectionName(getSelection())); //$NON-NLS-1$
|
logDebugMsg("...current selection is " + getFirstSelectionName(getSelection())); //$NON-NLS-1$
|
||||||
|
@ -2846,9 +2846,9 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
// DKM - without the else we get duplicate queries on expanded folder
|
// DKM - without the else we get duplicate queries on expanded folder
|
||||||
// uncommented - seems new results after query aren't showing up
|
// uncommented - seems new results after query aren't showing up
|
||||||
//else
|
//else
|
||||||
{
|
// {
|
||||||
internalRefresh(element);
|
// internalRefresh(element);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (doTimings && timer != null) {
|
if (doTimings && timer != null) {
|
||||||
System.out.println("doOurInternalRefresh timer 3: time to updateChildren:" + timer.setEndTime()); //$NON-NLS-1$
|
System.out.println("doOurInternalRefresh timer 3: time to updateChildren:" + timer.setEndTime()); //$NON-NLS-1$
|
||||||
|
@ -2865,7 +2865,7 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
for (int i = 0; i < children.length; i++) {
|
for (int i = 0; i < children.length; i++) {
|
||||||
Widget item = children[i];
|
Widget item = children[i];
|
||||||
Object data = item.getData();
|
Object data = item.getData();
|
||||||
if (data != null) doOurInternalRefresh(item, data, doStruct, false);
|
if (data != null) doOurInternalRefresh(item, data, doStruct, false, false);
|
||||||
/*
|
/*
|
||||||
if (doTimings)
|
if (doTimings)
|
||||||
{
|
{
|
||||||
|
@ -2879,6 +2879,10 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (firstCall)
|
||||||
|
{
|
||||||
|
internalRefresh(element);
|
||||||
|
}
|
||||||
if (doTimings && timer != null) {
|
if (doTimings && timer != null) {
|
||||||
System.out.println("doOurInternalRefresh timer 4: time to recurse children:" + timer.setEndTime()); //$NON-NLS-1$
|
System.out.println("doOurInternalRefresh timer 4: time to recurse children:" + timer.setEndTime()); //$NON-NLS-1$
|
||||||
timer.setStartTime();
|
timer.setStartTime();
|
||||||
|
|
|
@ -2788,16 +2788,16 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
if (!isTreeItemSelected(widget)) // it is one of our kids that is selected
|
if (!isTreeItemSelected(widget)) // it is one of our kids that is selected
|
||||||
{
|
{
|
||||||
clearSelection(); // there is nothing much else we can do. Calling code will restore it anyway hopefully
|
clearSelection(); // there is nothing much else we can do. Calling code will restore it anyway hopefully
|
||||||
doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings);
|
doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings, true);
|
||||||
} else // it is us that is selected. This might be a refresh selected operation. TreeItem address won't change
|
} else // it is us that is selected. This might be a refresh selected operation. TreeItem address won't change
|
||||||
{
|
{
|
||||||
doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings);
|
doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final boolean finalDoTimings = doTimings;
|
final boolean finalDoTimings = doTimings;
|
||||||
preservingSelection(new Runnable() {
|
preservingSelection(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
doOurInternalRefresh(fWidget, fElement, fDoStruct, finalDoTimings);
|
doOurInternalRefresh(fWidget, fElement, fDoStruct, finalDoTimings, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2813,7 +2813,7 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doOurInternalRefresh(Widget widget, Object element, boolean doStruct, boolean doTimings) {
|
protected void doOurInternalRefresh(Widget widget, Object element, boolean doStruct, boolean doTimings, boolean firstCall) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
logDebugMsg("in doOurInternalRefresh on " + getAdapter(element).getName(element)); //$NON-NLS-1$
|
logDebugMsg("in doOurInternalRefresh on " + getAdapter(element).getName(element)); //$NON-NLS-1$
|
||||||
logDebugMsg("...current selection is " + getFirstSelectionName(getSelection())); //$NON-NLS-1$
|
logDebugMsg("...current selection is " + getFirstSelectionName(getSelection())); //$NON-NLS-1$
|
||||||
|
@ -2846,9 +2846,9 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
// DKM - without the else we get duplicate queries on expanded folder
|
// DKM - without the else we get duplicate queries on expanded folder
|
||||||
// uncommented - seems new results after query aren't showing up
|
// uncommented - seems new results after query aren't showing up
|
||||||
//else
|
//else
|
||||||
{
|
// {
|
||||||
internalRefresh(element);
|
// internalRefresh(element);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (doTimings && timer != null) {
|
if (doTimings && timer != null) {
|
||||||
System.out.println("doOurInternalRefresh timer 3: time to updateChildren:" + timer.setEndTime()); //$NON-NLS-1$
|
System.out.println("doOurInternalRefresh timer 3: time to updateChildren:" + timer.setEndTime()); //$NON-NLS-1$
|
||||||
|
@ -2865,7 +2865,7 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
for (int i = 0; i < children.length; i++) {
|
for (int i = 0; i < children.length; i++) {
|
||||||
Widget item = children[i];
|
Widget item = children[i];
|
||||||
Object data = item.getData();
|
Object data = item.getData();
|
||||||
if (data != null) doOurInternalRefresh(item, data, doStruct, false);
|
if (data != null) doOurInternalRefresh(item, data, doStruct, false, false);
|
||||||
/*
|
/*
|
||||||
if (doTimings)
|
if (doTimings)
|
||||||
{
|
{
|
||||||
|
@ -2879,6 +2879,10 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (firstCall)
|
||||||
|
{
|
||||||
|
internalRefresh(element);
|
||||||
|
}
|
||||||
if (doTimings && timer != null) {
|
if (doTimings && timer != null) {
|
||||||
System.out.println("doOurInternalRefresh timer 4: time to recurse children:" + timer.setEndTime()); //$NON-NLS-1$
|
System.out.println("doOurInternalRefresh timer 4: time to recurse children:" + timer.setEndTime()); //$NON-NLS-1$
|
||||||
timer.setStartTime();
|
timer.setStartTime();
|
||||||
|
|
Loading…
Add table
Reference in a new issue