Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28773

Extension points not working

XMLWordPrintable

      This plugin intends to support multiple EdgeProvider implementations using Guice MultiBinder. However it is impossible to add a new binding in another plugin as suggested. The reason is that while you can use the same setBinder to add multiple bindings, you can not add another setBinder. writing another module with code like this:

      @Override
      protected void configure()

      { LOG.info("NetDependModule configure was called. " + Thread.currentThread().getStackTrace()); Multibinder<EdgeProvider> edgeProviderMultibinder = Multibinder.newSetbBBinder(binder(), EdgeProvider.class); edgeProviderMultibinder.addBinding().to(EdgeProviderImpl.class); }

      ]

      Will result in this error:
      A binding to java.util.Set<hudson.plugins.depgraph_view.model.graph.EdgeProvider> was already configured at hudson.plugins.depgraph_view.model.graph.DependencyGraphModule.configure(DependencyGraphModule.java:36).
      at com.picscout.netdepend.netdepend_graph.NetDependModule.configure(NetDependModule.java:48)

      Need to somehow expose the orignal set binding , or use an extension point all() to get all instances of providers.

      (B.T.W , not sure it is relevant but the code in GitHub doesn't compile, missing Messages.java class , maybe other issues as well)

            wolfs Stefan Wolf
            omerpic omer schleifer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: