|
From: Konstantin P. <kpr...@ya...> - 2002-09-30 07:26:20
|
--- John Davis <jav...@ho...> wrote:
> I am implementing a text editor. And I want to
> allow the text editor to load third-party plug-ins.
> Do u know how to achieve
> that?? In other words, the java application (my text
> editor) can load the
> plugin (I guess it should be a JAR file) and create
> menu item "My Plugin" in
> JFrame. Is it JavaBeans approach??
>
> //This should be java text editor code
> JMenuBar menuBar = new JMenuBar();
> setJMenuBar(menuBar);
>
> //The following should be third-party plugin code,
> which is a separated
> component
> JMenu pluginMenu = new JMenu("My Plugin");
> menuBar.add(pluginMenu );
>
>
> If you know, please let me know. Thanks
Well, we in XDoclet use similar logic - it loads jar
files containig plugins, grabs xml descriptors from
there and does funny stuff with it.
JEdit also looks in jar files for actions.xml /
dockables.xml.
Use the force -read the source.
regards,
=====
Konstantin Priblouda ( ko5tik ) Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
|