| java.lang.Object org.gjt.sp.jedit.PluginJAR
Inner Class :public static class PluginCacheEntry | |
Constructor Summary | |
public | PluginJAR(File file) Creates a PluginJAR object which is not necessarily loaded, but can be later. |
Method Summary | |
public void | activatePlugin() Loads the plugin core class. | public void | activatePluginIfNecessary() Should be called after a new plugin is installed. | public boolean | checkDependencies() Returns true if all dependencies are satisified, false otherwise. | boolean | containsClass(String className) | public void | deactivatePlugin(boolean exit) Unloads the plugin core class. | public static String | findPlugin(String className) Unlike getPlugin(), will return a PluginJAR that is not yet loaded,
given its classname. | public PluginCacheEntry | generateCache() | public ActionSet | getActionSet() Returns the plugin's action set for the jEdit action context
jEdit.getActionContext . | public ActionSet | getActions() | public ActionSet | getBrowserActionSet() Returns the plugin's action set for the file system browser action
context
org.gjt.sp.jedit.browser.VFSBrowser.getActionContext . | public String | getCachePath() Returns the full path name of this plugin's summary file.
The summary file is used to store certain information which allows
loading of the plugin's resources and core class to be deferred
until the plugin is first used. | public JARClassLoader | getClassLoader() Returns the plugin's class loader. | String[] | getClasses() | public static Set<String> | getDependencySet(String className) | public String[] | getDependentPlugins() | public URL | getDockablesURI() Returns the location of the plugin's
dockables.xml file. | public File | getFile() Returns a file pointing to the plugin JAR. | public String | getPath() Returns the full path name of this plugin's JAR file. | public EditPlugin | getPlugin() Returns the plugin core class for this JAR file. | public static PluginCacheEntry | getPluginCache(PluginJAR plugin) | public Set<String> | getRequiredJars() Returns the required jars of this plugin. | public URL | getServicesURI() Returns the location of the plugin's
services.xml file. | public synchronized ZipFile | getZipFile() Returns the plugin's JAR file, opening it if necessary. | void | init() | public static PluginJAR | load(String path, boolean loadDependents) Loads a plugin, and its dependent plugins if necessary. | static void | setPluginCache(PluginJAR plugin, PluginCacheEntry cache) | public String | toString() | public static void | transitiveClosure(String[] dependents, List<String> listModel) If plugin A is needed by B, and B is needed by C, we want to
tell the user that A is needed by B and C when they try to
unload A. | void | uninit(boolean exit) |
activatePlugin | public void activatePlugin()(Code) | | Loads the plugin core class. Does nothing if the plugin core class
has already been loaded. This method might be called on startup,
depending on what properties are set. See
EditPlugin.start .
This method is thread-safe.
since: jEdit 4.2pre1 |
activatePluginIfNecessary | public void activatePluginIfNecessary()(Code) | | Should be called after a new plugin is installed.
since: jEdit 4.2pre2 |
checkDependencies | public boolean checkDependencies()(Code) | | Returns true if all dependencies are satisified, false otherwise.
Also if dependencies are not satisfied, the plugin is marked as
"broken".
|
containsClass | boolean containsClass(String className)(Code) | | Parameters: className - a class name true if this jar contains a class with that classname. since: jedit 4.3pre7 |
deactivatePlugin | public void deactivatePlugin(boolean exit)(Code) | | Unloads the plugin core class. Does nothing if the plugin core class
has not been loaded.
This method can only be called from the AWT event dispatch thread!
See Also: EditPlugin.stop since: jEdit 4.2pre3 |
findPlugin | public static String findPlugin(String className)(Code) | | Unlike getPlugin(), will return a PluginJAR that is not yet loaded,
given its classname.
Parameters: className - a class name the JARpath of the first PluginJAR it can find which contains this className,or null if not found. since: 4.3pre7 |
getCachePath | public String getCachePath()(Code) | | Returns the full path name of this plugin's summary file.
The summary file is used to store certain information which allows
loading of the plugin's resources and core class to be deferred
until the plugin is first used. As long as a plugin is using the
jEdit 4.2 plugin API, no extra effort is required to take advantage
of the summary cache.
|
getDependencySet | public static Set<String> getDependencySet(String className)(Code) | | Parameters: className - of a plugin that we wish to load an ordered set of JARpaths that contains theplugins that need to be (re)loaded, in the correct order. |
getDependentPlugins | public String[] getDependentPlugins()(Code) | | |
getDockablesURI | public URL getDockablesURI()(Code) | | Returns the location of the plugin's
dockables.xml file.
since: jEdit 4.2pre1 |
getFile | public File getFile()(Code) | | Returns a file pointing to the plugin JAR.
|
getPath | public String getPath()(Code) | | Returns the full path name of this plugin's JAR file.
|
getPlugin | public EditPlugin getPlugin()(Code) | | Returns the plugin core class for this JAR file. Note that if the
plugin has not been activated, this will return an instance of
EditPlugin.Deferred . If you need the actual plugin core
class instance, call
PluginJAR.activatePlugin() first.
If the plugin is not yet loaded, returns null
since: jEdit 4.2pre1 |
getPluginCache | public static PluginCacheEntry getPluginCache(PluginJAR plugin)(Code) | | |
getRequiredJars | public Set<String> getRequiredJars()(Code) | | Returns the required jars of this plugin.
the required jars of this plugin since: jEdit 4.3pre12 |
getServicesURI | public URL getServicesURI()(Code) | | Returns the location of the plugin's
services.xml file.
since: jEdit 4.2pre1 |
getZipFile | public synchronized ZipFile getZipFile() throws IOException(Code) | | Returns the plugin's JAR file, opening it if necessary.
since: jEdit 4.2pre1 |
load | public static PluginJAR load(String path, boolean loadDependents)(Code) | | Loads a plugin, and its dependent plugins if necessary.
since: jEdit 4.3pre7 |
setPluginCache | static void setPluginCache(PluginJAR plugin, PluginCacheEntry cache)(Code) | | |
transitiveClosure | public static void transitiveClosure(String[] dependents, List<String> listModel)(Code) | | If plugin A is needed by B, and B is needed by C, we want to
tell the user that A is needed by B and C when they try to
unload A.
Parameters: dependents - a set of plugins which we wish to disable Parameters: listModel - a set of plugins which will be affected, and will needto be disabled also. |
uninit | void uninit(boolean exit)(Code) | | |
|
|