Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 177235 Details for
Bug 323299
[files] remote file view adapter needs to use the latest version of IRemoteFile
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
updated patch to also synchronize on the file
patch.txt (text/plain), 5.92 KB, created by
David McKnight
on 2010-08-23 12:16:56 EDT
(
hide
)
Description:
updated patch to also synchronize on the file
Filename:
MIME Type:
Creator:
David McKnight
Created:
2010-08-23 12:16:56 EDT
Size:
5.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.files.ui >Index: src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java,v >retrieving revision 1.101 >diff -u -r1.101 SystemViewRemoteFileAdapter.java >--- src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java 19 Aug 2010 16:42:54 -0000 1.101 >+++ src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java 23 Aug 2010 16:15:25 -0000 >@@ -67,6 +67,7 @@ > * David McKnight (IBM) - [309813] RSE permits opening of file after access removed > * David McKnight (IBM) - [308221] Bidi3.6: Improper display of date in Properties and Table Views > * David McKnight (IBM) - [317541] Show blank as the last modified for a file with no last modified >+ * David McKnight (IBM) - [323299] [files] remote file view adapter needs to use the latest version of IRemoteFile > *******************************************************************************/ > > package org.eclipse.rse.internal.files.ui.view; >@@ -168,6 +169,7 @@ > import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile; > import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEmpty; > import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileRoot; >+import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem; > import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType; > import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName; > import org.eclipse.rse.ui.ISystemContextMenuConstants; >@@ -647,6 +649,14 @@ > return ((RemoteFileRoot) file).getRootFiles(); > } > 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 >+ if (ss instanceof RemoteFileSubSystem){ >+ IRemoteFile cachedFile = ((RemoteFileSubSystem)ss).getCachedRemoteFile(file.getAbsolutePath()); >+ if (cachedFile != null){ >+ file = cachedFile; >+ } >+ } > > > /* >@@ -746,65 +756,67 @@ > } > } > >- boolean hasChildren = file.hasContents(RemoteChildrenContentsType.getInstance(), filter); >- >- if (hasChildren && !file.isStale()) >- { >- children = file.getContents(RemoteChildrenContentsType.getInstance(), filter); >- children = filterChildren(children); >- } >- else >- { >- try >+ synchronized (file){ >+ boolean hasChildren = file.hasContents(RemoteChildrenContentsType.getInstance(), filter); >+ >+ if (hasChildren && !file.isStale()) > { >- if (monitor != null) >- { >- >- children = ss.resolveFilterString(file, filter, monitor); >- } >- else >- { >- children = ss.resolveFilterString(file, filter, new NullProgressMonitor()); >- } >- >- if ((children == null) || (children.length == 0)) >- { >- children = EMPTY_LIST; >- } >- else >+ children = file.getContents(RemoteChildrenContentsType.getInstance(), filter); >+ children = filterChildren(children); >+ } >+ else >+ { >+ try > { >- if (children.length == 1 && children[0] instanceof SystemMessageObject) >+ if (monitor != null) >+ { >+ >+ children = ss.resolveFilterString(file, filter, monitor); >+ } >+ else >+ { >+ children = ss.resolveFilterString(file, filter, new NullProgressMonitor()); >+ } >+ >+ if ((children == null) || (children.length == 0)) > { >- // don't filter children so that the message gets propagated >+ children = EMPTY_LIST; > } > else > { >- children = filterChildren(children); >+ if (children.length == 1 && children[0] instanceof SystemMessageObject) >+ { >+ // don't filter children so that the message gets propagated >+ } >+ else >+ { >+ children = filterChildren(children); >+ } > } >+ > } >- >- } >- catch (InterruptedException exc) >- { >- children = new SystemMessageObject[1]; >- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, >- ICommonMessageIds.MSG_EXPAND_CANCELLED, >- IStatus.CANCEL, CommonMessages.MSG_EXPAND_CANCELLED); >- children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_CANCEL, element); >+ catch (InterruptedException exc) >+ { >+ children = new SystemMessageObject[1]; >+ SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, >+ ICommonMessageIds.MSG_EXPAND_CANCELLED, >+ IStatus.CANCEL, CommonMessages.MSG_EXPAND_CANCELLED); >+ children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_CANCEL, element); >+ } >+ catch (Exception exc) >+ { >+ children = new SystemMessageObject[1]; >+ >+ SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, >+ ICommonMessageIds.MSG_EXPAND_FAILED, >+ IStatus.ERROR, >+ CommonMessages.MSG_EXPAND_FAILED); >+ children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, element); >+ SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$ >+ } // message already issued > } >- catch (Exception exc) >- { >- children = new SystemMessageObject[1]; >- >- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, >- ICommonMessageIds.MSG_EXPAND_FAILED, >- IStatus.ERROR, >- CommonMessages.MSG_EXPAND_FAILED); >- children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, element); >- SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$ >- } // message already issued >+ file.markStale(false); > } >- file.markStale(false); > return children; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 323299
:
177150
| 177235 |
177336