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

Show All Assignable Beans dialog

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 3.3.0.M4
    • None
    • cdi
    • Documentation (Ref Guide, User Guide, etc.)
    • A new Assignable Beans dialogue has been implemented. The dialogue presents all beans that can be assigned to a particular annotation. Beans that are not able to be assigned appear greyed out and have the option to be hidden.
    • Documented as Feature Request

    Description

      Let's see what we have right now.

      If there is an ambiguous injection point and user Ctrl+Click on it then we show two hyperlinks. One of thous hyperlinks is Show All Eligible Beans... that is not quite accurate, btw. The the other one is Open @Inject Bean <Type> which opens a random bean from all the resolved beans. If we have more than one eligible bean than we try to resolve them. If we still have a few "resolved" beans then we mark an injection as ambiguous and our OpenOn dialog uses a random bean from this resolved set.

      How it should work

      First at all let's rename "Show All Eligible Beans..." to "Show All Assignable Beans..." since we show all the assignable beans (beans which match the type and the qualifiers) but not eligible (assignable & enabled). For instance a set of assignable beans includes decorators and interceptors.

      If there is the only one bean is to injected then JBT will suggest to open this bean. But if there are many assignable beans (even if they can be resolved to the only one) then JBT will suggest to show all the assignable beans:

      Where Show All Assignable Beans... opens a dialog with all the beans which match the injection type and qualifiers:

      The beans should be filtered by name. Also it's possible to hide unavailable beans (shown by default). Show/hide menu is shown by default but can be hidden in dialog settings:

      Attachments

        1. 2011-08-17 11.15.bmml
          4 kB
        2. 2011-08-17 11.15.bmml
          4 kB
        3. 2011-08-17 11.15.bmml
          7 kB
        4. 2011-08-17 11.15.bmml
          7 kB
        5. 2011-08-17 11.15.bmml
          5 kB
        6. 2011-08-17 11.15.bmml
          4 kB
        7. 2011-08-17 11.15.bmml
          4 kB
        8. 2011-08-17 11.15.png
          2011-08-17 11.15.png
          62 kB
        9. Ambiguous.png
          Ambiguous.png
          29 kB
        10. Assignable.png
          Assignable.png
          47 kB
        11. filter.png
          filter.png
          34 kB
        12. final1.png
          final1.png
          87 kB
        13. final2.png
          final2.png
          17 kB
        14. OldAmbiguous.png
          OldAmbiguous.png
          30 kB
        15. Resolved.png
          Resolved.png
          29 kB
        16. ShowAssignibleBorderless.avi
          1.35 MB
        17. ShowAssignibleModal.avi
          3.16 MB
        18. show-hide.png
          show-hide.png
          31 kB
        19. TheOnlyOne.png
          TheOnlyOne.png
          32 kB

        Issue Links

          Activity

            People

              scabanovich Viacheslav Kabanovich (Inactive)
              alexeykazakov Alexey Kazakov
              Isaac Rooskov Isaac Rooskov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: