Right, we actually ran in this issue before when the return type was changed and some plugins stopped working because of the different method footprint.
that's why we added addMainMenuPlugin() and deprecated addMainMenuItem() as the only viable option seemed to use a different name, not elegant but working. recall http://www.mail-archive.com/jump-pilot-devel@lists.sourceforge.net/msg09228.html i'd suggest we do the same for the popupmenu. ..ede On 20.08.2012 21:56, Michaël Michaud wrote: > Hi Matthias, > > You're right and I can't see any solution without adding a new method, > or changing the accessibility of the third one from private to public. > > I was tempted to say it is safe to change the return value from void to a > JMenuItem, but after I have read this article, I wouldn't recommend to > do it : > http://stackoverflow.com/questions/3589946/retrofitting-void-methods-to-return-its-argument-to-facilitate-fluency-breaking > > Finally, the solution I suggest is to add the missing method. > A better solution anyone ? > > Michaël > > >> Hi Ede, >> >> i have to disappoint you. You mean the new addMainMenuItem methods, but >> i talk about addPopupMenuItem. The addPopupMenuItem methods does not >> return the menuitem at the moment :-( >> >> Matthias >>> the new addMenu methods of featureinstaller return the menuitem created. >>> you can easily save the reference and ask it on execute which state it is >>> in. >>> >>> regards ede >>> >>> On 18.08.2012 18:58, Matthias Scholz wrote: >>> >>>> Hi, >>>> >>>> i use the >>>> >>>> FeatureInstaller.addPopupMenuItem(JPopupMenu popupMenu, PlugIn executable, >>>> String[] menuPath, String menuItemName, boolean checkBox, Icon >>>> icon, >>>> EnableCheck enableCheck) >>>> >>>> to add a PopupMenuItem with a checkbox. Is there an easy way to get the >>>> state of the chackbox inside the Plugin.execute() method? >>>> >>>> thanks >>>> >>>> Matthias >>>> >>>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Jump-pilot-devel mailing list >>> Jump-pilot-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>> >> > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel