Summary: | [Viewers] TableViewer have ITableLabelProvider interface, but dosen't have TableViewerSorter. | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | xy <nhsoft.xy> |
Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | Tod_Creasey, tom.schindl |
Version: | 3.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
xy
2006-09-21 04:17:10 EDT
Is this a sorter that allows you to sort by a particular column? Generally table sorting is a little more complex with the sorting done with several columns in a particular order. tv.getTable().setSortColumn(tv.getTable().getColumn(columnIndex)) will also cause an update of the sort indicator everytime it is called. There also appears to be a large performance problem here for (int i = 0; i < tv.getTable().getItemCount(); i++) { Object obj = tv.getElementAt(i); if (obj.equals(e1)) { idx1 = i; } else if (obj.equals(e2)) { idx2 = i; } if (idx1 > 0 && idx2 > 0) { break; } } is o(N*N*lgN) or O(N*N*N*lgN) if hash lookup is not being used. (O)n lg(n) for the sort from the table 0(n) for for (int i = 0; i < tv.getTable().getItemCount(); i++) { and O(n) for tv.getElementAt(i); It is a generic sorter, for sorting strings of a table(every column). Of course sorting by datatype each column is more better. Hitesh is now responsible for watching bugs in the [Viewers] component area. 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. If you have further information on the current state of the bug, please add it. 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. |