| java.lang.Object org.eclipse.ui.dialogs.FileSystemElement
FileSystemElement | public class FileSystemElement implements IAdaptable(Code) | | Instances of this class represent files or file-like entities (eg.- zip file
entries) on the local file system. They do not represent resources within the
workbench. This distinction is made because the representation of a file
system resource is significantly different from that of a workbench resource.
If self represents a collection (eg.- file system directory, zip directory)
then its icon will be the folderIcon static field. Otherwise (ie.- self
represents a file system file) self's icon is stored in field "icon", and is
determined by the extension of the file that self represents.
This class is adaptable, and implements one adapter itself, namely the
IWorkbenchAdapter adapter used for navigation and display in the workbench.
|
Constructor Summary | |
public | FileSystemElement(String name, FileSystemElement parent, boolean isDirectory) Creates a new FileSystemElement and initializes it and its
parent if applicable.
Parameters: name - The name of the element Parameters: parent - The parent element. |
FileSystemElement | public FileSystemElement(String name, FileSystemElement parent, boolean isDirectory)(Code) | | Creates a new FileSystemElement and initializes it and its
parent if applicable.
Parameters: name - The name of the element Parameters: parent - The parent element. May be null Parameters: isDirectory - if true this is representing a directory,otherwise it is a file. |
addChild | public void addChild(FileSystemElement child)(Code) | | Adds the passed child to this object's collection of children.
Parameters: child - FileSystemElement |
getFileNameExtension | public String getFileNameExtension()(Code) | | Returns the extension of this element's filename.
The extension or an empty string if there is no extension. |
getFileSystemObject | public Object getFileSystemObject()(Code) | | Returns the file system object property of this element
the file system object |
getFiles | public AdaptableList getFiles()(Code) | | Answer the files property of this element. Answer an empty list if the
files property is null. This method should not be used to add children to
the receiver. Use addChild(FileSystemElement) instead.
AdaptableList The list of files parented by the receiver. |
getFolders | public AdaptableList getFolders()(Code) | | Returns a list of the folders that are immediate children of this folder.
Answer an empty list if the folders property is null. This method should
not be used to add children to the receiver. Use
addChild(FileSystemElement) instead.
AdapatableList The list of folders parented by the receiver. |
getParent | public FileSystemElement getParent()(Code) | | Return the parent of this element.
the parent file system element, or null if this isthe root |
isDirectory | public boolean isDirectory()(Code) | | boolean true if this element represents adirectory, and false otherwise. |
removeFolder | public void removeFolder(FileSystemElement child)(Code) | | Removes a sub-folder from this file system element.
Parameters: child - The child to remove. |
setFileSystemObject | public void setFileSystemObject(Object value)(Code) | | Set the file system object property of this element
Parameters: value - the file system object |
setParent | public void setParent(FileSystemElement element)(Code) | | Sets the parent of this file system element.
Parameters: element - The new parent. |
toString | public String toString()(Code) | | For debugging purposes only.
|
|
|