mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 03:53:21 +02:00
[341244] folder selection input to unlocked Remote Systems Details view sometimes fails
This commit is contained in:
parent
a40c7c8170
commit
4270ba7417
2 changed files with 18 additions and 2 deletions
|
@ -74,6 +74,7 @@
|
|||
* David McKnight (IBM) - [330398] RSE leaks SWT resources
|
||||
* David McKnight (IBM) - [215814] [performance] Duplicate Queries between Table and Remote Systems View
|
||||
* David McKnight (IBM) - [249031] Last used editor should be set to SystemEditableRemoteFile
|
||||
* David McKnight (IBM) - [341244] folder selection input to unlocked Remote Systems Details view sometimes fails
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.view;
|
||||
|
@ -939,6 +940,20 @@ public class SystemViewRemoteFileAdapter
|
|||
{
|
||||
IRemoteFile file = (IRemoteFile) element;
|
||||
|
||||
IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem();
|
||||
|
||||
// make sure we have the lastest cached version otherwise could be working with a bad file that never got marked as stale
|
||||
IRemoteFile originalFile = file;
|
||||
if (ss instanceof RemoteFileSubSystem){
|
||||
IRemoteFile cachedFile = ((RemoteFileSubSystem)ss).getCachedRemoteFile(file.getAbsolutePath());
|
||||
if (cachedFile != null){
|
||||
file = cachedFile;
|
||||
if (originalFile.isStale()){ // the original file was marked stale, so the cached one should be too
|
||||
file.markStale(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!file.exists())
|
||||
return false;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
* David McKnight (IBM) - [330398] RSE leaks SWT resources
|
||||
* David McKnight (IBM) - [340912] inconsistencies with columns in RSE table viewers
|
||||
* David McKnight (IBM) - [341240] Remote Systems Details view not remembering locked/unlocked state between sessions
|
||||
* David McKnight (IBM) - [341244] folder selection input to unlocked Remote Systems Details view sometimes fails
|
||||
*******************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
@ -1340,8 +1341,7 @@ public class SystemTableViewPart extends ViewPart
|
|||
{
|
||||
Object first = ((IStructuredSelection) sel).getFirstElement();
|
||||
if (_lastSelection != first)
|
||||
{
|
||||
_lastSelection = first;
|
||||
{
|
||||
if (first instanceof IAdaptable)
|
||||
{
|
||||
{
|
||||
|
@ -1352,6 +1352,7 @@ public class SystemTableViewPart extends ViewPart
|
|||
if (va.hasChildren(adapt) && adapt != _viewer.getInput())
|
||||
{
|
||||
setInput(adapt);
|
||||
_lastSelection = first;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue