| Summary: | [ltk] CompositeChange swallows affectedObjects of its children | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jan Koehnlein <jan> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert |
| Version: | 4.3 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
|
Description
Jan Koehnlein
Strictly speaking, if one of the children returns 'null', one cannot compute the correct set of affected objects, hence 'null' is the right answer. Moving to Markus for final comment. Interesting, because some Change implementations return null (DocumentChange) and others don't (TextFileChange). So these cannot be composed in the same CompositeChange? (In reply to comment #1) I agree, the contract of Change#getAffectedObjects() is pretty clear about this. The Javadoc of the Change class should mention that subclasses should override getAffectedObjects (e.g. at the end of the paragraph "It is important ..."). DocumentChange, ResourceChange, NullChange, etc. should override getAffectedObjects(). In the first two, it should return the modified element (document/resource). In NullChange, it should return new Object[0]. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |