/*
  * (non-Javadoc)
  *
  * @see
  * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
  * .events.SelectionEvent)
  */
 public void widgetSelected(SelectionEvent e) {
   Object source = e.getSource();
   /*
    * if (source == fUpButton) { fEnvironmentVariablesContentProvider
    * .up((IStructuredSelection) fLibraryViewer.getSelection()); } else if
    * (source == fDownButton) { fEnvironmentVariablesContentProvider
    * .down((IStructuredSelection) fLibraryViewer.getSelection()); } else
    */ if (source == fRemoveButton) {
     EnvironmentVariable[] old = this.fEnvironmentVariablesContentProvider.getVariables();
     fEnvironmentVariablesContentProvider.remove(
         (IStructuredSelection) fVariablesViewer.getSelection());
     fDialog.updateLibraries(this.fEnvironmentVariablesContentProvider.getVariables(), old);
   } else if (source == fAddExistedButton) {
     addExisted((IStructuredSelection) fVariablesViewer.getSelection());
   } else if (source == fAddButton) {
     add((IStructuredSelection) fVariablesViewer.getSelection());
   } else if (source == fEditButton) {
     EnvironmentVariable[] old = this.fEnvironmentVariablesContentProvider.getVariables();
     edit((IStructuredSelection) fVariablesViewer.getSelection());
     fDialog.updateLibraries(this.fEnvironmentVariablesContentProvider.getVariables(), old);
   } else if (source == fImportButton) {
     performImport();
   } else if (source == fExportButton) {
     performExport();
   }
   update();
 }