- All Implemented Interfaces:
- Direct Known Subclasses:
Operation responsible for traversing a specified file system position recursively and building - a tree that represents the container structure - a collection containing all files meeting a specified extension criteria This is implemented as an Operation in order to provide an escape to the user (the Cancel button) if the operation drags on for too long
Method SummaryModifier and TypeMethodDescription
protected FileSystemElementCreates and returns a
FileSystemElementif the specified file system object merits one.
protected StringReturns the extension portion of the passed filename string.Returns the resulting root file system element.
protected booleanReturns a boolean indicating whether the extension of the passed filename is one of the extensions specified as desired by the filter.
voidRuns the operation.
voidSets the file extensions which are desired.
SelectFilesOperationCreates a new
createElementprotected FileSystemElement createElement
(FileSystemElement parent, Object fileSystemObject) throws InterruptedExceptionCreates and returns a
FileSystemElementif the specified file system object merits one. The criteria for this are: - if the file system object is a container then it must have either a child container or an associated file - if the file system object is a file then it must have an extension suitable for selection
getExtensionForReturns the extension portion of the passed filename string.
getResultpublic FileSystemElement getResult()Returns the resulting root file system element.
hasDesiredExtensionprotected boolean hasDesiredExtension
(String filename)Returns a boolean indicating whether the extension of the passed filename is one of the extensions specified as desired by the filter.
runRuns the operation.
- Specified by:
monitor- the progress monitor to use to display progress and receive requests for cancelation
InterruptedException- if the operation detects a request to cancel, using
IProgressMonitor.isCanceled(), it should exit by throwing
- See Also:
setDesiredExtensionspublic void setDesiredExtensions
(String extensions)Sets the file extensions which are desired. A value of
nullindicates that all files should be kept regardless of extension.