title: Disposing SelectionListener In SWT on click of another button
body: <p>I have a code which adds four check box button to SWT shell , i have added selection Listener to the checkBox buttons , which i want to remove on click of OK,CANCEL and CLOSE button of SWT Shell , How can i dispose such event , this is my code</p>
  
  <pre><code>grpVersionTreeComponents.setLayoutData(componentsRenderer.createGridData(490, 220, 4));
              for(int versionCount = 0; versionCount &lt; versionSplitters.length ; versionCount++ ){
                  String splitter= versionSplitters[versionCount];
                  Button cbVersionSplitter = new CheckBoxWrapper().getButton(grpVersionTreeComponents,splitter.toString() , "");
                  cbVersionSplitter.setEnabled(true);
                  versionSplitterCheckBoxList.add(cbVersionSplitter);
                  versionSplitterCheckBoxList.get(versionCount).addSelectionListener(addSplitterCheckBoxListner(cbVersionSplitter));
  
              }
  </code></pre>
  
  <p>this my selection Adapter method</p>
  
  <pre><code>public SelectionAdapter addSplitterCheckBoxListner(final Button button){
          return new SelectionAdapter() {
              public void widgetSelected(SelectionEvent e) {
  
  
                  String[] defaultVersionSplitters =  PropertyClass.getPropertyLabel(QTLConstants.VERSIONING_ASSISTENT_PAGE_SPLLITER).split(QTLConstants.MULTIPLE_EXTENSIONS_SPLITER);
                  //check if button.getText() is equal to "Custom Splitter" String
                  if(button.getText().equalsIgnoreCase(defaultVersionSplitters[3])){
                      if(button.getSelection()){
                          customVersionSplitterText.setEnabled(true);
                      }else{
                          customVersionSplitterText.setEnabled(false);
                      }
  
                  }
  
  
              }
  
          };
      }
  </code></pre>
  
  <p>and OK cancel Buttons are added in this fashion</p>
  
  <pre><code>private void addOkCancelButtonOnVersionTreePopup(final Shell versionTreeComponentsShell){
  
          Button ok = componentsRenderer.createButtonWidget(versionTreeComponentsShell, SWT.PUSH,
                  PropertyClass.getPropertyLabel(QTLConstants.OK_BUTTON));
          Button cancel = componentsRenderer.createButtonWidget(versionTreeComponentsShell, SWT.PUSH,
                  PropertyClass.getPropertyLabel(QTLConstants.CANCEL_BUTTON));
          ok.addSelectionListener(new SelectionAdapter() {
              @Override
              public void widgetSelected(SelectionEvent e) {
  
  }
          });
  }
  cancel.addSelectionListener(new SelectionAdapter() {
              @Override
              public void widgetSelected(SelectionEvent e) {          
                  /*disposeSelectionListener(cbVersionSplitter);*/
                  versionTreeComponentsShell.close();             
              }
          });
  
      }
  }
  </code></pre>
  
  <p>so how can i remove this selection listener</p>
  
  <p>Regards</p>