Singleton in java

Creating a macro - Writing a Script - Using the API

Singleton in java

Postby DavidBo » Sun Feb 21, 2021 11:06 pm

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?
Apache Open Office 4.1.9 Windows 10
DavidBo
 
Posts: 27
Joined: Thu Mar 12, 2009 3:57 pm

Re: Singleton in java

Postby Villeroy » Sun Feb 21, 2021 11:36 pm

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/
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
 
Posts: 29723
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Singleton in java

Postby DavidBo » Sun Feb 21, 2021 11:42 pm

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++
Apache Open Office 4.1.9 Windows 10
DavidBo
 
Posts: 27
Joined: Thu Mar 12, 2009 3:57 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 7 guests