Package org.apache.uima.pear

Examples of org.apache.uima.pear.PearException


      setWindowTitle("Edit PEAR Installation Descriptor");
      setDefaultPageImageDescriptor(PearPlugin.getImageDescriptor("editInsdWiz.gif"));
      setNeedsProgressMonitor(true);
      currentProject = project;
    } catch (Throwable e) {
      PearException subEx = new PearException(
              "Operation failed because the wizard could not be initialized.\nPlease report this error.",
              e);
      subEx.openErrorDialog(getShell());
      this.dispose();
    }
    try {
      insd = PearInstallationDescriptor.getInstallationDescriptor(currentProject);
    } catch (Throwable e) {
      e.printStackTrace();
      insd = new InstallationDescriptor();
    }
    try {
      ProjectCustomizer.customizeProject(currentProject, insd);
    } catch (Throwable e) {
      PearException subEx = new PearException(
              "Operation failed because the wizard could not customize your project as a UIMA project.",
              e);
      subEx.openErrorDialog(getShell());
      this.dispose();
    }
  }
View Full Code Here


      environmentPage = new INSDEnvironmentPage(currentProject, insd, wizardData);
      addPage(environmentPage);

    } catch (Throwable e) {
      PearException subEx = new PearException(
              "Operation failed because the wizard's pages could not be initialized properly.", e);
      subEx.openErrorDialog(getShell());
      this.dispose();
    }

  }
View Full Code Here

    // initialize Page with insd content;
    try {
      initializePage();
      validateCompInfo();
    } catch (Throwable e) {
      PearException subEx = new PearException(
              "The operation failed because the wizard's pages could not be initialized properly.",
              e);
      subEx.openErrorDialog(getShell());
      this.dispose();
    }
  }
View Full Code Here

      setErrorMessage(fileValidationMsg);

      dialogChanged();
      setControl(container);
    } catch (Throwable e) {
      PearException subEx = new PearException(
              "The operation failed because the wizard's pages could not be initialized properly.",
              e);
      subEx.openErrorDialog(getShell());
      this.dispose();
    }
  }
View Full Code Here

   * @return true
   * @throws PearException -
   */
  protected boolean ensureTargetFileIsValid(File targetFile) throws PearException {
    if (targetFile.exists() && targetFile.isDirectory()) {
      throw new PearException("The target pear File must not be a directory", new PearException(
              "The target pear File must not be a directory"));
    }
    if (targetFile.exists()) {
      if (!targetFile.canWrite()) {
        throw new PearException("The pear File exists, but is not writable", new PearException(
                "The pear File exists, but is not writable"));
      }
    }
    return true;
  }
View Full Code Here

    try {
      ProjectCustomizer.createFile(newContainer, INSTALLATION_DESCRIPTOR_PATH,
              InstallationDescriptorHandler.getInstallationDescriptorAsStream(insd),
              overrideContentIfExist);
    } catch (Throwable e) {
      PearException subEx = new PearException("The Installation Descriptor ("
              + INSTALLATION_DESCRIPTOR_PATH + ") could not be created/saved properly.", e);
      throw subEx;
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.pear.PearException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.