Search in sources :

Example 6 with ViewerComparator

use of org.eclipse.jface.viewers.ViewerComparator in project bndtools by bndtools.

the class TableSortingEnabler method setTableViewer.

private void setTableViewer(TableViewer tableViewer) {
    this.tableViewer = tableViewer;
    addColumnSelectionListeners(tableViewer);
    tableViewer.setComparator(new ViewerComparator() {

        @Override
        public int compare(Viewer viewer, Object e1, Object e2) {
            return compareElements(e1, e2);
        }
    });
}
Also used : ViewerComparator(org.eclipse.jface.viewers.ViewerComparator) TableViewer(org.eclipse.jface.viewers.TableViewer) Viewer(org.eclipse.jface.viewers.Viewer)

Aggregations

ViewerComparator (org.eclipse.jface.viewers.ViewerComparator)6 Viewer (org.eclipse.jface.viewers.Viewer)4 TableViewer (org.eclipse.jface.viewers.TableViewer)3 ArrayContentProvider (org.eclipse.jface.viewers.ArrayContentProvider)2 GridData (org.eclipse.swt.layout.GridData)2 Composite (org.eclipse.swt.widgets.Composite)2 Label (org.eclipse.swt.widgets.Label)2 Project (aQute.bnd.build.Project)1 File (java.io.File)1 RefactoringRule (org.autorefactor.refactoring.RefactoringRule)1 IObservableValue (org.eclipse.core.databinding.observable.value.IObservableValue)1 IProject (org.eclipse.core.resources.IProject)1 IViewerObservableValue (org.eclipse.jface.databinding.viewers.IViewerObservableValue)1 ControlDecoration (org.eclipse.jface.fieldassist.ControlDecoration)1 FieldDecoration (org.eclipse.jface.fieldassist.FieldDecoration)1 PixelConverter (org.eclipse.jface.layout.PixelConverter)1 IPreferenceNode (org.eclipse.jface.preference.IPreferenceNode)1 CheckStateChangedEvent (org.eclipse.jface.viewers.CheckStateChangedEvent)1 CheckboxTableViewer (org.eclipse.jface.viewers.CheckboxTableViewer)1 CheckboxTreeViewer (org.eclipse.jface.viewers.CheckboxTreeViewer)1