|
From: <Kli...@t-...> - 2003-08-05 15:08:47
|
Hi Slava et al!
I have a general plugin question: Is the start() method of a plugin,
which extends the EditPlugin, always called before any dockables are
created, which are defined in the dockables.xml of the same plugin?
My problem is that the Window (which should be created in the
dockables.xml) needs to know about the plugin's main class and I hate to
use static stuff (well, I even dont like the call of
jEdit.getPlugin("some.package.MyPlugin"), but here you'll probably need it).
I would like to have the plugin's main class create the window, and that
should be called from the beanshell code in the dockables.xml:
<DOCKABLE NAME="mypluginwindow">
MyPlugin myPlugin = jEdit.getPlugin("some.package.MyPlugin");
myPlugin.createWindow(view, position); // returns a window's instance
</DOCKABLE>
The call of jEdit.getPlugin() can only succeed if the class loader has
created the plugin's main class previously. But is this the case? Has
the start() method been called at that point (and is there a difference
in the new 4.2 plugin API)?
I thought asking is better than finding that out by crawling through
Jedit's code. Thanks for any help!
Alex
--
Alexander Klimetschek
<kli...@t-...>
|