|
Eclipse JDT Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jdt.ui.jarpackager.JarPackageData
Model for a JAR package. Describes a JAR package including a bunch of useful options to generate a JAR file with a JAR writer. Clients may subclass.
Constructor Summary | |
JarPackageData()
|
Method Summary | |
boolean | allowOverwrite()
Tells whether files can be overwritten without warning. |
boolean | areClassFilesExported()
Tells whether class files and resources are exported. |
boolean | areErrorsExported()
Answers if compilation units with errors are exported. |
boolean | areGeneratedFilesExported()
Tells whether files created by the Java builder are exported. |
boolean | areJavaFilesExported()
Tells whether java files and resources are exported. |
boolean | areOutputFoldersExported()
Tells whether all output folders for the enclosing projects of the exported elements. |
IJarDescriptionReader | createJarDescriptionReader(InputStream inputStream)
Creates and returns a JAR package data description reader for this JAR package data object. |
IJarDescriptionWriter | createJarDescriptionWriter(OutputStream outputStream)
Creates and returns a JAR package data description writer for this JAR package data object. |
IJarExportRunnable | createJarExportRunnable(JarPackageData[] jarPackagesData,
Shell parent)
Creates and returns a JarExportRunnable for a list of JAR package data objects. |
IJarExportRunnable | createJarExportRunnable(Shell parent)
Creates and returns a JarExportRunnable. |
JarWriter | createJarWriter(Shell parent)
Creates and returns a JarWriter for this JAR package. |
boolean | exportWarnings()
Answers if compilation units with warnings are exported. |
IFile[] | findClassfilesFor(IFile javaFile)
Finds the class files for the given java file and returns them. |
IPath | getAbsoluteJarLocation()
Gets the absolute location of the JAR file. |
String | getComment()
Returns the JAR's comment. |
IFile | getDescriptionFile()
Gets the description file (as workspace resource). |
IPath | getDescriptionLocation()
Returns the location of file containing the description of a JAR. |
Object[] | getElements()
Returns the elements which will be exported. |
IPath | getJarLocation()
Gets the location of the JAR file. |
IFile | getManifestFile()
Gets the manifest file (as workspace resource). |
IPath | getManifestLocation()
Returns the location of a user-defined manifest file. |
IType | getManifestMainClass()
Gets the manifest's main class. |
IManifestProvider | getManifestProvider()
Gets the manifest provider for this JAR package. |
String | getManifestVersion()
Gets the manifest version. |
IPackageFragment[] | getPackagesToSeal()
Gets the packages which should be sealed. |
IPackageFragment[] | getPackagesToUnseal()
Gets the packages which should explicitly be unsealed. |
boolean | isBuildingIfNeeded()
Answers if a build should be performed before exporting files. |
boolean | isCompressed()
Tells whether the JAR is compressed or not. |
boolean | isDescriptionSaved()
Tells whether a description of this JAR package must be saved to a file by a JAR description writer during the export operation. |
boolean | isJarSealed()
Answers whether the JAR itself is sealed. |
boolean | isMainClassValid(IRunnableContext context)
Tells whether the specified manifest main class is valid. |
boolean | isManifestAccessible()
Tells whether a manifest is available. |
boolean | isManifestGenerated()
Tells whether the manifest file must be generated. |
boolean | isManifestReused()
Tells whether a previously generated manifest should be reused. |
boolean | isManifestSaved()
Tells whether the manifest file must be saved to the specified file during the export operation. |
boolean | isValid()
Tells whether this JAR package data can be used to generate a valid JAR. |
boolean | logErrors()
Deprecated. will be removed in final 2.0 |
boolean | logWarnings()
Deprecated. will be removed in final 2.0 |
void | setBuildIfNeeded(boolean buildIfNeeded)
Sets if a build should be performed before exporting files. |
void | setComment(String comment)
Sets the JAR's comment. |
void | setCompress(boolean state)
Set whether the JAR is compressed or not. |
void | setDescriptionLocation(IPath descriptionLocation)
Set the location of the JAR description file. |
void | setElements(Object[] elements)
Set the elements which will be exported. |
void | setExportClassFiles(boolean state)
Sets option to export class files and resources. |
void | setExportErrors(boolean exportErrors)
Sets if compilation units with errors are exported. |
void | setExportJavaFiles(boolean state)
Sets the option to export Java source and resources. |
void | setExportOutputFolders(boolean state)
Sets option to export all output folders for the enclosing projects of the exported elements. |
void | setExportWarnings(boolean exportWarnings)
Sets if compilation units with warnings are exported. |
void | setGenerateManifest(boolean state)
Set whether a manifest must be generated or not. |
void | setJarLocation(IPath jarLocation)
Sets the JAR file location. |
void | setLogErrors(boolean logErrors)
Deprecated. will be removed in final 2.0 |
void | setLogWarnings(boolean logWarnings)
Deprecated. will be removed in final 2.0 |
void | setManifestLocation(IPath manifestLocation)
Sets the location of a user-defined manifest file. |
void | setManifestMainClass(IType manifestMainClass)
Set the manifest's main class. |
void | setManifestProvider(IManifestProvider manifestProvider)
Sets the manifest provider. |
void | setManifestVersion(String manifestVersion)
Sets the manifest version. |
void | setOverwrite(boolean state)
Sets whether files can be overwritten without warning. |
void | setPackagesToSeal(IPackageFragment[] packagesToSeal)
Sets the packages which should be sealed. |
void | setPackagesToUnseal(IPackageFragment[] packagesToUnseal)
Set the packages which should explicitly be unsealed. |
void | setReuseManifest(boolean state)
Sets whether a previously generated manifest should be reused. |
void | setSaveDescription(boolean state)
Set whether a description of this JAR package must be saved to a file by a JAR description writer during the export operation. |
void | setSaveManifest(boolean state)
Sets whether the manifest file must be saved during export operation or not. |
void | setSealJar(boolean sealJar)
Sets whether the JAR itself is sealed. |
void | setUsesManifest(boolean state)
Sets whether a manifest must be included in the JAR. |
void | setUseSourceFolderHierarchy(boolean state)
Set the option to export the source folder hierarchy. |
boolean | usesManifest()
Answers whether a manifest must be included in the JAR. |
boolean | useSourceFolderHierarchy()
Tells whether the source folder hierarchy is used. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JarPackageData()
Method Detail |
public boolean isCompressed()
public void setCompress(boolean state)
public boolean allowOverwrite()
public void setOverwrite(boolean state)
public boolean areClassFilesExported()
public void setExportClassFiles(boolean state)
public boolean areOutputFoldersExported()
public void setExportOutputFolders(boolean state)
public boolean areGeneratedFilesExported()
public boolean areJavaFilesExported()
public void setExportJavaFiles(boolean state)
public boolean useSourceFolderHierarchy()
Using the source folder hierarchy only makes sense if java files are but class files aren't exported.
public void setUseSourceFolderHierarchy(boolean state)
public IPath getAbsoluteJarLocation()
public IPath getJarLocation()
public void setJarLocation(IPath jarLocation)
public boolean isManifestGenerated()
public void setGenerateManifest(boolean state)
public boolean isManifestSaved()
public void setSaveManifest(boolean state)
public boolean isManifestReused()
public void setReuseManifest(boolean state)
public IPath getManifestLocation()
public void setManifestLocation(IPath manifestLocation)
public IFile getManifestFile()
public String getManifestVersion()
public void setManifestVersion(String manifestVersion)
public boolean usesManifest()
public void setUsesManifest(boolean state)
public IManifestProvider getManifestProvider()
public void setManifestProvider(IManifestProvider manifestProvider)
public boolean isJarSealed()
This option should only be considered when the manifest file is generated.
public void setSealJar(boolean sealJar)
This option should only be considered when the manifest file is generated.
public void setPackagesToSeal(IPackageFragment[] packagesToSeal)
This should only be used if the JAR itself is not sealed.
public IPackageFragment[] getPackagesToSeal()
This should only be used if the JAR itself is not sealed.
public IPackageFragment[] getPackagesToUnseal()
This should only be used if the JAR itself is sealed.
public void setPackagesToUnseal(IPackageFragment[] packagesToUnseal)
This should only be used if the JAR itself is sealed.
public boolean isDescriptionSaved()
The JAR writer defines the format of the file.
public void setSaveDescription(boolean state)
The format is defined by the client who implements the reader/writer pair.
public IPath getDescriptionLocation()
public void setDescriptionLocation(IPath descriptionLocation)
public IFile getDescriptionFile()
public IType getManifestMainClass()
public void setManifestMainClass(IType manifestMainClass)
public Object[] getElements()
public void setElements(Object[] elements)
public String getComment()
public void setComment(String comment)
public boolean logErrors()
The export operation decides where and how the errors are logged.
public void setLogErrors(boolean logErrors)
The export operation decides where and how the errors are logged.
public boolean logWarnings()
The export operation decides where and how the warnings are logged.
public void setLogWarnings(boolean logWarnings)
The export operation decides where and how the warnings are logged.
public boolean areErrorsExported()
public void setExportErrors(boolean exportErrors)
public boolean exportWarnings()
public void setExportWarnings(boolean exportWarnings)
public boolean isBuildingIfNeeded()
public void setBuildIfNeeded(boolean buildIfNeeded)
public IFile[] findClassfilesFor(IFile javaFile) throws CoreException
This is a hook for subclasses which want to implement a different strategy for finding the class files. The default strategy is to query the class files for the source file name attribute. If this attribute is missing then all class files in the corresponding output folder are exported.
A CoreException can be thrown if an error occurs during this operation. The CoreException will not stop the export process but adds the status object to the status of the export runnable.
public JarWriter createJarWriter(Shell parent) throws CoreException
public IJarExportRunnable createJarExportRunnable(Shell parent)
public IJarExportRunnable createJarExportRunnable(JarPackageData[] jarPackagesData, Shell parent)
public IJarDescriptionWriter createJarDescriptionWriter(OutputStream outputStream)
It is the client's responsibility to close this writer.
public IJarDescriptionReader createJarDescriptionReader(InputStream inputStream)
It is the client's responsibility to close this reader.
public boolean isValid()
public boolean isManifestAccessible()
public boolean isMainClassValid(IRunnableContext context)
|
Eclipse JDT Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |