EL proposals / autocomplete / code assist in Facelets with Eclipse

删除回忆录丶 提交于 2019-11-26 01:02:18

问题


I tried to activate EL proposals in a Facelets page, but when I hit Ctrl+Space, it doesn\'t work. I managed to activate JSF tag proposals thank to other questions, but EL proposals aren\'t working.

How can I activate this feature in Eclipse? Is it a known issue?

For example:

<h:inputHidden id=\"id\" value=\"#{Ctrl+Space not working!}\"/>

回答1:


Eclipse doesn't support this out the box. Even the support in JSP is very limited. Only the properties of <jsp:useBean> and managed beans hardcoded as <managed-bean> in faces-config.xml are available by autocomplete. There are however plugins which supports EL autocomplete on @ManagedBean and @Named beans.

For example, the JBoss Tools plugin (specifically the CDI feature) which can be installed as described here: How do I Install JBoss AS / WildFly Server in Eclipse for Java EE.

(which has in its current 3.2.0 version unicode bugs, as you see above in the rightmost window)

You can even use Ctrl+Click on the managed bean name #{bean} in an EL expression in Facelets file to navigate to the concrete backing bean class. You can also use Ctrl+Shift+G on the managed bean method in a backing bean class to find all references to the particular property or action in Facelets files.

The Aptana plugin is told to work fine for EL proposals in JSPs, but I am not sure for Facelets. I didn't had good experiences with installing and configuring the plugin for JSP some years ago.

See also:

  • Properties of new tags using composite component are not displayed by Eclipse auto complete shortcurt


来源:https://stackoverflow.com/questions/6276254/el-proposals-autocomplete-code-assist-in-facelets-with-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!