|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.dialogs.FileSystemElement
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 | |
FileSystemElement(String name,
FileSystemElement parent,
boolean isDirectory)
Creates a new FileSystemElement and initializes it
and its parent if applicable. |
Method Summary | |
void |
addChild(FileSystemElement child)
Adds the passed child to this object's collection of children. |
Object |
getAdapter(Class adapter)
Returns the adapter |
String |
getFileNameExtension()
Returns the extension of this element's filename. |
org.eclipse.ui.internal.model.AdaptableList |
getFiles()
Answer the files property of this element. |
Object |
getFileSystemObject()
Returns the file system object property of this element |
org.eclipse.ui.internal.model.AdaptableList |
getFolders()
Returns a list of the folders that are immediate children of this folder. |
FileSystemElement |
getParent()
Return the parent of this element. |
boolean |
isDirectory()
Returns true if this element represents a directory, and false otherwise. |
void |
removeFolder(FileSystemElement child)
Removes a sub-folder from this file system element. |
void |
setFileSystemObject(Object value)
Set the file system object property of this element |
void |
setParent(FileSystemElement element)
Sets the parent of this file system element. |
String |
toString()
For debugging purposes only. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FileSystemElement(String name, FileSystemElement parent, boolean isDirectory)
FileSystemElement
and initializes it
and its parent if applicable.
name
- java.lang.StringMethod Detail |
public void addChild(FileSystemElement child)
child
- FileSystemElementpublic Object getAdapter(Class adapter)
getAdapter
in interface IAdaptable
adapter
- the adapter class to look up
null
if this object does not
have an adapter for the given classpublic String getFileNameExtension()
public org.eclipse.ui.internal.model.AdaptableList getFiles()
public Object getFileSystemObject()
public org.eclipse.ui.internal.model.AdaptableList getFolders()
public FileSystemElement getParent()
null
if this is the rootpublic boolean isDirectory()
public void removeFolder(FileSystemElement child)
public void setFileSystemObject(Object value)
value
- the file system objectpublic void setParent(FileSystemElement element)
public String toString()
toString
in class Object
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |