@Override
 protected void buttonPressed(int buttonId) {
   if (buttonId == BID_ADD_IMPORT) {
     handleAddImport();
     return;
   }
   super.buttonPressed(buttonId);
 }
  @Override
  protected void handleEmptyList() {
    fTreeViewer.setInput(null);

    // Buzilla 290348 - added by Grid.Qian
    // the tree view's input is null, but the selection maybe not 0
    // for example the input is a list and we select a element, then
    // set the input = null, this time, the selection is not 0
    fFilteredList.setSelection(new int[0]);
    super.handleEmptyList();
  }
  /** Check to make sure that the mappings for the XML namespace exist */
  @Override
  protected void okPressed() {
    computeResult();
    Object obj[] = getResult();

    if (obj != null && obj.length > 0) {
      if (ensureXSDTypeNamespaceMappings(obj[0]) == false) {
        return;
      }

      handleAddImport(obj[0]);

      // only if we have a mapping do we dismiss the dialog
      super.okPressed();
    }
  }