1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

[390609] Cached file opened twice in case of eclipse linked resource..

This commit is contained in:
David McKnight 2012-09-28 18:01:41 +00:00
parent b152672e22
commit faadd385ee
2 changed files with 10 additions and 5 deletions

View file

@ -48,6 +48,7 @@
* David McKnight (IBM) - [357111] [DSTORE]File with invalid characters can't be opened in editor
* David McKnight (IBM) - [385420] double-click to open System editor from Remote Systems view not working
* David McKnight (IBM) - [385416] NPE during shutdown with remote editor open
* David McKnight (IBM) - [390609] Cached file opened twice in case of eclipse linked resource..
*******************************************************************************/
package org.eclipse.rse.files.ui.resources;
@ -1154,10 +1155,13 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
if (editorInput instanceof IFileEditorInput)
{
IPath path = ((IFileEditorInput) editorInput).getFile().getLocation();
IFile file = ((IFileEditorInput) editorInput).getFile();
IPath path = file.getLocation();
if (path!=null && lFile.compareTo(new java.io.File(path.toOSString()))==0) {
//if (path.makeAbsolute().toOSString().equalsIgnoreCase(localPath))
return OPEN_IN_SAME_PERSPECTIVE;
if (!file.isLinked()){ // linked resources need to be treated differently
//if (path.makeAbsolute().toOSString().equalsIgnoreCase(localPath))
return OPEN_IN_SAME_PERSPECTIVE;
}
}
}
}

View file

@ -26,6 +26,7 @@
* David McKnight (IBM) - [251631] NullPointerException in SystemTempFileListener
* David McKnight (IBM) - [256048] Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
* David McKnight (IBM) - [381482] Improper use of save participant is causing a workspace hang
* David McKnight (IBM) - [390609] Cached file opened twice in case of eclipse linked resource..
*******************************************************************************/
package org.eclipse.rse.files.ui.resources;
@ -784,9 +785,9 @@ public abstract class SystemTempFileListener implements IResourceChangeListener
return false;
IResourceDelta[] subdeltas = delta.getAffectedChildren();
if (subdeltas.length > 0)
for (int i = 0; i < subdeltas.length; i++)
{
IResource resource = subdeltas[0].getResource();
IResource resource = subdeltas[i].getResource();
if ((resource != null) && (resource.getType() == IResource.PROJECT))
{
if (resource.getName().equals(SystemRemoteEditManager.REMOTE_EDIT_PROJECT_NAME))