| Summary: | [Import/Export] Incomplete validation when importing from directory | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Enrico Persiani <enrico> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | RESOLVED FIXED | QA Contact: | Prakash Rangaraj <prakash> |
| Severity: | normal | ||
| Priority: | P5 | CC: | bokowski |
| Version: | 3.2 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Enrico Persiani
This is a classic case of underspecification - the Javadoc does not explain exactly when events are fired. Since there are many existing clients of CheckboxTreeViewer who may rely on the current implementation, I prefer to clarify the API to say that the setters don't generate any events. After that, this becomes a bug in the Import wizard. While I agree that changing the current behaviour may break for existing users of CheckboxTreeViewer (eg. eternal loops with two mutually notifying widgets), I believe that this should be fixed in CheckboxTreeViewer. The reason is that the current behaviour allows two ways of setting a checkmark (manually clicking with the mouse, and calling #setChecked() ), where one has effects for other users of the tree viewer, and one doesn't. Ie. the visual effects are the same, but the end results aren't. This just happened to me when I attempted to set check marks in a tree viewer by selecting objects in a GEF viewer. It seemed to work at first... but it didn't really. Which is why I debugged to see what happens, and why I'm reading this bug report. Of course, one can always subclass, which is what I'll do for now. Comment to my previous comment: On closer thought, it would probably be wrong to introduce potential eternal loops (or stack overflows) to fix this bug... probably...? I'm not sure what the right answer is. Fixed the underspecification problem by adding the following sentence to the Javadoc where appropriate: "Does not fire events to check state listeners." Changing the title and moving back to the inbox because the remaining bug is in the import/export code. We currently don't have any plan to work on this but we would accept a patcy Followed the steps. At step 5, the error is shown after clicking Deselect All. Probably got fixed with some other bug |