Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9940

Quickfix and Wizard for fixing ambigious injection warning is confusing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 3.3.0.M5
    • None
    • cdi
    • None

    Description

      Tried to use the quickfix for fixing ambigious injection points - it is very confusing.

      I use the jboss-javaee6-webapp quickstart from Central and I get a warning about ambigous injection (which is true since there are two on the classpath)

      I get this when trying to quickfix it:

      The message reads "Specify <some injection source> bean for injection to injection point".
      That sounds to me like when I press this it will figure out which qualifiers that is to be set on this to make it choose this.

      When I choose one of these it give me this wizard:

      And now my confusion starts:

      1) Its not clear what "Bean" it is referring to - it is written in the long text label but that is not the first thing you look at - this should be more clear.

      2) Its error is saying "This set of qualifiers is not unique" immediately - but it doesn't say which beans its actually matching so you don't really know what kind of "uniqueness" that is the problem.
      Maybe we should write something like "We could not find a set of qualifiers that makes the LoggerProducer.produceLog() unique for @Injection Logger log. You can make it unique by changing the qualifiers below"

      3) Using Create Qualifier I actually get a new qualifier showing up in the editor behind the wizard but it does not show up in available list of qualifiers and now a completely different qualifier have been added to Available section.

      4) When I actually do add qualifiers and pres Finish - there is no warning or information about what actually will change; I would expect a preview dialog for this especially since we are actually changing the Bean source and not the injection point we are coming from.

      Attachments

        1. addremovequalifiers.png
          addremovequalifiers.png
          81 kB
        2. quickfix_specify_bean_for_injection.png
          quickfix_specify_bean_for_injection.png
          29 kB
        3. SpecifyCDIBean.png
          SpecifyCDIBean.png
          90 kB
        4. SpecifyCDIBean3.png
          SpecifyCDIBean3.png
          102 kB
        5. SpecifyCDIBeanForInjectionPoint1.png
          SpecifyCDIBeanForInjectionPoint1.png
          79 kB
        6. SpecifyCDIBeanForInjectionPoint2.png
          SpecifyCDIBeanForInjectionPoint2.png
          86 kB
        7. SpecifyCDIBeanForInjectionPoint3.png
          SpecifyCDIBeanForInjectionPoint3.png
          85 kB
        8. SpecifyCDIBeanNew.png
          SpecifyCDIBeanNew.png
          92 kB

        Activity

          People

            dazarov_jira Daniel Azarov (Inactive)
            manderse@redhat.com Max Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: