使用 Eclipse 的 Facelets 中的 EL 建议/自动完成/代码辅助 [英] EL proposals / autocomplete / code assist in Facelets with Eclipse
问题描述
我尝试在 Facelets 页面中激活 EL 提议,但是当我按 Ctrl+Space 时,它不起作用.由于其他问题,我设法激活了 JSF 标签提案,但 EL 提案不起作用.
如何在 Eclipse 中激活此功能?这是一个已知问题吗?
例如:
Eclipse 不支持开箱即用.甚至 JSP 中的支持也非常有限.只有
的属性和 faces-config.xml
中硬编码为
的托管 bean 可用通过自动完成.然而,有一些插件支持 @ManagedBean
和 @Named
bean 上的 EL 自动完成.
例如,被告知可以很好地用于 JSP 中的 EL 提案,但我不确定小脸.几年前,我在为 JSP 安装和配置插件方面没有很好的经验.
另见:
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!}"/>
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:
这篇关于使用 Eclipse 的 Facelets 中的 EL 建议/自动完成/代码辅助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!