Community
Participate
Working Groups
Open the same filename on two different remote hosts using SSH. Edit and save the second one, and a refresh event is generated. However, the first tab with that filename is highlighted and gains focus. The first tab may not be the one you were working with.
Was it only the same file name (in different folders), or was it the same absolute path? Dave M: You've been working on Refresh before, what do you think?
(In reply to comment #1) > Was it only the same file name (in different folders), or was it the same > absolute path? > > Dave M: You've been working on Refresh before, what do you think? I recreated the scenario by creating two files with identical paths on their respective systems. When the "link with editor" is off or the paths are not identical the problem does not occur.
Created attachment 201247 [details] patch to compare subsystems The original code checks for a remote path associated with the IFile that matches the corresponding remote object but it doesn't check the subsystems. This patch addresses that.
Martin and Xuan could you please review this patch?
Can objSS == null ? Problebly not since adapter.getAbsoluteName(obj)!=null ? If it can be null, then you might want to do this in line 431: if (objSS==null || objSS.equals(editorSS)) { page.bringToTop(editor); return; }
(In reply to comment #5) > Can objSS == null ? Problebly not since adapter.getAbsoluteName(obj)!=null ? > > If it can be null, then you might want to do this in line 431: > > if (objSS==null || objSS.equals(editorSS)) { > page.bringToTop(editor); > return; > } I wouldn't think objSS could be null since the adapter does return a path for the object but it never hurts to add a null check.
Created attachment 201257 [details] updated patch with extra null check on the subsystems
You are correct that the path names were the same
+1 I'm fine with the patch. The "editorSS != null" is not needed on line 431 since equals() deals with that. BTW since we're now under the Tools PMC, I'm not a PMC member any more.
I've committed the change to cvs although I'm still waiting on the review by Xuan.
Sorry, I was away yesterday. The fix looks good. Thanks.