/**
     * @see
     *     org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
     */
    public void widgetSelected(SelectionEvent e) {

      Object source = e.getSource();
      // edit filter
      if (source == mBtnEditFilter) {

        ISelection selection = mFilterList.getSelection();
        openFilterEditor(selection);
        getContainer().updateButtons();
      }
      if (source == mMainTab) {
        mFileSetsEditor.refresh();
        getContainer().updateButtons();

      } else if (source == mChkSyncFormatter) {
        mProjectConfig.setSyncFormatter(mChkSyncFormatter.getSelection());
      } else if (source == mChkSimpleConfig) {
        try {

          mProjectConfig.setUseSimpleConfig(mChkSimpleConfig.getSelection());

          boolean showWarning =
              CheckstyleUIPluginPrefs.getBoolean(CheckstyleUIPluginPrefs.PREF_FILESET_WARNING);
          if (mProjectConfig.isUseSimpleConfig() && showWarning) {
            MessageDialogWithToggle dialog =
                new MessageDialogWithToggle(
                    getShell(),
                    Messages.CheckstylePropertyPage_titleWarnFilesets,
                    null,
                    Messages.CheckstylePropertyPage_msgWarnFilesets,
                    MessageDialogWithToggle.WARNING,
                    new String[] {IDialogConstants.OK_LABEL},
                    0,
                    Messages.CheckstylePropertyPage_mgsWarnFileSetNagOption,
                    showWarning) {
                  /**
                   * Overwritten because we don't want to store which button the user pressed but
                   * the state of the toggle.
                   *
                   * @see MessageDialogWithToggle#buttonPressed(int)
                   */
                  protected void buttonPressed(int buttonId) {
                    getPrefStore().setValue(getPrefKey(), getToggleState());
                    setReturnCode(buttonId);
                    close();
                  }
                };
            dialog.setPrefStore(CheckstyleUIPlugin.getDefault().getPreferenceStore());
            dialog.setPrefKey(CheckstyleUIPluginPrefs.PREF_FILESET_WARNING);
            dialog.open();
          }

          createFileSetsArea(mFileSetsContainer);
          mFileSetsContainer.redraw();
          mFileSetsContainer.update();
          mFileSetsContainer.layout();
        } catch (CheckstylePluginException ex) {
          CheckstyleUIPlugin.errorDialog(getShell(), Messages.errorChangingFilesetEditor, ex, true);
        }
      }
    }