Package org.gjt.sp.jedit.io
Class FavoritesVFS
- java.lang.Object
-
- org.gjt.sp.jedit.io.VFS
-
- org.gjt.sp.jedit.io.FavoritesVFS
-
public class FavoritesVFS extends VFS
A VFS used for remembering frequently-visited directories. Listing it returns the favorites list. The deletePath of each entry is the directory prefixed with "favorites:" so that right-clicking on a favorite and clicking 'delete' in the browser just deletes the favorite, and not the directory itself.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFavoritesVFS.Favorite-
Nested classes/interfaces inherited from class org.gjt.sp.jedit.io.VFS
VFS.DirectoryEntryCompare
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROTOCOL-
Fields inherited from class org.gjt.sp.jedit.io.VFS
BROWSE_CAP, CASE_INSENSITIVE_CAP, DELETE_CAP, EA_MODIFIED, EA_SIZE, EA_STATUS, EA_TYPE, IOBUFSIZE, LOW_LATENCY_CAP, MKDIR_CAP, NON_AWT_SESSION_CAP, READ_CAP, RENAME_CAP, WRITE_CAP
-
-
Constructor Summary
Constructors Constructor Description FavoritesVFS()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean_delete(java.lang.Object session, java.lang.String path, java.awt.Component comp)Deletes the specified URL.VFSFile_getFile(java.lang.Object session, java.lang.String path, java.awt.Component comp)Returns the specified directory entry.VFSFile[]_listFiles(java.lang.Object session, java.lang.String url, java.awt.Component comp)Lists the specified directory.boolean_rename(java.lang.Object session, java.lang.String from, java.lang.String to, java.awt.Component comp)Rename a favoritestatic voidaddToFavorites(java.lang.String path, int type)static VFSFile[]getFavorites()java.lang.StringgetParentOfPath(java.lang.String path)Returns the parent of the specified path.static voidloadFavorites()static voidsaveFavorites()-
Methods inherited from class org.gjt.sp.jedit.io.VFS
_backup, _canonPath, _createInputStream, _createOutputStream, _endVFSSession, _finishTwoStageSave, _listDirectory, _listDirectory, _listDirectory, _mkdir, _saveComplete, constructPath, copy, copy, copy, copy, createVFSSession, createVFSSessionSafe, getCapabilities, getDefaultColorFor, getExtendedAttributes, getFileName, getFilePath, getFileSeparator, getName, getTwoStageSaveName, insert, isMarkersFileSupported, load, reloadDirectory, save
-
-
-
-
Field Detail
-
PROTOCOL
public static final java.lang.String PROTOCOL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getParentOfPath
@Nonnull public java.lang.String getParentOfPath(java.lang.String path)
Description copied from class:VFSReturns the parent of the specified path. This must be overridden to return a non-null value for browsing of this filesystem to work.- Overrides:
getParentOfPathin classVFS- Parameters:
path- The path
-
_listFiles
public VFSFile[] _listFiles(java.lang.Object session, java.lang.String url, java.awt.Component comp)
Description copied from class:VFSLists the specified directory.- Overrides:
_listFilesin classVFS- Parameters:
session- The sessionurl- The directory. Note that this must be a full URL, including the host name, path name, and so on. The username and password (if needed by the VFS) is obtained from the session instance.comp- The component that will parent error dialog boxes
-
_getFile
public VFSFile _getFile(java.lang.Object session, java.lang.String path, java.awt.Component comp)
Description copied from class:VFSReturns the specified directory entry.- Overrides:
_getFilein classVFS- Parameters:
session- The session get it withVFS.createVFSSession(String, Component)path- The pathcomp- The component that will parent error dialog boxes- Returns:
- The specified directory entry, or null if it doesn't exist.
-
_delete
public boolean _delete(java.lang.Object session, java.lang.String path, java.awt.Component comp)Description copied from class:VFSDeletes the specified URL.
-
_rename
public boolean _rename(java.lang.Object session, java.lang.String from, java.lang.String to, java.awt.Component comp)Rename a favorite
-
loadFavorites
public static void loadFavorites()
-
addToFavorites
public static void addToFavorites(java.lang.String path, int type)
-
saveFavorites
public static void saveFavorites()
-
getFavorites
public static VFSFile[] getFavorites()
-
-