Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.wizards.datatransfer
Class SelectFilesOperation

java.lang.Object
  extended by 
org.eclipse.ui.wizards.datatransfer.SelectFilesOperation
All Implemented Interfaces:
IRunnableWithProgress
Direct Known Subclasses:
PopulateRootOperation

public class SelectFilesOperation
extends Object
implements IRunnableWithProgress

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


Constructor Summary
SelectFilesOperation ( Object rootObject, IImportStructureProvider structureProvider)
          Creates a new SelectFilesOperation.
 
Method Summary
protected   FileSystemElement createElement ( FileSystemElement parent, Object fileSystemObject)
          Creates and returns a FileSystemElement if the specified file system object merits one.
protected   String getExtensionFor ( String filename)
          Returns the extension portion of the passed filename string.
  FileSystemElement getResult ()
          Returns the resulting root file system element.
protected  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.
 void run ( IProgressMonitor monitor)
          Runs the operation.
 void setDesiredExtensions ( String[] extensions)
          Sets the file extensions which are desired.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectFilesOperation

public SelectFilesOperation(
Object rootObject,
                            
IImportStructureProvider structureProvider)
Creates a new SelectFilesOperation.

Method Detail

createElement

protected 
FileSystemElement createElement(
FileSystemElement parent,
                                          
Object fileSystemObject)
                                   throws 
InterruptedException
Creates and returns a FileSystemElement if 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

Throws:
InterruptedException

getExtensionFor

protected 
String getExtensionFor(
String filename)
Returns the extension portion of the passed filename string.


getResult

public 
FileSystemElement getResult()
Returns the resulting root file system element.


hasDesiredExtension

protected 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.


run

public void run(
IProgressMonitor monitor)
         throws 
InterruptedException
Runs the operation.

Specified by:
run in interface IRunnableWithProgress
Parameters:
monitor - the progress monitor to use to display progress and receive requests for cancelation
Throws:
InterruptedException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing InterruptedException
See Also:
IRunnableContext.run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)

setDesiredExtensions

public void setDesiredExtensions(
String[] extensions)
Sets the file extensions which are desired. A value of null indicates that all files should be kept regardless of extension.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire