Page 1 of 1

Singleton in java

PostPosted: Sun Feb 21, 2021 11:06 pm
by DavidBo
I intend to make a singleton in java that instantiates an object which supports the XContextMenuInterceptor interface.
I have seen an example in C++ but the object was created in the component_getFactory function
but I do not implement a getFactory in java. I think all that is taken care of the tools used (LibreOffice Plugin for eclipse)
Has anybody tried to make an extension in java with a singleton?

Re: Singleton in java

PostPosted: Sun Feb 21, 2021 11:36 pm
by Villeroy
Did you solve your other problem? Then you should read how to do anything with Java and UNO.

http://fivedots.coe.psu.ac.th/~ad/jlop/

Re: Singleton in java

PostPosted: Sun Feb 21, 2021 11:42 pm
by DavidBo
The tool has a bug, it can't get LO's or OO's types and interfaces. It is a Git-hup project and I could see that the bug was reported some years ago.
But the tools do many other things which makes it very easy to make extensions in java easier than in C++