diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java index d5e580898bc..c5eb03fa59d 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java @@ -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; + } } } } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java index 281d8c5aa45..652d6d0f5b5 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java @@ -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))