Hi Giancarlo,

> I've created the extension through the NetBeans plugin for OOo wizard,
> so I've only added my methods and I call them from the "dispatch( )", I
> wouldn't like to modify the java code created by the wizard...

you don't have to change much. Add an additional (singleton) class (see
below) to your extension with the static member and just check this
member. Thats it.

-----%<-----
public class Checker {
        private static volatile Checker INSTANCE;
        
        public static volatile boolean isActive = false;

        public static Checker getInstance() {
                if(INSTANCE == null)
                        synchronized (Checker.class) {
                                if (INSTANCE == null) {
                                        INSTANCE = new Checker();
                                }
                        }
                return INSTANCE;
        }
-----%<----

Greetings, Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to