On Friday 4 March 2005 23:05, Rajarshi Guha wrote: > On Fri, 2005-03-04 at 22:05 +0100, Egon Willighagen wrote: > > If you want to learn about how to write these plugins, you can look at > > the source code of available plugins, e.g. the DirBrowser which comes by > > default with the Jmol application. The sources are in CDK's cvs. Ask on > > the [EMAIL PROTECTED] mailing list, and check CDK's SF website on > > details how to checkout CVS for the CDK project, which is really the same > > as checking out Jmol CVS. The module you need is: cdk-plugins > > I've been looking at this, so I was testing by using a reduced version > of the dir browser plugin. > > A few questions - > > 1. After I have compiled the plugin I get a jar file which I then placed > in the plugin-jars/ directory of the Jmol source tree. I then added 2 > lines in Jmols build.xml (clones of the lines refering to dirbrowser) > and then rebuilt Jmol. > > However restarting Jmol did'nt show my plugin from the plugin menu. So > how do I get a plugin to show up in Jmol?
Two options: - use the mechanism described by Nicolas, which is best for testing... I actually have a link to the source dir jar version from $HOME/.jmol/plugins - the DirBrowser is loaded by hardcoding in src/org/openscience/jmol/app/Jmol.java search for 'DirBrowser' and you'll find this line: pluginManager.loadPlugin("org.openscience.cdkplugin.dirbrowser.DirBrowserPlugin"); Directly beneath that the is code to load plugins from $HOME/.jmol/plugins This one is hardcoded because I do not know how to browse over all loaded classes. Starting with a jar file, is opening it, loading interesting files as class, and then do introspection... which is how the $HOME/.jmol/plugins jars are loaded. This is done by the CDKPluginManager in CDK CVS... Egon -- [EMAIL PROTECTED] PhD student on Molecular Representation in Chemometrics Radboud University Nijmegen http://www.cac.science.ru.nl/people/egonw/ GPG: 1024D/D6336BA6 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users