createJarExportRunnable(Shell parent) Creates and returns a JarExportRunnable.
Parameters: parent - the parent for the dialog,or null if no questions should be asked andno checks for unsaved files should be made.
createJarExportRunnable(JarPackageData[] jarPackagesData, Shell parent) Creates and returns a JarExportRunnable for a list of JAR package
data objects.
setRefactoringAware(boolean aware) Determines whether the jar package is refactoring aware.
public void
setRefactoringDescriptors(RefactoringDescriptorProxy[] descriptors) Sets the refactoring descriptors to export.
public void
setRefactoringProjects(IProject[] projects) Sets the projects for which refactoring information should be stored.
public void
setReuseManifest(boolean state) Sets whether a previously generated manifest should be reused.
public 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.
public void
setSaveManifest(boolean state) Sets whether the manifest file must be saved during export
operation or not.
public void
setSealJar(boolean sealJar) Sets whether the JAR itself is sealed.
Creates and returns a JarExportRunnable.
Parameters: parent - the parent for the dialog,or null if no questions should be asked andno checks for unsaved files should be made. a JarExportRunnable
Creates and returns a JarExportRunnable for a list of JAR package
data objects.
Parameters: jarPackagesData - an array with JAR package data objects Parameters: parent - the parent for the dialog,or null if no dialog should be presented the IJarExportRunnable
Creates and returns a JarWriter for this JAR package.
Parameters: parent - the shell used to display question dialogs,or null if "false/no/cancel" is the answerand no dialog should be shown a JarWriter2 See Also:JarWriter2 throws: CoreException - if an unexpected exception happensJarPackageData.createJarWriter3(Shell)
Creates and returns a JarWriter for this JAR package.
Parameters: parent - the shell used to display question dialogs,or null if "false/no/cancel" is the answerand no dialog should be shown a JarWriter3 See Also:JarWriter3 throws: CoreException - if an unexpected exception happens since: 3.2
Answers if compilation units with warnings are exported.
true if CUs with warnings should be exported
findClassfilesFor
public IFile[] findClassfilesFor(IFile javaFile) throws CoreException(Code)
Finds the class files for the given java file
and returns them.
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.
Parameters: javaFile - a .java file an array with class files or null to used the default strategy throws: CoreException - if find failed, e.g. I/O error or resource out of sync See Also:IJarExportRunnable.getStatus
Gets the absolute location of the JAR file.
This path is normally external to the workspace.
the absolute path representing the location of the JAR file since: 3.0
Returns the location of file containing the description of a JAR.
This location is inside the workspace.
the path of the description file location,or null if none is specified
Gets the packages which should be sealed.
The following entry will be added to the manifest file for each package:
Name: <name of the package>
Sealed: true
This should only be used if the JAR itself is not sealed.
Gets the packages which should explicitly be unsealed.
The following entry will be added to the manifest file for each package:
Name: <name of the package>
Sealed: false
This should only be used if the JAR itself is sealed.
an array of IPackageFragment
getRefactoringDescriptors
public RefactoringDescriptorProxy[] getRefactoringDescriptors()(Code)
Answers if a build should be performed before exporting files.
This flag is only considered if auto-build is off.
a boolean telling if a build should be performed
Tells whether a previously generated manifest should be reused.
true if the generated manifest will be reused when regenerating this JAR,false if the manifest has to be regenerated
Tells whether the manifest file must be saved to the
specified file during the export operation.
true if the manifest must be saved See Also:JarPackageData.getManifestLocation()
The export operation decides where and
how the warnings are logged.
true if warnings are logged
setBuildIfNeeded
public void setBuildIfNeeded(boolean buildIfNeeded)(Code)
Sets if a build should be performed before exporting files.
This flag is only considered if auto-build is off.
Parameters: buildIfNeeded - a boolean telling if a build should be performed
Set the elements which will be exported.
These elements are leaf objects e.g. IFile.
and not containers.
Parameters: elements - an array with leaf objects
setExportClassFiles
public void setExportClassFiles(boolean state)(Code)
Sets option to export class files and resources.
Parameters: state - a boolean indicating the new state
setExportErrors
public void setExportErrors(boolean exportErrors)(Code)
Sets if compilation units with errors are exported.
Parameters: exportErrors - true if CUs with errors should be exported
setExportJavaFiles
public void setExportJavaFiles(boolean state)(Code)
Sets the option to export Java source and resources.
Parameters: state - the new state
setExportOutputFolders
public void setExportOutputFolders(boolean state)(Code)
Sets option to export all output folders for the
enclosing projects of the exported elements.
Parameters: state - a boolean indicating the new state since: 3.0
setExportStructuralOnly
public void setExportStructuralOnly(boolean structural)(Code)
Determines whether the jar packager exports only refactorings causing
structural changes.
This information is used for JAR export.
Parameters: structural - true if it exports only refactorings causingstructural changes, false otherwise since: 3.2
setExportWarnings
public void setExportWarnings(boolean exportWarnings)(Code)
Sets if compilation units with warnings are exported.
Parameters: exportWarnings - true if CUs with warnings should be exported
setGenerateManifest
public void setGenerateManifest(boolean state)(Code)
Set whether a manifest must be generated or not.
Parameters: state - the new state
setIncludeDirectoryEntries
public void setIncludeDirectoryEntries(boolean includeDirectoryEntries)(Code)
Sets the option to include directory entries into the jar.
Parameters: includeDirectoryEntries - true to includedirectory entries false otherwise since: 3.1
setJarLocation
public void setJarLocation(IPath jarLocation)(Code)
Sets the JAR file location.
Parameters: jarLocation - a path denoting the location of the JAR file
Sets the packages which should be sealed.
The following entry will be added to the manifest file for each package:
Name: <name of the package>
Sealed: true
This should only be used if the JAR itself is not sealed.
Parameters: packagesToSeal - an array of IPackageFragment to seal
Set the packages which should explicitly be unsealed.
The following entry will be added to the manifest file for each package:
Name: <name of the package>
Sealed: false
This should only be used if the JAR itself is sealed.
Parameters: packagesToUnseal - an array of IPackageFragment
setRefactoringAware
public void setRefactoringAware(boolean aware)(Code)
Determines whether the jar package is refactoring aware.
This information is used both in JAR export and import.
Parameters: aware - true if it is refactoring aware,false otherwise since: 3.2
setRefactoringDescriptors
public void setRefactoringDescriptors(RefactoringDescriptorProxy[] descriptors)(Code)
Sets the refactoring descriptors to export.
This information is used in JAR export.
Parameters: descriptors - the refactoring descriptors since: 3.2
setRefactoringProjects
public void setRefactoringProjects(IProject[] projects)(Code)
Sets the projects for which refactoring information should be stored.
This information is used for JAR export.
Parameters: projects - the projects for which refactoring information should bestored since: 3.2
Sets whether the manifest file must be saved during export
operation or not.
Parameters: state - the new state See Also:JarPackageData.getManifestLocation()