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

        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: