+ private TableViewer createTableViewer(final Composite parent) {
+ int style = SWT.H_SCROLL | SWT.V_SCROLL;
+
+ Composite tableCmp = new Composite(parent, SWT.NO_FOCUS);
+ tableCmp.setLayoutData(EclipseUiUtils.fillAll());
+
+ Table table = new Table(tableCmp, style);
+ TableViewer viewer = new TableViewer(table);
+ table.setLinesVisible(true);
+ table.setHeaderVisible(true);
+
+ TableColumnLayout tableColumnLayout = new TableColumnLayout();
+ TableViewerColumn column;
+
+ // Create other columns
+ List<ColumnDefinition> colDefs = getColumnsDef();
+ for (ColumnDefinition colDef : colDefs) {
+ column = ViewerUtils.createTableViewerColumn(viewer, colDef.label,
+ SWT.NONE, colDef.weight);
+ column.setLabelProvider(colDef.provider);
+ tableColumnLayout.setColumnData(column.getColumn(),
+ new ColumnWeightData(colDef.weight, colDef.minWidth, true));
+ }
+
+ tableCmp.setLayout(tableColumnLayout);
+ return viewer;
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ }
+
+ private class UsersContentProvider implements IStructuredContentProvider {
+ private static final long serialVersionUID = 1L;
+
+ public Object[] getElements(Object inputElement) {
+ return (Object[]) inputElement;
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+ }
+
+ // /* MANAGE FILTER */
+ // private void createFilterPart(Composite parent) {
+ // // Text Area for the filter
+ // filterTxt = new Text(parent, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH
+ // | SWT.ICON_CANCEL);
+ // filterTxt.setMessage(filterHelpMsg);
+ // filterTxt.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ // | GridData.HORIZONTAL_ALIGN_FILL));
+ // filterTxt.addModifyListener(new ModifyListener() {
+ // private static final long serialVersionUID = 1L;
+ //
+ // public void modifyText(ModifyEvent event) {
+ // refreshFilteredList();
+ // }
+ // });
+ // }
+
+ /**
+ * Refresh the user list: caller might overwrite in order to display a
+ * subset of all users, typically to remove current user from the list
+ */
+ protected void refreshFilteredList(String filter) {