1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 12:35:22 +02:00

[276195] Avoid unnecessary selectionChanged when restoring connections

This commit is contained in:
Martin Oberhuber 2009-05-14 17:12:48 +00:00
parent a527bfdda5
commit c985ce92ca

View file

@ -69,6 +69,7 @@
* David McKnight (IBM) - [257721] Doubleclick doing special handling and expanding * David McKnight (IBM) - [257721] Doubleclick doing special handling and expanding
* David McKnight (IBM) - [190805] [performance][dstore] Right-click > Disconnect on a dstore connection is slow and spawns many Jobs * David McKnight (IBM) - [190805] [performance][dstore] Right-click > Disconnect on a dstore connection is slow and spawns many Jobs
* David McKnight (IBM) - [190001] [refresh] Avoid unnecessary duplicate queries during drag&drop to filter * David McKnight (IBM) - [190001] [refresh] Avoid unnecessary duplicate queries during drag&drop to filter
* Martin Oberhuber (Wind River) - [276195] Avoid unnecessary selectionChanged when restoring connections
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -1779,8 +1780,12 @@ public class SystemView extends SafeTreeViewer
if (!getControl().isDisposed()) { if (!getControl().isDisposed()) {
ResourceChangedJob job = new ResourceChangedJob(event, this); ResourceChangedJob job = new ResourceChangedJob(event, this);
job.setPriority(Job.INTERACTIVE); job.setPriority(Job.INTERACTIVE);
//job.setUser(true); if (Display.getCurrent() != null) {
job.schedule(); job.runInUIThread(null);
} else {
// job.setUser(true);
job.schedule();
}
/* /*
Display display = Display.getCurrent(); Display display = Display.getCurrent();
try { try {
@ -1904,7 +1909,7 @@ public class SystemView extends SafeTreeViewer
if (debug) { if (debug) {
logDebugMsg("SV event: EVENT_ADD "); //$NON-NLS-1$ logDebugMsg("SV event: EVENT_ADD "); //$NON-NLS-1$
} }
clearSelection(); // clearSelection();
//refresh(parent);t //refresh(parent);t
parentItem = findItem(parent); parentItem = findItem(parent);
if (parentItem == null) return Status.OK_STATUS; if (parentItem == null) return Status.OK_STATUS;
@ -1970,7 +1975,7 @@ public class SystemView extends SafeTreeViewer
{ {
createTreeItem(parentItem, src, pos); createTreeItem(parentItem, src, pos);
} }
setSelection(new StructuredSelection(src), true); // setSelection(new StructuredSelection(src), true);
} }
break; break;
case ISystemResourceChangeEvents.EVENT_ADD_MANY: case ISystemResourceChangeEvents.EVENT_ADD_MANY: