[udig-devel] basic methods to write a udig-plugin
Jody Garnett
jgarnett at refractions.net
Wed May 14 18:36:12 PDT 2008
gaghi wrote:
> Hi Jody, I tried the code you suggest me. Thanks a lot, I'm still working on
> it but your advice was really helpful. About the plugin-start, i thought to
> insert the constructor in the code to invoke the main(not that MAIN) method.
> It works actually, but just once. After the first run the button doesn't do
> anything.
> How can I fix this behavior?
I am not quite sure I understand what is going on ...
In general for Eclipse stuff:
1- the constructor does *no* work
2- there is a seperate init method that is called (often with some kind
of DialogSettings or IMemento to store configuration info between runs)
3- there is a method that does some work
4- and a dispose() method to clean up
You can see this happen for the Eclipse "Views" (it does steps 1 - 5).
The IOp does steps 1 and 3 if I remember correctly... only a single
instance of the IOp would be constructed, and it would be called with
different parameters each time the user asks.
More information about the udig-devel
mailing list