diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java index 281efc4b334..01dcf4082e6 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java @@ -72,6 +72,7 @@ * David McKnight (IBM) - [228743] [usability][dnd] Paste into read-only folder fails silently * David McKnight (IBM) - [284157] [performance] too many jobs kicked off for getting file permissions for table * David McKnight (IBM) - [330398] RSE leaks SWT resources + * David McKnight (IBM) - [215814] [performance] Duplicate Queries between Table and Remote Systems View *******************************************************************************/ package org.eclipse.rse.internal.files.ui.view; @@ -314,7 +315,9 @@ public class SystemViewRemoteFileAdapter } public void addFile(IRemoteFile file){ - _files.add(file); + if (!_files.contains(file)){ + _files.add(file); + } } @@ -877,6 +880,9 @@ public class SystemViewRemoteFileAdapter } // message already issued } file.markStale(false); + if (originalFile != null && originalFile != file){ + originalFile.markStale(false); + } } return children; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java index 3d91e4b258e..5ab549d1982 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2010 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2011 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -27,6 +27,7 @@ * Noriaki Takatsu (IBM) - [288894] CANCEL has to be pressed 3 times in Userid/Password prompt window in Remote System Details view * David McKnight (IBM) - [329170] Show in table does not work after showing empty folder in table * David McKnight (IBM) - [308783] Value in Properties view remains "Pending..." + * David McKnight (IBM) - [215814] [performance] Duplicate Queries between Table and Remote Systems View ********************************************************************************/ package org.eclipse.rse.ui.view; @@ -661,6 +662,17 @@ public class SystemTableView } } + private Object[] internalGetSampleChildren(){ + SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider(); + Object lastObj = provider._lastObject; + if (lastObj != getInput() || provider._lastResults == null){ + Object[] children = provider.getChildren(_objectInput); + return children; + } + else { + return provider._lastResults; + } + } /** * Determines what columns should be shown in this view. The columns may change * anytime the view input changes. The columns in the control are modified and @@ -675,7 +687,7 @@ public class SystemTableView return; SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider(); - Object[] children = provider.getChildren(_objectInput); + Object[] children = internalGetSampleChildren(); // if no children, don't update if (children == null || children.length == 0)