[jbosstools-issues] [JBoss JIRA] (JBIDE-18592) EL code completion not working automatically with @Named with Java EE 7

Alexey Kazakov (JIRA) issues at jboss.org
Mon Oct 13 16:03:35 EDT 2014


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

Alexey Kazakov commented on JBIDE-18592:
----------------------------------------

{quote}And yes, I believe CDI handles the above BUT currently you need to explicitly enable the CDI facet in the tools OR use maven where we currently do some extra scanning to detect usage of features like CDI.{quote}
That's correct. It's actually more complicated. The second case depends on what discovery mode is set in beans.xml (annotated, auto, none). But anyway, CDI Tools handle that as soon as CDI support is enabled.

So, after some discussion with Max, we are going to enable CDI support automaticly when:
1. Web (Servlet) facet version >= 3.1 is being installed
OR
2. EJB facet version >= 3.2 is being installed
OR
3. Utility module (there is no version for this facet) facet is being installed

Is it OK?

> EL code completion not working automatically with @Named with Java EE 7
> -----------------------------------------------------------------------
>
>                 Key: JBIDE-18592
>                 URL: https://issues.jboss.org/browse/JBIDE-18592
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: cdi
>    Affects Versions: 4.2.0.CR2
>            Reporter: Arun Gupta
>            Assignee: Alexey Kazakov
>             Fix For: 4.2.1.Final, 4.3.0.Alpha1
>
>
> - Create a Dynamic Web Project
> - Add the following interface:
> public interface Greeting {
> 	public String sayHello();
> }
> - And the implementation:
> @Dependent
> @Named
> public class SimpleGreeting implements Greeting {
> 	@Override
> 	public String sayHello() {
> 		// TODO Auto-generated method stub
> 		return "Hello";
> 	}
> }
> - Enable JSF facet
> - Create .xhtml page as:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:ui="http://java.sun.com/jsf/facelets"
>       xmlns:f="http://java.sun.com/jsf/core"
>       xmlns:h="http://java.sun.com/jsf/html"> 
> <h:head></h:head> 
> <body> 
> <h:outputText value="#{}" />
> </body> 
> </html>
> No code completion in #{}. Changing @Named to @ManagedBean works.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jbosstools-issues mailing list