Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  *
  * @throws IOException
  */
 public void writeStub(IStub stub, IProgressMonitor progressMonitor) throws CoreException {
   try {
     fileExporter.writeStub(stub);
   } catch (IOException ex) {
     throw PharUIUtil.createCoreException(ex.getLocalizedMessage(), ex);
   }
 }
Exemplo n.º 2
0
 /** {@inheritDoc} */
 public void writeFile(IFile resource, IPath destinationPath) throws CoreException {
   try {
     fileExporter.write(resource, destinationPath.toString());
   } catch (IOException ex) {
     throw PharUIUtil.createCoreException(ex.getLocalizedMessage(), ex);
   }
 }
Exemplo n.º 3
0
  /** {@inheritDoc} */
  public void close() throws CoreException {
    if (fileExporter != null) {
      try {

        fileExporter.finished();
        registerInWorkspaceIfNeeded();
      } catch (IOException ex) {
        throw PharUIUtil.createCoreException(ex.getLocalizedMessage(), ex);
      }
    }
  }
Exemplo n.º 4
0
  public void writeSignature(IProgressMonitor monitor) throws CoreException {
    if (fileExporter != null) {
      try {

        // if (fJarPackage.isUseSignature()) {
        fileExporter.writeSignature();
        // }
      } catch (IOException ex) {
        throw PharUIUtil.createCoreException(ex.getLocalizedMessage(), ex);
      }
    }
  }
Exemplo n.º 5
0
  /** {@inheritDoc} */
  public void open(PharPackage jarPackage, Shell displayShell, MultiStatus statusMsg)
      throws CoreException {
    super.open(jarPackage, displayShell, statusMsg);
    fJarPackage = jarPackage;
    Assert.isTrue(
        fJarPackage.isValid(), "The PHAR package specification is invalid"); // $NON-NLS-1$
    if (!canCreateJar(displayShell)) throw new OperationCanceledException();

    try {
      fileExporter = PharExportHelper.createFileExporter(fJarPackage);
    } catch (IOException ex) {
      throw PharUIUtil.createCoreException(ex.getLocalizedMessage(), ex);
    }
    // fJarWriter= new PharWriter3(fJarPackage, displayShell);
  }