public class VFSManager
extends java.lang.Object
VFS class for implementation details.
Note that most of the jEdit API is not thread-safe, so special care
must be taken when making jEdit API calls. Also, it is not safe to
call SwingUtilities.invokeAndWait() from a work request;
it can cause a deadlock if the given runnable then later calls
waitForRequests().
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SERVICE
The service type.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
error(java.awt.Component comp,
java.lang.String path,
java.lang.String messageProp,
java.lang.Object[] args)
Reports an I/O error with default urgency,
Log.ERROR |
static void |
error(java.awt.Component comp,
java.lang.String path,
java.lang.String messageProp,
java.lang.Object[] args,
int urgency)
Reports an I/O error.
|
static void |
error(java.io.IOException e,
java.lang.String path,
java.awt.Component comp)
Handle an I/O error.
|
static boolean |
errorOccurred()
Returns if the last request caused an error.
|
static VFS |
getFileVFS()
Returns the local filesystem VFS.
|
static int |
getRequestCount()
Returns the number of pending I/O requests.
|
static VFS |
getUrlVFS()
Returns the URL VFS.
|
static VFS |
getVFSForPath(java.lang.String path)
Returns the VFS for the specified path.
|
static VFS |
getVFSForProtocol(java.lang.String protocol)
Returns the VFS for the specified protocol.
|
static java.lang.String[] |
getVFSs()
Returns a list of all registered filesystems.
|
static void |
init()
Do not call.
|
static void |
runInAWTThread(java.lang.Runnable run)
Deprecated.
Using that method, when you run a task in AWT Thread,
it will wait for all background task causing some unwanted delays.
If you need calling a task after a background work, please add your
runnable to the EDT thread yourself at the end of the background task
|
static void |
runInWorkThread(Task run)
Deprecated.
You should not use this method, this threadpool
links the AWT Threads and Work threads.
|
static void |
sendVFSUpdate(VFS vfs,
java.lang.String path,
boolean parent)
Sends a VFS update message.
|
static void |
start()
Do not call.
|
static void |
waitForRequests()
Returns when all pending requests are complete.
|
public static final java.lang.String SERVICE
ServiceManager.public static void init()
public static void start()
public static VFS getFileVFS()
public static VFS getUrlVFS()
public static VFS getVFSForProtocol(java.lang.String protocol)
protocol - The protocolpublic static VFS getVFSForPath(java.lang.String path)
path - The pathpublic static java.lang.String[] getVFSs()
public static void waitForRequests()
public static boolean errorOccurred()
public static int getRequestCount()
@Deprecated public static void runInAWTThread(java.lang.Runnable run)
Runnable is executed directly: when the current thread
is EDT and there are no I/O requests active or queued
at the moment of call.ThreadUtilities.runInDispatchThread(Runnable),
ThreadUtilities.runInDispatchThreadAndWait(Runnable)@Deprecated public static void runInWorkThread(Task run)
ThreadUtilities.runInBackground(org.gjt.sp.util.Task),
ThreadUtilities.runInBackground(Runnable)public static void error(java.io.IOException e,
java.lang.String path,
java.awt.Component comp)
public static void error(java.awt.Component comp,
java.lang.String path,
java.lang.String messageProp,
java.lang.Object[] args)
Log.ERRORcomp - The componentpath - The path name that caused the errormessageProp - The error message property nameargs - Positional parameterspublic static void error(java.awt.Component comp,
java.lang.String path,
java.lang.String messageProp,
java.lang.Object[] args,
int urgency)
comp - The componentpath - The path name that caused the errormessageProp - The error message property nameargs - Positional parametersurgency - Logging urgency (level)public static void sendVFSUpdate(VFS vfs, java.lang.String path, boolean parent)
vfs - The VFSpath - The path that changedparent - True if an update should be sent for the path's
parent too