JarWriter3
instead which leverages new EFS
support@Deprecated public class JarWriter2 extends Object
Clients may subclass.
JarPackageData
Constructor and Description |
---|
JarWriter2(JarPackageData jarPackage,
Shell parent)
Deprecated.
Creates an instance which is used to create a JAR based
on the given JarPackage.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addDirectories(IPath destinationPath,
File correspondingFile)
Deprecated.
Creates the directory entries for the given path and writes it to the
current archive.
|
protected void |
addFile(IFile resource,
IPath path,
File correspondingFile)
Deprecated.
Creates a new JarEntry with the passed path and contents, and writes it
to the current archive.
|
protected boolean |
canCreateJar(Shell parent)
Deprecated.
Checks if the JAR file can be overwritten.
|
void |
close()
Deprecated.
Closes the archive and does all required cleanup.
|
void |
write(IFile resource,
IPath destinationPath)
Deprecated.
Writes the passed resource to the current archive.
|
public JarWriter2(JarPackageData jarPackage, Shell parent) throws CoreException
jarPackage
- the JAR specificationparent
- the shell used to display question dialogs,
or null
if "false/no/cancel" is the answer
and no dialog should be shownCoreException
- to signal any other unusual termination.
This can also be used to return information
in the status object.public void close() throws CoreException
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
resource
- the file to be writtendestinationPath
- the path for the file inside the archiveCoreException
- to signal any other unusual termination.
This can also be used to return information
in the status object.protected void addFile(IFile resource, IPath path, File correspondingFile) throws IOException, CoreException
resource
- the file to writepath
- the path inside the archivecorrespondingFile
- the corresponding file in the file system
or null
if it doesn't existIOException
- if an I/O error has occurredCoreException
- if the resource can-t be accessedprotected void addDirectories(IPath destinationPath, File correspondingFile) throws IOException
destinationPath
- the path to addcorrespondingFile
- the corresponding file in the file system
or null
if it doesn't existIOException
- if an I/O error has occurredprotected boolean canCreateJar(Shell parent)
parent
- the parent for the dialog,
or null
if no dialog should be presentedtrue
if it is OK to create the JAR
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.