| Summary: | Refresh highlights wrong tab when two files with the same absolute path are open | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | David I <david.ishee> | ||||||
| Component: | RSE | Assignee: | David McKnight <dmcknigh> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | dmcknigh, xuanchen | ||||||
| Version: | 3.3 | Flags: | mober.at+eclipse:
pmc_approved+
xuanchen: review+ |
||||||
| Target Milestone: | 3.3.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
David I
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. |