/** * Creates the directory entries for the given path and writes it to the current archive. * * @param destinationPath the path to add * * @throws IOException if an I/O error has occurred */ protected void addDirectories(IPath destinationPath) throws IOException { addDirectories(destinationPath.toString()); }
/** * Creates the directory entries for the given path and writes it to the current archive. * * @param destinationPath the path to add * * @throws IOException if an I/O error has occurred */ protected void addDirectories(IPath destinationPath) throws IOException { addDirectories(destinationPath.toString()); }
Assert.isTrue(fJarPackage.areDirectoryEntriesIncluded()); final IPath metaPath= new Path(JarPackagerUtil.getMetaEntry()); addDirectories(metaPath); addHistory(fJarPackage, new Path(JarPackagerUtil.getRefactoringsEntry()), new NullProgressMonitor());
Assert.isTrue(fJarPackage.areDirectoryEntriesIncluded()); final IPath metaPath= new Path(JarPackagerUtil.getMetaEntry()); addDirectories(metaPath); addHistory(fJarPackage, new Path(JarPackagerUtil.getRefactoringsEntry()), new NullProgressMonitor());
/** * Writes the passed resource to the current archive. * * @param resource * the file to be written * @param destinationPath * the path for the file inside the archive * @throws CoreException * to signal any other unusual termination. This can also be * used to return information in the status object. */ public void write(IFile resource, IPath destinationPath) throws CoreException { try { if (fJarPackage.areDirectoryEntriesIncluded()) addDirectories(resource, destinationPath); addFile(resource, destinationPath); } catch (IOException ex) { // Ensure full path is visible String message= null; if (ex.getLocalizedMessage() != null) message= Messages.format(JarPackagerMessages.JarWriter_writeProblemWithMessage, new Object[] {resource.getFullPath(), ex.getLocalizedMessage()}); else message= Messages.format(JarPackagerMessages.JarWriter_writeProblem, resource.getFullPath()); throw JarPackagerUtil.createCoreException(message, ex); } }
/** * Writes the passed resource to the current archive. * * @param resource * the file to be written * @param destinationPath * the path for the file inside the archive * @throws CoreException * to signal any other unusual termination. This can also be * used to return information in the status object. */ public void write(IFile resource, IPath destinationPath) throws CoreException { try { if (fJarPackage.areDirectoryEntriesIncluded()) addDirectories(resource, destinationPath); addFile(resource, destinationPath); } catch (IOException ex) { // Ensure full path is visible String message= null; if (ex.getLocalizedMessage() != null) message= Messages.format(JarPackagerMessages.JarWriter_writeProblemWithMessage, new Object[] {BasicElementLabels.getPathLabel(resource.getFullPath(), false), ex.getLocalizedMessage()}); else message= Messages.format(JarPackagerMessages.JarWriter_writeProblem, BasicElementLabels.getPathLabel(resource.getFullPath(), false)); throw JarPackagerUtil.createCoreException(message, ex); } }
Assert.isTrue(fJarPackage.areDirectoryEntriesIncluded()); final IPath metaPath= new Path(JarPackagerUtil.getMetaEntry()); addDirectories(metaPath); addHistory(fJarPackage, new Path(JarPackagerUtil.getRefactoringsEntry()), new NullProgressMonitor());
/** * Writes the passed resource to the current archive. * * @param resource * the file to be written * @param destinationPath * the path for the file inside the archive * @throws CoreException * to signal any other unusual termination. This can also be * used to return information in the status object. */ public void write(IFile resource, IPath destinationPath) throws CoreException { try { if (fJarPackage.areDirectoryEntriesIncluded()) addDirectories(resource, destinationPath); addFile(resource, destinationPath); } catch (IOException ex) { // Ensure full path is visible String message= null; if (ex.getLocalizedMessage() != null) message= Messages.format(JarPackagerMessages.JarWriter_writeProblemWithMessage, new Object[] {BasicElementLabels.getPathLabel(resource.getFullPath(), false), ex.getLocalizedMessage()}); else message= Messages.format(JarPackagerMessages.JarWriter_writeProblem, BasicElementLabels.getPathLabel(resource.getFullPath(), false)); throw JarPackagerUtil.createCoreException(message, ex); } }