Java Doc for PluginJAR.java in  » Swing-Library » jEdit » org » gjt » sp » jedit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » jEdit » org.gjt.sp.jedit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.gjt.sp.jedit.PluginJAR

PluginJAR
public class PluginJAR (Code)
Loads and unloads plugins.

JAR file contents

When loading a plugin, jEdit looks for the following resources:
  • A file named actions.xml defining plugin actions. Only one such file per plugin is allowed. See ActionSet for syntax.
  • A file named browser.actions.xml defining file system browser actions. Only one such file per plugin is allowed. See ActionSet for syntax.
  • A file named dockables.xml defining dockable windows. Only one such file per plugin is allowed. See org.gjt.sp.jedit.gui.DockableWindowManager for syntax.
  • A file named services.xml defining additional services offered by the plugin, such as virtual file systems. Only one such file per plugin is allowed. See org.gjt.sp.jedit.ServiceManager for syntax.
  • File with extension .props containing name/value pairs separated by an equals sign. A plugin can supply any number of property files. Property files are used to define plugin men items, plugin option panes, as well as arbitriary settings and strings used by the plugin. See EditPlugin for information about properties used by jEdit. See java.util.Properties for property file syntax.
For a plugin to actually do something once it is resident in memory, it must contain a class whose name ends with Plugin. This class, known as the plugin core class must extend EditPlugin and define a few required properties, otherwise it is ignored.

Dynamic and deferred loading

Unlike in prior jEdit versions, jEdit 4.2 and later allow plugins to be added and removed to the resident set at any time using the jEdit.addPluginJAR(String) and jEdit.removePluginJAR(PluginJARboolean) methods. Furthermore, the plugin core class might not be loaded until the plugin is first used. See EditPlugin.start for a full description.
See Also:   org.gjt.sp.jedit.jEdit.getProperty(String)
See Also:   org.gjt.sp.jedit.jEdit.getPlugin(String)
See Also:   org.gjt.sp.jedit.jEdit.getPlugins
See Also:   org.gjt.sp.jedit.jEdit.getPluginJAR(String)
See Also:   org.gjt.sp.jedit.jEdit.getPluginJARs
See Also:   org.gjt.sp.jedit.jEdit.addPluginJAR(String)
See Also:   org.gjt.sp.jedit.jEdit.removePluginJAR(PluginJARboolean)
See Also:   org.gjt.sp.jedit.ActionSet
See Also:   org.gjt.sp.jedit.gui.DockableWindowManager
See Also:   org.gjt.sp.jedit.OptionPane
See Also:   org.gjt.sp.jedit.PluginJAR
See Also:   org.gjt.sp.jedit.ServiceManager
author:
   Slava Pestov
version:
   $Id: PluginJAR.java 10832 2007-10-07 11:19:37Z kpouer $
since:
   jEdit 4.2pre1

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  voidactivatePlugin()
     Loads the plugin core class.
public  voidactivatePluginIfNecessary()
     Should be called after a new plugin is installed.
public  booleancheckDependencies()
     Returns true if all dependencies are satisified, false otherwise.
 booleancontainsClass(String className)
    
public  voiddeactivatePlugin(boolean exit)
     Unloads the plugin core class.
public static  StringfindPlugin(String className)
     Unlike getPlugin(), will return a PluginJAR that is not yet loaded, given its classname.
public  PluginCacheEntrygenerateCache()
    
public  ActionSetgetActionSet()
     Returns the plugin's action set for the jEdit action context jEdit.getActionContext .
public  ActionSetgetActions()
    
public  ActionSetgetBrowserActionSet()
     Returns the plugin's action set for the file system browser action context org.gjt.sp.jedit.browser.VFSBrowser.getActionContext .
public  StringgetCachePath()
     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  JARClassLoadergetClassLoader()
     Returns the plugin's class loader.
 String[]getClasses()
    
public static  Set<String>getDependencySet(String className)
    
public  String[]getDependentPlugins()
    
public  URLgetDockablesURI()
     Returns the location of the plugin's dockables.xml file.
public  FilegetFile()
     Returns a file pointing to the plugin JAR.
public  StringgetPath()
     Returns the full path name of this plugin's JAR file.
public  EditPlugingetPlugin()
     Returns the plugin core class for this JAR file.
public static  PluginCacheEntrygetPluginCache(PluginJAR plugin)
    
public  Set<String>getRequiredJars()
     Returns the required jars of this plugin.
public  URLgetServicesURI()
     Returns the location of the plugin's services.xml file.
public synchronized  ZipFilegetZipFile()
     Returns the plugin's JAR file, opening it if necessary.
 voidinit()
    
public static  PluginJARload(String path, boolean loadDependents)
     Loads a plugin, and its dependent plugins if necessary.
static  voidsetPluginCache(PluginJAR plugin, PluginCacheEntry cache)
    
public  StringtoString()
    
public static  voidtransitiveClosure(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.
 voiduninit(boolean exit)
    


Constructor Detail
PluginJAR
public PluginJAR(File file)(Code)
Creates a PluginJAR object which is not necessarily loaded, but can be later.
See Also:   PluginJAR.load(String,boolean)




Method Detail
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



generateCache
public PluginCacheEntry generateCache() throws IOException(Code)



getActionSet
public ActionSet getActionSet()(Code)
Returns the plugin's action set for the jEdit action context jEdit.getActionContext . These actions are loaded from the actions.xml file; see ActionSet . .
since:
   jEdit 4.2pre1



getActions
public ActionSet getActions()(Code)



getBrowserActionSet
public ActionSet getBrowserActionSet()(Code)
Returns the plugin's action set for the file system browser action context org.gjt.sp.jedit.browser.VFSBrowser.getActionContext . These actions are loaded from the browser.actions.xml file; see ActionSet . .
since:
   jEdit 4.2pre1



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.



getClassLoader
public JARClassLoader getClassLoader()(Code)
Returns the plugin's class loader.



getClasses
String[] getClasses()(Code)



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



init
void init()(Code)



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)



toString
public String toString()(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)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.