title: JFace TableViewer get multiple selected rows
body: <p><img src="https://i.stack.imgur.com/6Tr1t.png" alt="enter image description here"></p>
  
  <p>I want to add a listener to the select button which gets the multiple rows selected in the checklist tableviewer. It then proccedes to check those boxes.
  My question is how do I get the list of rows selected in the tableviewer?</p>
  
  <p>Here is the code for the table:</p>
  
  <pre><code>private void createCheckViewer(Composite parent){
  
      tableViewer = CheckboxTableViewer.newCheckList(parent, SWT.MULTI| SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
  
  
      if ( (GanttFrame.getListOfFunctionTasks()!= null)){
  
          if (!(GanttFrame.getListOfFunctionTasks().isEmpty())){
  
              // Data Rows
              for (int i = 0; i &lt; GanttFrame.getListOfFunctionTasks().size(); i++) {
                  tableViewer.add(GanttFrame.getListOfFunctionTasks().get(i));
                  GanttFrame.getListOfFunctionTasks().get(i).setCheckId(i);
              } 
          }
  
      }
  
      // flow trace or function trace
      String columnHeader;
  
      if (TraceData.getFlowTraceFlag()){
          columnHeader = "Flow Traces";
      }else{
          columnHeader = "Function Traces";
      }
  
      // define layout for the viewer
      gridData = new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1);
      gridData.heightHint = 400;
      tableViewer.getControl().setLayoutData(gridData);
  
      tableViewer.addCheckStateListener(this.getCheckListListener());
  
      final Table table = tableViewer.getTable();
  
      TableLayout layout = new TableLayout();
  
      TableViewerColumn col = new TableViewerColumn(tableViewer, SWT.LEAD);
      col.getColumn().setText(columnHeader);
      layout.addColumnData(new ColumnWeightData(500));
  
      table.setLayout(layout);
      table.setHeaderVisible(true);
      table.setLinesVisible(true);
  }
  </code></pre>