title: Start to edit the newest row added in a tableviewer
body: <p>I have a treeviewer with one column containing Strings.
  I made an "add button".</p>
  
  <p>what I want is when the user add a row, I want to move the "edit cursor" to the new row.</p>
  
  <p>I have 2 problems:</p>
  
  <ol>
  <li><p>when I add new data with</p>
  
  <p>tableViewer.add()</p></li>
  </ol>
  
  <p><code>tableViewer.getTable().getItemCount()</code> is not updated ! So i can't select the last row...</p>
  
  <p>Plus, when I set <code>ColumnViewerEditorActivationStrategy</code>. I cannot select anymore with <code>tableViewer.setSelection()</code></p>
  
  <ol start="2">
  <li>I don't know how to trigger the edition mode</li>
  </ol>
  
  <p>Here the detailled source code</p>
  
  <pre><code>public class CompositeTableViewer extends Composite {
  private TableViewer tableViewer;
  
  private List&lt;String&gt; columnNames;
  
  int correctionSelection = 0;
  
  public CompositeTableViewer(Composite parent, int style, List&lt;String&gt; columnNames, boolean rowAddable)
  {
      this(parent, style, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER, columnNames, rowAddable);
  }
  
  public CompositeTableViewer(Composite parent, int style, int tableViewerStyle, List&lt;String&gt; columnNames, boolean rowAddable)
  {
      super(parent, style);
  
      GridLayout layout = new GridLayout(3, false);
      layout.marginWidth = 4;
      this.setLayout(layout);
  
      this.setBackground(SWTResourceManager.getColor(SWT.COLOR_DARK_RED));
      setTableViewer(new TableViewer(this, tableViewerStyle));
  
      TextCellEditor columnEditor = new TextCellEditor(tableViewer.getTable());
      CellEditor[] editors = { columnEditor };
      this.columnNames = columnNames;
      tableViewer.setColumnProperties(this.columnNames.toArray(new String[this.columnNames.size()]));
      tableViewer.setContentProvider(new ArrayContentProvider());
      tableViewer.setLabelProvider(new LabelProvider());
      tableViewer.setCellEditors(editors);
      tableViewer.setCellModifier(new StringListCellModifier(this));
  
      //here I restricted the edit activation to double-click 
      changeColumnViewerEditorActivationStrategy();
  
      final Table table = tableViewer.getTable();
      table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
      table.setLinesVisible(true);
  
      createButtons(this, rowAddable);
  
  }
  
      public void setInput(List&lt;Object&gt; dataList)
      {
          this.tableViewer.setInput(dataList);
      }
      /**
       * change the edition activation to double click
       * otherwise that's block multi selection :/
       * 
       */
      public TableViewerFocusCellManager changeColumnViewerEditorActivationStrategy()
      {
          TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(tableViewer, new FocusCellOwnerDrawHighlighter(tableViewer));
  
          ColumnViewerEditorActivationStrategy activationSupport = new ColumnViewerEditorActivationStrategy(tableViewer)
          {
              protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event)
              {
                  // Enable editor only with mouse double click
                  if (event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION)
                  {
                      EventObject source = event.sourceEvent;
                      if (source instanceof MouseEvent &amp;&amp; ((MouseEvent) source).button == 3)
                          return false;
  
                      return true;
                  }
  
                  return false;
              }
          };
  
          TableViewerEditor.create(tableViewer, focusCellManager, activationSupport, ColumnViewerEditor.TABBING_HORIZONTAL
                  | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | ColumnViewerEditor.TABBING_VERTICAL | ColumnViewerEditor.KEYBOARD_ACTIVATION);
  
          return focusCellManager;
      }
  
  
      /**
       * Add the "Add" and "Delete" buttons
       * 
       * @param parent
       *            the parent composite
       */
      private void createButtons(Composite parent, boolean rowAddable)
      {
  
          // Create and configure the "Add" button
          Button add = new Button(parent, SWT.PUSH | SWT.CENTER);
          add.setText("Add");
  
          GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
          gridData.widthHint = 80;
          add.setLayoutData(gridData);
          add.setEnabled(rowAddable);
          add.addSelectionListener(new SelectionAdapter()
          {
  
              public void widgetSelected(SelectionEvent e)
              {
                  tableViewer.add("-_-"); // suppose to be an empty string
  
                  int selection = CompositeTableViewer.this.tableViewer.getTable().getItemCount();
  
                  CompositeTableViewer.this.tableViewer.setSelection(
                          new StructuredSelection(tableViewer.getElementAt(selection - 1 + correctionSelection)), true);
                  tableViewer.setSelection(new StructuredSelection(CompositeTableViewer.this.tableViewer.getElementAt(selection - 1)), true);
  
  
              }
          });
  
          // Create and configure the "Delete" button
          Button delete = new Button(parent, SWT.PUSH | SWT.CENTER);
          delete.setText("Delete");
          gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
          gridData.widthHint = 80;
          delete.setLayoutData(gridData);
  
          delete.addSelectionListener(new SelectionAdapter()
          {
              // Remove the selection and refresh the view
              public void widgetSelected(SelectionEvent e)
              {
                  Object[] dataTable = (Object[]) ((IStructuredSelection) tableViewer.getSelection()).toArray();
                  if (dataTable != null)
                  {
                      tableViewer.remove(dataTable);
                  }
              }
          });
  
      }
  }
  </code></pre>
  
  <p><strong>EDIT</strong>
  The problem was <em>ArraycontentProvider</em> can't be used for an editable table.
  and I should not use a list as a model. I change for a List.
  I put in comment my new source code</p>