Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.gjt.sp.jedit.io
Class FavoritesVFS  view FavoritesVFS download FavoritesVFS.java

java.lang.Object
  extended byorg.gjt.sp.jedit.io.VFS
      extended byorg.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.

Version:
$Id: FavoritesVFS.java,v 1.10 2003/07/28 21:08:04 spestov Exp $

Nested Class Summary
(package private) static class FavoritesVFS.FavoritesEntry
           
 
Nested classes inherited from class org.gjt.sp.jedit.io.VFS
VFS.ColorEntry, VFS.DirectoryEntry, VFS.DirectoryEntryCompare
 
Field Summary
private static java.util.List favorites
           
private static FavoritesVFS instance
           
private static java.lang.Object lock
           
static java.lang.String PROTOCOL
           
 
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, LOW_LATENCY_CAP, MKDIR_CAP, READ_CAP, RENAME_CAP, WRITE_CAP
 
Constructor Summary
FavoritesVFS()
           
 
Method Summary
 boolean _delete(java.lang.Object session, java.lang.String path, java.awt.Component comp)
          Deletes the specified URL.
 VFS.DirectoryEntry _getDirectoryEntry(java.lang.Object session, java.lang.String path, java.awt.Component comp)
          Returns the specified directory entry.
 VFS.DirectoryEntry[] _listDirectory(java.lang.Object session, java.lang.String url, java.awt.Component comp)
          Lists the specified directory.
static void addToFavorites(java.lang.String path, int type)
           
static VFS.DirectoryEntry[] getFavorites()
           
 java.lang.String getParentOfPath(java.lang.String path)
          Returns the parent of the specified path.
static void loadFavorites()
           
static void saveFavorites()
           
 
Methods inherited from class org.gjt.sp.jedit.io.VFS
_backup, _canonPath, _createInputStream, _createOutputStream, _endVFSSession, _listDirectory, _mkdir, _rename, _saveComplete, constructPath, createVFSSession, getCapabilities, getDefaultColorFor, getExtendedAttributes, getFileName, getFileSeparator, getName, getTwoStageSaveName, insert, load, reloadDirectory, save, showBrowseDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL

public static final java.lang.String PROTOCOL
See Also:
Constant Field Values

instance

private static FavoritesVFS instance

lock

private static java.lang.Object lock

favorites

private static java.util.List favorites
Constructor Detail

FavoritesVFS

public FavoritesVFS()
Method Detail

getParentOfPath

public java.lang.String getParentOfPath(java.lang.String path)
Description copied from class: VFS
Returns the parent of the specified path. This must be overridden to return a non-null value for browsing of this filesystem to work.

Overrides:
getParentOfPath in class VFS

_listDirectory

public VFS.DirectoryEntry[] _listDirectory(java.lang.Object session,
                                           java.lang.String url,
                                           java.awt.Component comp)
Description copied from class: VFS
Lists the specified directory.

Overrides:
_listDirectory in class VFS

_getDirectoryEntry

public VFS.DirectoryEntry _getDirectoryEntry(java.lang.Object session,
                                             java.lang.String path,
                                             java.awt.Component comp)
Description copied from class: VFS
Returns the specified directory entry.

Overrides:
_getDirectoryEntry in class VFS

_delete

public boolean _delete(java.lang.Object session,
                       java.lang.String path,
                       java.awt.Component comp)
Description copied from class: VFS
Deletes the specified URL.

Overrides:
_delete in class VFS

loadFavorites

public static void loadFavorites()

addToFavorites

public static void addToFavorites(java.lang.String path,
                                  int type)

saveFavorites

public static void saveFavorites()

getFavorites

public static VFS.DirectoryEntry[] getFavorites()