eclipse Ecplise autocomplete primefaces 标签
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4060600/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Ecplise autocomplete primefaces tags
提问by Dejell
I am using Eclipse to work with PrimeFaces like this:
我正在使用 Eclipse 来处理 PrimeFaces,如下所示:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
template="/template/ui.xhtml">
I saw Bozho question and answer.
我看到了Bozho问答。
So it works for me only for h and f tags and not for p (primefaces) tag! How can it autocomplete primefaces tag?
所以它只适用于 h 和 f 标签而不适用于 p (primefaces) 标签!它如何自动完成 primefaces 标签?
采纳答案by Cagatay Civici
I've blogged about Helios support, that might help;
我写过关于 Helios 支持的博客,这可能会有所帮助;
http://cagataycivici.wordpress.com/2010/08/31/primefaces-support-in-eclipse-helios/
http://cagataycivici.wordpress.com/2010/08/31/primefaces-support-in-eclipse-helios/
回答by Ronaldo Campos
I had the same problem and none of the solutions posted solved (i already had primefaces jar in my classpath).
我遇到了同样的问题,但发布的解决方案都没有解决(我的类路径中已经有 primefaces jar)。
I use a eclipse project format, and in the .settings folder, the file "org.eclipse.wst.common.project.facet.core.xml" had this properties:
我使用 eclipse 项目格式,在 .settings 文件夹中,文件“org.eclipse.wst.common.project.facet.core.xml”具有以下属性:
<installed facet="jst.jsf" version="1.2"/>
<installed facet="jst.web" version="2.5"/>
I changed to:
我改为:
<installed facet="jst.jsf" version="2.0"/>
<installed facet="jst.web" version="3.0"/>
And it worked. Sure it was a wrong configuration, but can be useful to someone. Ps: these properties can be changed in project facets on eclipse project properties, but in some cases it′s better change directly in the file.
它奏效了。当然这是一个错误的配置,但可能对某人有用。Ps:这些属性可以在eclipse项目属性的project facets中更改,但在某些情况下,最好直接在文件中更改。
回答by user2405804
By default we don't get automcomplete for PrimeFaces tag in Eclipse. To enable AutoComplete, Go to Window-->Preferences-->General-->ContentTypes Select JSP and add .xhtml as file association.
默认情况下,我们不会在 Eclipse 中自动完成 PrimeFaces 标记。要启用自动完成,请转至 Window-->Preferences-->General-->ContentTypes 选择 JSP 并添加 .xhtml 作为文件关联。