public void newNamedCluster() {
   XulDialog xulDialog =
       (XulDialog) getXulDomContainer().getDocumentRoot().getElementById("sqoop-import");
   Shell shell = (Shell) xulDialog.getRootObject();
   ncDelegate.newNamedCluster(jobMeta, null, shell);
   populateNamedClusters();
 }
 protected void showErrorDialog(String title, String message) {
   errorDialog = (XulDialog) container.getDocumentRoot().getElementById("errorDialog");
   XulLabel errorLabel = (XulLabel) container.getDocumentRoot().getElementById("errorLabel");
   errorDialog.setTitle(title);
   errorLabel.setValue(message);
   errorDialog.show();
 }
 public void editNamedCluster() {
   if (isSelectedNamedCluster()) {
     XulDialog xulDialog =
         (XulDialog) getXulDomContainer().getDocumentRoot().getElementById("sqoop-import");
     Shell shell = (Shell) xulDialog.getRootObject();
     ncDelegate.editNamedCluster(null, selectedNamedCluster, shell);
     populateNamedClusters();
   }
 }
  private void setFinished() {

    wizardDialog.hide();
    MessageHandler.getInstance().showWaitingDialog();
    activeDatasource.onFinish(
        new XulServiceCallback<IDatasourceSummary>() {
          @Override
          public void success(IDatasourceSummary iDatasourceSummary) {

            iDatasourceSummary
                .getDomain()
                .getLogicalModels()
                .get(0)
                .setProperty("DatasourceType", new Property<String>(activeDatasource.getId()));
            for (IWizardListener wizardListener : wizardListeners) {
              wizardListener.onFinish(iDatasourceSummary);
            }
          }

          @Override
          public void error(String s, Throwable throwable) {
            throwable.printStackTrace();
            // TODO: improve error messaging
            MessageHandler.getInstance().closeWaitingDialog();
            MessageHandler.getInstance()
                .showErrorDialog(
                    "Error",
                    ExceptionParser //$NON-NLS-1$
                        .getErrorMessage(
                        throwable,
                        MessageHandler.getString(
                            "DatasourceEditor.ERROR_0001_UNKNOWN_ERROR_HAS_OCCURED")),
                    true); //$NON-NLS-1$
          }
        });
  }
 public void show() {
   XulDialog dialog =
       (XulDialog) container.getDocumentRoot().getElementById("repository-explorer-dialog");
   dialog.show();
 }
 @Bindable
 public void editFieldSettings() {
   summaryDialog.hide();
   wizardDialog.show();
   finishButton.setDisabled(false);
 }
 public void showWarningDialog() {
   warningDialog = (XulDialog) xulDomContainer.getDocumentRoot().getElementById("overwriteDialog");
   warningDialog.show();
 }
 @Bindable
 public void overwriteDialogCancel() {
   warningDialog.hide();
 }
 @Bindable
 public void overwriteDialogAccept() {
   warningDialog.hide();
   setFinished();
 }
 @Bindable
 public void closeErrorDialog() {
   errorDialog.hide();
 }