Details

    • Affects:
      Documentation (Ref Guide, User Guide, etc.)
    • Release Notes Text:
      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.
    • Release Notes Docs Status:
      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:

        Gliffy Diagrams

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

          Issue Links

            Activity

            Hide
            akazakov Alexey Kazakov added a comment -

            fixed

            Show
            akazakov Alexey Kazakov added a comment - fixed
            Hide
            scabanovich Viacheslav Kabanovich added a comment -

            Let us show in bold font name of beans left after resolution algorithm.
            Example: Three beans are assignable, one is unselected alternative, two other beans are eligible, one of them is an alternative. The injection is resolved to the selected alternative, so it will be shown in bold black font, the other eligible bean - in normal black font and unselected alternative - in normal grey font.
            So, the black font allows to see immediately the result of resolution.

            Show
            scabanovich Viacheslav Kabanovich added a comment - Let us show in bold font name of beans left after resolution algorithm. Example: Three beans are assignable, one is unselected alternative, two other beans are eligible, one of them is an alternative. The injection is resolved to the selected alternative, so it will be shown in bold black font, the other eligible bean - in normal black font and unselected alternative - in normal grey font. So, the black font allows to see immediately the result of resolution.
            Hide
            jjankovi Jaroslav Jankovič added a comment -

            Verified in JBDS 5.0.0.v201111041404M-H44-M4. Closing JIRA.

            Show
            jjankovi Jaroslav Jankovič added a comment - Verified in JBDS 5.0.0.v201111041404M-H44-M4. Closing JIRA.
            Hide
            irooskov Isaac Rooskov added a comment -

            Reopening to write release note text

            Show
            irooskov Isaac Rooskov added a comment - Reopening to write release note text
            Hide
            irooskov Isaac Rooskov added a comment -

            Re-closing now that release note text has been written

            Show
            irooskov Isaac Rooskov added a comment - Re-closing now that release note text has been written

              People

              • Assignee:
                scabanovich Viacheslav Kabanovich
                Reporter:
                akazakov Alexey Kazakov
                Writer:
                Isaac Rooskov
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development