public class AbstractFolder extends AbstractFile implements IAbstractFolder
IAbstractFolder
,
Serialized FormpathSeparator, pathSeparatorChar, separator, separatorChar
Modifier and Type | Method and Description |
---|---|
IAbstractFile |
add(IAbstractFile file)
Adds the given file to the folder.
|
void |
addAbstractFolderListener(IAbstractFolderListener listener)
Adds the given abstract folder listener to the abstract folder.
|
void |
addEditor(IEditor editor) |
protected void |
fireFileAddEvent(IAbstractFile file)
Notifies all listeners that the given file was added to the folder.
|
protected void |
fireFileRemoveEvent(IAbstractFile file)
Notifies all listeners that the given file was removed from the folder.
|
Iterator |
getChildIterator()
Returns an iterator that is capable to iterate over all childrens of the
folder.
|
IAbstractFile[] |
getChilds()
Returns an array containing all childs of the folder.
|
IAbstractFile[] |
getChilds(Class filter)
Returns an array containing all childrens that are instance of the given
filter class.
|
IEditor |
getCurrentEditor() |
IEditor[] |
getEditors() |
int |
getSize()
Returns the size of the folder.
|
boolean |
isLocked()
Returns the current lock state of the file.
|
void |
releaseLock(IEditor editor) |
void |
remove(IAbstractFile file)
Removes the given file from the folder.
|
void |
removeAbstractFolderListener(IAbstractFolderListener listener)
Removes the given abstract folder listener from the abstract folder.
|
void |
removeEditor(IEditor editor) |
void |
requestLock(IEditor editor) |
void |
setName(String name,
IWorkbench workbench)
Sets the name of the file.
|
IAbstractFile[] |
update(boolean recursive)
Reqeusts an update in the folder.
|
addAbstractFileListener, equals, fireFileLockedEvent, fireFileReleasedEvent, getFile, getFileLocker, getFullPath, getLastModified, getParentFolder, getPathFile, getProject, getTitle, hashCode, releaseLock, removeAbstractFileListener, requestLock
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAbstractFileListener, getFile, getFileLocker, getFullPath, getLastModified, getName, getParentFolder, getPathFile, getProject, getTitle, releaseLock, removeAbstractFileListener, requestLock
protected void fireFileAddEvent(IAbstractFile file)
file
- the file that was addedprotected void fireFileRemoveEvent(IAbstractFile file)
file
- the file that was removedpublic IAbstractFile add(IAbstractFile file) throws ChildNotAcceptedException
IAbstractFolder
add
in interface IAbstractFolder
file
- the file that should be added to the folderChildNotAcceptedException
- -
if the folder does not accept the filepublic Iterator getChildIterator()
IAbstractFolder
getChildIterator
in interface IAbstractFolder
public IAbstractFile[] getChilds()
IAbstractFolder
getChilds
in interface IAbstractFolder
public IAbstractFile[] getChilds(Class filter)
IAbstractFolder
getChilds
in interface IAbstractFolder
filter
- a class that serves as filter for selecting childrenspublic int getSize()
IAbstractFolder
getSize
in interface IAbstractFolder
public void remove(IAbstractFile file)
IAbstractFolder
remove
in interface IAbstractFolder
file
- the file to remove from the folderpublic IAbstractFile[] update(boolean recursive)
IAbstractFolder
update
in interface IAbstractFolder
recursive
- a boolean parameter to set the update mode for the method. If
this parameter is set to true, subfolders are updated too.
Otherwise subfolders are ignored.public void addAbstractFolderListener(IAbstractFolderListener listener)
IAbstractFolder
addAbstractFolderListener
in interface IAbstractFolder
listener
- the listener that should be added to the abstract folderpublic void removeAbstractFolderListener(IAbstractFolderListener listener)
IAbstractFolder
removeAbstractFolderListener
in interface IAbstractFolder
listener
- the listener that should be removedpublic void setName(String name, IWorkbench workbench) throws FileRenameException
IAbstractFile
setName
in interface IAbstractFile
setName
in class AbstractFile
name
- the new name for the fileFileRenameException
- - if the file cannot be renamedpublic void addEditor(IEditor editor)
public IEditor getCurrentEditor()
public IEditor[] getEditors()
public boolean isLocked()
IAbstractFile
isLocked
in interface IAbstractFile
isLocked
in class AbstractFile
public void releaseLock(IEditor editor)
public void removeEditor(IEditor editor)
public void requestLock(IEditor editor) throws FileAlreadyLockedException
FileAlreadyLockedException