Program: 149109
Project: 149109
Buggy source:
@Override protected void createViewer(){
  super.createTable();
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  table.setLayoutData(gd);
  gd.heightHint=80;
  Composite stepUpDownComposite=toolkit.createComposite(mainComposite,SWT.NONE);
  stepUpDownComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
  GridLayout layout=new GridLayout(8,false);
  layout.marginTop=0;
  layout.marginBottom=0;
  layout.marginHeight=0;
  stepUpDownComposite.setLayout(layout);
  addButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  addButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  addButton.setToolTipText("String_Node_Str");
  addButton.setImage(ImageCache.getCreatedImage(EImage.ADD_OBJ.getPath()));
  addButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      List<Line> list=(List<Line>)getViewer().getInput();
      Line line=new Line(columns.toArray(new ComplexTableViewerColumn[columns.size()]),getInitValues());
      list.add(line);
      viewer.setSelection(null);
      viewer.refresh();
      viewer.getTable().select(viewer.getTable().getItemCount() - 1);
      markDirty();
    }
  }
);
  deleteButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  deleteButton.setToolTipText("String_Node_Str");
  deleteButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  deleteButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      int index=viewer.getTable().getSelectionIndex();
      if (index >= 0 && index < viewer.getTable().getItemCount()) {
        List<Line> items=(List<Line>)viewer.getInput();
        items.remove(index);
        viewer.refresh();
        int pos=index - 1;
        if (pos >= 0)         viewer.getTable().select(pos);
        markDirty();
      }
    }
  }
);
  deleteButton.setImage(ImageCache.getCreatedImage(EImage.DELETE_OBJ.getPath()));
  upButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  upButton.setToolTipText("String_Node_Str");
  upButton.setImage(ImageCache.getCreatedImage(EImage.PREV_NAV.getPath()));
  upButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  upButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      int index=viewer.getTable().getSelectionIndex();
      if (index > 0 && index < viewer.getTable().getItemCount()) {
        if (mainPage != null) {
          mainPage.setComitting(true);
        }
        List<Line> items=(List<Line>)viewer.getInput();
        Line line=items.get(index);
        items.remove(index);
        items.add(index - 1,line);
        viewer.refresh();
        if (mainPage != null) {
          mainPage.setComitting(false);
        }
        markDirty();
      }
    }
  }
);
  downButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  downButton.setToolTipText("String_Node_Str");
  downButton.setImage(ImageCache.getCreatedImage(EImage.NEXT_NAV.getPath()));
  downButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  downButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      int index=viewer.getTable().getSelectionIndex();
      if (index >= 0 && index < viewer.getTable().getItemCount() - 1) {
        if (mainPage != null) {
          mainPage.setComitting(true);
        }
        List<Line> items=(List<Line>)viewer.getInput();
        Line line=items.get(index);
        items.remove(index);
        items.add(index + 1,line);
        viewer.refresh();
        if (mainPage != null) {
          mainPage.setComitting(false);
        }
        markDirty();
      }
    }
  }
);
  copyButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  copyButton.setToolTipText("String_Node_Str");
  copyButton.setImage(ImageCache.getCreatedImage(EImage.COPY.getPath()));
  copyButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  copyButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      int index=viewer.getTable().getSelectionIndex();
      if (index >= 0 && index <= viewer.getTable().getItemCount() - 1) {
        List<Line> items=(List<Line>)viewer.getInput();
        Line line=items.get(index);
        copyLine=line.clone();
        pastButton.setEnabled(copyLine != null);
      }
    }
  }
);
  pastButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  pastButton.setToolTipText("String_Node_Str");
  pastButton.setImage(ImageCache.getCreatedImage(EImage.PASTE.getPath()));
  pastButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  pastButton.setEnabled(false);
  pastButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      if (copyLine == null)       return;
      if (mainPage != null) {
        mainPage.setComitting(true);
      }
      List<Line> items=(List<Line>)viewer.getInput();
      items.add(copyLine);
      viewer.refresh();
      if (mainPage != null) {
        mainPage.setComitting(false);
      }
      markDirty();
    }
  }
);
  CellEditor[] editors=new CellEditor[columns.size()];
  for (int i=0; i < columns.size(); i++) {
    if (columns.get(i).isText()) {
      editors[i]=new TextCellEditor(table);
    }
 else     if (columns.get(i).isCombo()) {
      editors[i]=new ComboBoxCellEditor(table,((ComplexTableViewerColumn)columns.get(i)).getComboValues(),SWT.READ_ONLY);
    }
 else     if (columns.get(i).isXPATH()) {
      editors[i]=new XpathCellEditor(table);
    }
  }
  viewer.setCellEditors(editors);
  viewer.setContentProvider(new IStructuredContentProvider(){
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
    @SuppressWarnings("String_Node_Str") public Object[] getElements(    Object inputElement){
      ArrayList<Line> lines=(ArrayList<Line>)inputElement;
      return lines.toArray(new Line[lines.size()]);
    }
  }
);
  viewer.setLabelProvider(new ITableLabelProvider(){
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void dispose(){
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void removeListener(    ILabelProviderListener listener){
    }
    public String getColumnText(    Object element,    int columnIndex){
      Line line=(Line)element;
      if (columnIndex >= 0 && columnIndex < columns.size()) {
        for (        KeyValue keyvalue : line.keyValues) {
          if (keyvalue.key.equals(columns.get(columnIndex).getName())) {
            String val=keyvalue.value;
            if (columns.get(columnIndex).isNillable()) {
              if (columns.get(columnIndex).getNillValue().equals(val))               val=columns.get(columnIndex).getNillDisplay();
            }
            return val;
          }
        }
      }
      return "String_Node_Str";
    }
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
  }
);
  ArrayList<String> columnNames=new ArrayList<String>();
  for (  ComplexTableViewerColumn column : columns) {
    columnNames.add(column.getName());
  }
  viewer.setColumnProperties(columnNames.toArray(new String[columnNames.size()]));
  viewer.setCellModifier(new ICellModifier(){
    public boolean canModify(    Object element,    String property){
      return editable;
    }
    @SuppressWarnings("String_Node_Str") public void modify(    Object element,    String property,    Object value){
      if (value instanceof Integer) {
        if (Integer.valueOf(value.toString()) == -1)         return;
      }
      TableItem item=(TableItem)element;
      Line line=(Line)item.getData();
      int columnIndex=Arrays.asList(viewer.getColumnProperties()).indexOf(property);
      if (columnIndex >= 0 && columnIndex < viewer.getColumnProperties().length) {
        if (isAColumnWithCombo(columnIndex)) {
          String[] attrs=columns.get(columnIndex).getComboValues();
          value=attrs[Integer.parseInt(value.toString())];
        }
        KeyValue kv=line.keyValues.get(columnIndex);
        boolean noChange=kv.value.equals(value.toString());
        kv.value=value.toString();
        viewer.refresh();
        if (!noChange) {
          markDirty();
        }
      }
    }
    public Object getValue(    Object element,    String property){
      int columnIndex=Arrays.asList(viewer.getColumnProperties()).indexOf(property);
      Line line=(Line)element;
      if (isAColumnWithCombo(columnIndex)) {
        String value=line.keyValues.get(columnIndex).value;
        String[] attrs=columns.get(columnIndex).getComboValues();
        return Arrays.asList(attrs).indexOf(value);
      }
      for (      KeyValue keyvalue : line.keyValues) {
        if (property.equals(keyvalue.key)) {
          if (keyvalue.value.equals("String_Node_Str")) {
            return columns.get(columnIndex).getNillDisplay();
          }
          return keyvalue.value;
        }
      }
      return null;
    }
    private boolean isAColumnWithCombo(    int columnIdx){
      return columns.get(columnIdx).isCombo();
    }
  }
);
  viewer.getTable().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void keyReleased(    KeyEvent e){
      if ((e.stateMask == 0) && (e.character == SWT.DEL) && (viewer.getSelection() != null)) {
        Line line=(Line)((IStructuredSelection)viewer.getSelection()).getFirstElement();
        List<Line> items=(List<Line>)viewer.getInput();
        items.remove(line);
        viewer.refresh();
        markDirty();
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void createViewer(){
  super.createTable();
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  table.setLayoutData(gd);
  gd.heightHint=80;
  Composite stepUpDownComposite=toolkit.createComposite(mainComposite,SWT.NONE);
  stepUpDownComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
  GridLayout layout=new GridLayout(8,false);
  layout.marginTop=0;
  layout.marginBottom=0;
  layout.marginHeight=0;
  stepUpDownComposite.setLayout(layout);
  addButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  addButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  addButton.setToolTipText("String_Node_Str");
  addButton.setImage(ImageCache.getCreatedImage(EImage.ADD_OBJ.getPath()));
  addButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      List<Line> list=(List<Line>)getViewer().getInput();
      Line line=new Line(columns.toArray(new ComplexTableViewerColumn[columns.size()]),getInitValues());
      list.add(line);
      viewer.setSelection(null);
      viewer.refresh();
      viewer.getTable().select(viewer.getTable().getItemCount() - 1);
      markDirty();
    }
  }
);
  if (isAddMulti()) {
    Button addAllButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
    addAllButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
    addAllButton.setToolTipText("String_Node_Str");
    addAllButton.setImage(ImageCache.getCreatedImage(EImage.ADDMULTI_OBJ.getPath()));
    addAllButton.addSelectionListener(new SelectionListener(){
      public void widgetDefaultSelected(      org.eclipse.swt.events.SelectionEvent e){
      }
      @SuppressWarnings("String_Node_Str") public void widgetSelected(      org.eclipse.swt.events.SelectionEvent e){
        if (xpathDialog == null) {
          xpathDialog=new XpathSelectDialog(table.getShell(),mainPage.getXObject().getParent(),"String_Node_Str",mainPage.getSite(),true,null);
        }
        xpathDialog.setBlockOnOpen(true);
        xpathDialog.open();
        if (xpathDialog.getReturnCode() == Window.OK) {
          String[] xpaths=xpathDialog.getXpath().split("String_Node_Str");
          for (          String xpath : xpaths) {
            List<Line> list=(List<Line>)getViewer().getInput();
            Line line=new Line(columns.toArray(new ComplexTableViewerColumn[columns.size()]),getLineValues(xpath,0));
            list.add(line);
          }
          viewer.setSelection(null);
          viewer.refresh();
          viewer.getTable().select(viewer.getTable().getItemCount() - 1);
          markDirty();
        }
      }
    }
);
  }
  deleteButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  deleteButton.setToolTipText("String_Node_Str");
  deleteButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  deleteButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      int index=viewer.getTable().getSelectionIndex();
      if (index >= 0 && index < viewer.getTable().getItemCount()) {
        List<Line> items=(List<Line>)viewer.getInput();
        items.remove(index);
        viewer.refresh();
        int pos=index - 1;
        if (pos >= 0)         viewer.getTable().select(pos);
        markDirty();
      }
    }
  }
);
  deleteButton.setImage(ImageCache.getCreatedImage(EImage.DELETE_OBJ.getPath()));
  Button deleteAllButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  deleteAllButton.setToolTipText("String_Node_Str");
  deleteAllButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  deleteAllButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      List<Line> items=(List<Line>)viewer.getInput();
      items.clear();
      viewer.refresh();
      markDirty();
    }
  }
);
  deleteAllButton.setImage(ImageCache.getCreatedImage(EImage.PROGRESS_REMALL.getPath()));
  upButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  upButton.setToolTipText("String_Node_Str");
  upButton.setImage(ImageCache.getCreatedImage(EImage.PREV_NAV.getPath()));
  upButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  upButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      int index=viewer.getTable().getSelectionIndex();
      if (index > 0 && index < viewer.getTable().getItemCount()) {
        if (mainPage != null) {
          mainPage.setComitting(true);
        }
        List<Line> items=(List<Line>)viewer.getInput();
        Line line=items.get(index);
        items.remove(index);
        items.add(index - 1,line);
        viewer.refresh();
        if (mainPage != null) {
          mainPage.setComitting(false);
        }
        markDirty();
      }
    }
  }
);
  downButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  downButton.setToolTipText("String_Node_Str");
  downButton.setImage(ImageCache.getCreatedImage(EImage.NEXT_NAV.getPath()));
  downButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  downButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      int index=viewer.getTable().getSelectionIndex();
      if (index >= 0 && index < viewer.getTable().getItemCount() - 1) {
        if (mainPage != null) {
          mainPage.setComitting(true);
        }
        List<Line> items=(List<Line>)viewer.getInput();
        Line line=items.get(index);
        items.remove(index);
        items.add(index + 1,line);
        viewer.refresh();
        if (mainPage != null) {
          mainPage.setComitting(false);
        }
        markDirty();
      }
    }
  }
);
  copyButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  copyButton.setToolTipText("String_Node_Str");
  copyButton.setImage(ImageCache.getCreatedImage(EImage.COPY.getPath()));
  copyButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  copyButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      int index=viewer.getTable().getSelectionIndex();
      if (index >= 0 && index <= viewer.getTable().getItemCount() - 1) {
        List<Line> items=(List<Line>)viewer.getInput();
        Line line=items.get(index);
        copyLine=line.clone();
        pastButton.setEnabled(copyLine != null);
      }
    }
  }
);
  pastButton=toolkit.createButton(stepUpDownComposite,"String_Node_Str",SWT.PUSH | SWT.CENTER);
  pastButton.setToolTipText("String_Node_Str");
  pastButton.setImage(ImageCache.getCreatedImage(EImage.PASTE.getPath()));
  pastButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false,1,1));
  pastButton.setEnabled(false);
  pastButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      if (copyLine == null)       return;
      if (mainPage != null) {
        mainPage.setComitting(true);
      }
      List<Line> items=(List<Line>)viewer.getInput();
      items.add(copyLine);
      viewer.refresh();
      if (mainPage != null) {
        mainPage.setComitting(false);
      }
      markDirty();
    }
  }
);
  CellEditor[] editors=new CellEditor[columns.size()];
  for (int i=0; i < columns.size(); i++) {
    if (columns.get(i).isText()) {
      editors[i]=new TextCellEditor(table);
    }
 else     if (columns.get(i).isCombo()) {
      editors[i]=new ComboBoxCellEditor(table,((ComplexTableViewerColumn)columns.get(i)).getComboValues(),SWT.READ_ONLY);
    }
 else     if (columns.get(i).isXPATH()) {
      editors[i]=new XpathCellEditor(table);
    }
  }
  viewer.setCellEditors(editors);
  viewer.setContentProvider(new IStructuredContentProvider(){
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
    @SuppressWarnings("String_Node_Str") public Object[] getElements(    Object inputElement){
      ArrayList<Line> lines=(ArrayList<Line>)inputElement;
      return lines.toArray(new Line[lines.size()]);
    }
  }
);
  viewer.setLabelProvider(new ITableLabelProvider(){
    public boolean isLabelProperty(    Object element,    String property){
      return false;
    }
    public void dispose(){
    }
    public void addListener(    ILabelProviderListener listener){
    }
    public void removeListener(    ILabelProviderListener listener){
    }
    public String getColumnText(    Object element,    int columnIndex){
      Line line=(Line)element;
      if (columnIndex >= 0 && columnIndex < columns.size()) {
        for (        KeyValue keyvalue : line.keyValues) {
          if (keyvalue.key.equals(columns.get(columnIndex).getName())) {
            String val=keyvalue.value;
            if (columns.get(columnIndex).isNillable()) {
              if (columns.get(columnIndex).getNillValue().equals(val))               val=columns.get(columnIndex).getNillDisplay();
            }
            return val;
          }
        }
      }
      return "String_Node_Str";
    }
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
  }
);
  ArrayList<String> columnNames=new ArrayList<String>();
  for (  ComplexTableViewerColumn column : columns) {
    columnNames.add(column.getName());
  }
  viewer.setColumnProperties(columnNames.toArray(new String[columnNames.size()]));
  viewer.setCellModifier(new ICellModifier(){
    public boolean canModify(    Object element,    String property){
      return editable;
    }
    @SuppressWarnings("String_Node_Str") public void modify(    Object element,    String property,    Object value){
      if (value instanceof Integer) {
        if (Integer.valueOf(value.toString()) == -1)         return;
      }
      TableItem item=(TableItem)element;
      Line line=(Line)item.getData();
      int columnIndex=Arrays.asList(viewer.getColumnProperties()).indexOf(property);
      if (columnIndex >= 0 && columnIndex < viewer.getColumnProperties().length) {
        if (isAColumnWithCombo(columnIndex)) {
          String[] attrs=columns.get(columnIndex).getComboValues();
          value=attrs[Integer.parseInt(value.toString())];
        }
        KeyValue kv=line.keyValues.get(columnIndex);
        boolean noChange=kv.value.equals(value.toString());
        kv.value=value.toString();
        viewer.refresh();
        if (!noChange) {
          markDirty();
        }
      }
    }
    public Object getValue(    Object element,    String property){
      int columnIndex=Arrays.asList(viewer.getColumnProperties()).indexOf(property);
      Line line=(Line)element;
      if (isAColumnWithCombo(columnIndex)) {
        String value=line.keyValues.get(columnIndex).value;
        String[] attrs=columns.get(columnIndex).getComboValues();
        return Arrays.asList(attrs).indexOf(value);
      }
      for (      KeyValue keyvalue : line.keyValues) {
        if (property.equals(keyvalue.key)) {
          if (keyvalue.value.equals("String_Node_Str")) {
            return columns.get(columnIndex).getNillDisplay();
          }
          return keyvalue.value;
        }
      }
      return null;
    }
    private boolean isAColumnWithCombo(    int columnIdx){
      return columns.get(columnIdx).isCombo();
    }
  }
);
  viewer.getTable().addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
    }
    @SuppressWarnings("String_Node_Str") public void keyReleased(    KeyEvent e){
      if ((e.stateMask == 0) && (e.character == SWT.DEL) && (viewer.getSelection() != null)) {
        Line line=(Line)((IStructuredSelection)viewer.getSelection()).getFirstElement();
        List<Line> items=(List<Line>)viewer.getInput();
        items.remove(line);
        viewer.refresh();
        markDirty();
      }
    }
  }
);
}