Just wondering what would be considered the "fix" for this, someone
mentioned implementing more logic in the Netbeans plugin. Would a plausible
solution be to have Netbeans generate each add-in as a singleton? Or is
there maybe a better fix from the open office end in the way it implements
the java plugins? I have a hunch this could be the case, because I don't
see why the add-in class should be invoked / instantiated as many times as
there are menu items and toolbar items. Seems like there should be a better
integration scheme...

2014-10-02 15:22 GMT+02:00 John D'Orazio <
john.dora...@cappellaniauniroma3.org>:

> Does this mean it's a bug in the way open office is implementing the java
> add-ins generated by the NetBeans plugin? (I'm the one that opened the
> issue about this in the forum, seeing I'm trying to create a Writer add-in
> using the NetBeans plugin.)
>
> don John R. D'Orazio
> cappellano coordinatore
> ----
> Servizio di Cappellania - Università degli Studi Roma Tre
> Piazzale San Paolo 1/d - 00120 Città del Vaticano
> Tel. 06.69.88.08.09 - Cell. +39 333.25.45.447
> E-mail: cappella...@uniroma3.it, cappellania.uniro...@gmail.com
> Sito Web: http://www.cappellaniauniroma3.org
> Facebook: https://www.facebook.com/cappellania.uniroma3
> Twitter: https://twitter.com/CappellaniaR3
>
> Il 02/ott/2014 14:19 "Jürgen Schmidt" <jogischm...@gmail.com> ha scritto:
>
> On 01/10/14 12:19, Carl Marcum wrote:
>> >
>> > On 10/01/2014 02:25 AM, Jürgen Schmidt wrote:
>> >> On 01/10/14 02:19, Carl Marcum wrote:
>> >>> Amenel,
>> >>>
>> >>> I am cross posting to dev since the original message didn't get
>> copied:
>> >>>
>> >>> On 09/30/2014 09:39 AM, Amenel VOGLOZIN wrote:
>> >>>> Hi Carl,
>> >>>> I don't know whether it was intended behavior or not. I have ran into
>> >>>> this problem in an extension that I started writing in May or June
>> and
>> >>>> it was an issue in that the constructor was called about as many
>> times
>> >>>> as i opened the menu.
>> >>>>
>> >>>> I posted a message similar to yours to this mailing list and Ariel
>> >>>> gave me a solution which was to use a singleton. As a result, I moved
>> >>>> the construction code, and handlers, and event listeners, and most of
>> >>>> my code actually, into a helper class which implemented a Singleton
>> >>>> pattern. From then on, things went smoothly, with the notable
>> >>>> exception that the application exit event is posted as many times as
>> >>>> there are frames opened. A specific boolean variable can guard a code
>> >>>> section so no problem there either.
>> >>
>> >> And this is the preferred way to do it, the NB plugin wizard generates
>> a
>> >> very basic and simplified skeleton only. There were plans to extend it
>> >> and include a little bit more logic but it was never implemented.
>> >>
>> >> Juergen
>> >>
>> >>
>> >
>> > I was checking in to a new issue opened on the netbeans plugin. [1]
>> >
>> > For every menu item for the AddOn in the current context (ex Writer),
>> > the constructor is called then the Menu is first clicked.
>> > If there are 2 menu items the constructor is ran twice.
>> > This only happens on the first time per context opened.
>> >
>> > Is this expected behavior?
>> >
>> > Is the constructor called from office?
>> >
>> > If so it's not a bug in the plugin.
>>
>> I don't think it's a bug in the plugin
>>
>> Juergen
>>
>> >
>> > [1] https://issues.apache.org/ooo/show_bug.cgi?id=125691
>> >
>> > Thanks,
>> > Carl
>> >
>> >>>>
>> >>>> You might want to search the archives for Ariel's reply to my
>> message.
>> >>>> Cheers,
>> >>>> -Amenel.
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> Le Dimanche 28 septembre 2014 20h36, Carl Marcum <cmar...@apache.org
>> >
>> >>>> a écrit :
>> >>>>
>> >>>>
>> >>>>
>> >>>> Hi All,
>> >>>>
>> >>>> I was checking in to a new issue opened on the netbeans plugin. [1]
>> >>>>
>> >>>> For every menu item for the AddOn in the current context (ex Writer),
>> >>>> the constructor is called then the Menu is first clicked.
>> >>>> If there are 2 menu items the constructor is ran twice.
>> >>>> This only happens on the first time per context opened.
>> >>>>
>> >>>> Is this expected behavior?
>> >>>>
>> >>>> [1] https://issues.apache.org/ooo/show_bug.cgi?id=125691
>> >>>>
>> >>>> Thanks,
>> >>>> Carl
>> >>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
>> >>>> For additional commands, e-mail: api-h...@openoffice.apache.org
>> >>>>
>> >>>
>> >>> Do you remember which list the post was on?
>> >>>
>> >>> Thanks,
>> >>> Carl
>> >>>
>> >>>
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
>> > For additional commands, e-mail: dev-h...@openoffice.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
>> For additional commands, e-mail: dev-h...@openoffice.apache.org
>>
>>


-- 
don John R. D'Orazio
Cappellano Coordinatore
________________________________________

Servizio di Cappellania - Università degli Studi Roma Tre
Piazzale San Paolo 1/d - 00120 Città del Vaticano
tel. +39 06-69880809 - cell. +39 333/2545447
E-Mail: *cappellania.uniro...@gmail.com* <cappellania.uniro...@gmail.com> |
*cappella...@uniroma3.it* <cappella...@uniroma3.it>
----
Sito Web: http://www.cappellaniauniroma3.org
Twitter: https://twitter.com/CappellaniaR3
Flickr: http://www.flickr.com/people/cappellaniauniroma3/
Pagina Facebook: https://www.facebook.com/cappellania.uniroma3
Gruppo Facebook: https://www.facebook.com/groups/cappellania.uniroma3
Pagina Google+: https://plus.google.com/+CappellaniaUniRoma3org
Community Google+: http://gplus.to/CappellaniaUniRoma3
LinkedIn:
http://www.linkedin.com/company/cappellania-universit-degli-studi-roma-tre
----
Per iscriversi al Calendario Pubblico della Cappellania (con account
gmail): [image: Iscriviti con Google Calendar]
<https://www.google.com/calendar/render?cid=8jugejikjtlks094p62hled6vs%40group.calendar.google.com>

Per aggiungere i contatti della Cappellania alla rubrica del telefono,
scansiona il qrCode (consiglio l'app "NeoReader"):
[image: qrcode cappellania]

Reply via email to