| Summary: | StructuredViewer.setComparator() is wrong | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Oliver Albrecht <oliver.albrecht> |
| Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | ||
| Version: | 3.2 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
The following code can never succeed, because this.sorter == sorter is always TRUE. This is a C&P error (see setSorter()). public void setComparator(ViewerComparator comparator){ if (this.sorter != sorter){ this.sorter = comparator; refresh(); } } The correct code is: public void setComparator(ViewerComparator comparator){ if (this.sorter != comparator){ this.sorter = comparator; refresh(); } }