| Summary: | [LinkedResources] Linked Resources properties page should have a Remove button | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Markus Keller <markus.kell.r> | ||||||||
| Component: | UI | Assignee: | Serge Beauchamp <serge> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Serge Beauchamp <serge> | ||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | Szymon.Brandys | ||||||||
| Version: | 3.7 | Flags: | Szymon.Brandys:
review+
|
||||||||
| Target Milestone: | 3.7 M3 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Markus Keller
Created attachment 178726 [details]
Implementation
Szymon, can you review it please? Thanks Questions/comments: 1. is there a reason to keep fProjectFiles in LinkedResourceEditor 2. We should handle exceptions thrown from ProgressMonitorDialog#run more gracefully. Especially InvocationTargetException. Maybe an error dialog, or at least logging using our log facility. 3. I think that 'found' in the for loop (lines 591 - 602) is not required. (In reply to comment #3) > Questions/comments: > 1. is there a reason to keep fProjectFiles in LinkedResourceEditor Well, fProjectFiles is used to cache the linked resources list in a project. Without it, the linked resource list would have to be fetched again using the resource visitor each time the user switch between the two tabs in the property page (since changes to path variables can change linked resource locations). Internally, the linked resource list is readily available in the core.resource ProjectDescription, so if we had a public API to get the list of all linked resources in a project, we wouldn't need to use the fProjectFiles structure, nor the resource visitor. It would then be much faster. But we don't have such API at the moment. > 2. We should handle exceptions thrown from ProgressMonitorDialog#run more > gracefully. Especially InvocationTargetException. Maybe an error dialog, or at > least logging using our log facility. Good point, I'll make the changes. > 3. I think that 'found' in the for loop (lines 591 - 602) is not required. Hum, you must be thinking about some other way to accomplish the removal of deleted IResource from the fProjectFiles array. The way the code does it is to make a copy, and copy only the files that were not deleted, hence it uses the 'found' variable to know if it should copy the existing resource to the new array. Created attachment 178916 [details]
New version, with better error handling.
Created attachment 178920 [details]
New version, without the fProjectFiles array
Looks good. Now fixed on head. |