[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-9347) Show All Resolved Beans dialog

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Wed Jul 20 13:00:23 EDT 2011


    [ https://issues.jboss.org/browse/JBIDE-9347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615495#comment-12615495 ] 

Viacheslav Kabanovich commented on JBIDE-9347:
----------------------------------------------

I agree that it is most interesting to see eligible beans, but it also might be interesting to see which beans are 'easy' to become eligible, especially when it turns out that currently there is no eligible bean for the injection point in question.

List of eligible beans does not include disabled beans and alternatives that are not selected - and those beans are potentially ready to be made eligible. Our list can be specific about the status of non-eligible beans adding comments like 'disabled by a specialized bean', 'alternative not selected', 'producer of a disabled bean', etc.

What do you think about providing "Show Assignable beans..." at least for the case when there are no eligible beans?




> Show All Resolved Beans dialog
> ------------------------------
>
>                 Key: JBIDE-9347
>                 URL: https://issues.jboss.org/browse/JBIDE-9347
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: cdi (jsr-299)
>            Reporter: Alexey Kazakov
>            Assignee: Alexey Kazakov
>              Labels: new_and_noteworthy
>             Fix For: 3.3.0.M3
>
>         Attachments: Ambiguous.png, Assignable.png, OldAmbiguous.png, Resolved.png, TheOnlyOne.png
>
>
> *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.
> !OldAmbiguous.png!
> *What I suggest to change.*
> 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.
> Then, in case of an ambiguous injection, I think we should suggest to show two sets of beans: *resolved* and *assignable* instead of *random bean from the resolved set* and *assignable*. It will look like the following dialog:
> !Ambiguous.png!
> Where *Show All Resolved Beans...* opens a dialog with all the beans which match the injection (if such a set had the only resolved bean then the injection wouldn't be ambiguous):
> !Resolved.png!
> And *Show All Assignable Beans...* which shows all the assignable beans (right now we have that dialog by "Show All Eligible Beans..." label):
> !Assignable.png!
> I'm not sure that *resolved* is good term for the dialog *Show All Resolved Beans...* since actually this is a list of beans that we got trying to resolve the eligible beans and failed to resolve it to the only bean. Any ideas how we can name such a set?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list