[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: having trouble using ViewerSorter
|
A good example to look at for this is the task list. Under
plugins/org.eclipse.ui/workbenchsrc.zip, you'll find the following classes:
org.eclipse.ui.views.tasklist.TaskList
org.eclipse.ui.views.tasklist.TaskSorter
If you look through the code for these, you'll find how to add and configure
sorters based on column selection in a TableViewer. In particular see
TaskList#createColumns. Hope this helps!
Tiger wrote:
> Hi !
>
> could someone help me using ViewerSorter ??
> My problem is that when I set a sorter to a TableViewer the content of the
> Table disapear !!
> I'm following those steps :
> 1. I create the Table and the TableViewer => OK
> 2. I fill in the Table (using TableViewer.add(Object)) => OK
> 3. I set a sorter to sort my data => NOK => there are no more datas after
> !!
>
> I dont want to set the sorter before retrieving the datas, i want to let
> the user choose on which column he wants to apply the sorter.
>
> i hope this is clear enough (sorry for my english ;-))
>
> BTW, I've got another problem : i'd like to use Eclipse for a Business
> application and I dont want the end-user to have access to menu like
> "Project", "Import/Export", "Create new Java/File ..." : any ideas ??
>
> THX