This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
from log of issue 219101. Apparently groovy attempts to insert additional lookup merger for ActionProvider while there already is one. WARNING [org.netbeans.spi.project.support.DelegatingLookupImpl]: Two LookupMerger instances for interface org.netbeans.spi.project.ActionProvider among [org.netbeans.spi.java.project.support.ClassPathProviderMerger@388f7a58, org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenMerger@53a9446a, org.netbeans.spi.project.ui.support.UILookupMergerSupport$PrivilegedMerger@dcab60f, org.netbeans.spi.project.ui.support.UILookupMergerSupport$RecommendedMerger@777699db, org.netbeans.spi.project.support.LookupProviderSupport$SourcesMerger@b6f3623, org.netbeans.spi.java.project.support.LookupMergerSupport$SFBLookupMerger@324b39b2, org.netbeans.spi.java.project.support.LookupMergerSupport$JFBLookupMerger@68b8eee9, org.netbeans.spi.project.support.LookupProviderSupport$ActionProviderMerger@454d38b5, org.netbeans.modules.whitelist.WhiteListQueryMerger@50c6169e, org.netbeans.modules.groovy.support.LookupMergerSupport$ActionProviderMerger@46dc5cfe] in Projects/org-netbeans-modules-java-j2seproject/Lookup. Only first one will be used
Milosi, what's the correct solution? Should I just remove my LookupMerger? Or how do I find whether there is already registered merger for a certain type of project?
well, typically the project type owner should primarily register mergers. In what way is your lookup merger for action provider different from the default one?
It is actually almost the same as the original one, I just didn't know it is already registered in a different module. I'm going to check whether each necessary project type has registered one merger somewhere and if so, I'll remove LookupMerger from groovy support.
I've removed groovy lookup merger for Java SE projects in: web-main b26f30e33a23 ..I didn't remove it completely because it looks as there is no other lookup merger registered for Java Web and Java EJB projects.. maybe we should move the merger to the project modules (web.project, j2ee.ejbjarproject) but to be honest I don't have strong opinion about that.. CCing to David to let him decide ;)
Looks like web/ee projects had no need yet for merger of ActionProvider instances. Feel free to enhance web/ee project types with it if you need it. Thanks.
Integrated into 'main-golden', will be available in build *201210090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b26f30e33a23 User: Martin Janicek <mjanicek@netbeans.org> Log: #219320 - too many lookup mergers for action provider
(In reply to comment #5) > Looks like web/ee projects had no need yet for merger of ActionProvider > instances. Feel free to enhance web/ee project types with it if you need it. > Thanks. I've already done that. The question is just whether it should be moved to the web.project and j2ee.ejbjarproject modules.
(In reply to comment #7) > (In reply to comment #5) > > Looks like web/ee projects had no need yet for merger of ActionProvider > > instances. Feel free to enhance web/ee project types with it if you need it. > > Thanks. > > I've already done that. The question is just whether it should be moved to the > web.project and j2ee.ejbjarproject modules. to me, that would sound like a good pattern to follow
(In reply to comment #7) > (In reply to comment #5) > > Looks like web/ee projects had no need yet for merger of ActionProvider > > instances. Feel free to enhance web/ee project types with it if you need it. > > Thanks. > > I've already done that. The question is just whether it should be moved to the > web.project and j2ee.ejbjarproject modules. Definitely. I just had a look at the changeset attached to this issue - yes the registration of lookup merger should be moved from groovy directly to web/ejb project types. Thanks.
Thanks guys. I've moved LookupMerger from groovy.support to web.project and j2ee.ejbjarproject in: web-main #c333ab48fd0d ..both modules now contains almost the same copy of the merger, but I didn't find any general abstract class to avoid code duplicity (maybe LookupProviderSupport can be used for that purpose, but not sure how to register it's createActionProviderMerger() factory method --> feel free to update the code David)
(In reply to comment #10) > ..both modules now contains almost the same copy of the merger, but I didn't > find any general abstract class to avoid code duplicity I just had a look and found org.netbeans.spi.project.support.LookupProviderSupport.createActionProviderMerger(). Do you mind changing the code to use that one instead of two new classes? Thanks.
Done in: web-main #378378bc8b04
Thanks Martin.
Integrated into 'main-golden', will be available in build *201210160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/378378bc8b04 User: Martin Janicek <mjanicek@netbeans.org> Log: #219320 correction: Using LookupProviderSupport instead of two new LookupMerger classes