带有 JSF 的 Eclipse xhtml 自动完成
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14575896/
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
Eclipse xhtml autocomplete with JSF
提问by Moko
recently I was working in a JSF project and a popup poped (lol), my ignorance told me to ignore it and check "Dont ask again" (didnt read it, now I regret it... is there a way I can make the little popup to appear again?), now I cant use autocomplete in the xhtml files, that include html tags and bean tags.
最近我在一个 JSF 项目中工作并且弹出一个弹出窗口(lol),我的无知告诉我忽略它并检查“不要再问”(没有读过它,现在我后悔了......有没有办法让我小弹出窗口再次出现?),现在我无法在 xhtml 文件中使用自动完成功能,其中包括 html 标签和 bean 标签。
I have tried almost everything:
我几乎尝试了所有方法:
- Window > Preferences > General > Content Types > Text > JSP > Add (xhtml) -> Done, still not working.
- Right click on the project -> Preferences -> Project Facets -> Click on "JavaServer Faces", version should most probably be 2.0. -> Also done, still not working.
- Window > Preferences > General > Content Types > Text > JSP > Add (xhtml) -> Done,还是不行。
- 右键单击项目 -> 首选项 -> Project Facets -> 单击“JavaServer Faces”,版本很可能是 2.0。-> 也搞定了,还是不行。
What I still havent do, is this: http://www.mkyong.com/jsf2/eclipse-ide-xhtml-code-assist-is-not-working-for-jsf-tag/
我还没有做的是:http: //www.mkyong.com/jsf2/eclipse-ide-xhtml-code-assist-is-not-working-for-jsf-tag/
Since I dont get the "Further configuration avalaible..." link.
因为我没有得到“进一步的配置可用...”链接。
Im Using Eclipse Indigo Service Release 2 with JSF 2.1 I believe.
我相信我在 JSF 2.1 中使用 Eclipse Indigo Service Release 2。
Also, I have other project in which the autocomplete features are working properly.
此外,我还有其他项目,其中自动完成功能正常工作。
Would appreciate any help, since this is driving me crazy.
感谢任何帮助,因为这让我发疯。
Thanks in advance!
提前致谢!
EDIT: These are my xhtml headers:
编辑:这些是我的 xhtml 标题:
template="../../template/template-operaciones.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
Also, just tried in eclipse, in the project where autocomplete is working, just as I pressed the "." a popup with a progress bar with the text "Building JSF or JSP Model"... if I remember correctly that was the popup which I ignored before, something about JSF Model which I didnt build in the project that it is not working.
另外,刚刚在 Eclipse 中尝试过,在自动完成工作的项目中,就像我按下“。” 一个带有进度条的弹出窗口,文本为“构建 JSF 或 JSP 模型”...如果我没记错的话,那是我之前忽略的弹出窗口,关于我没有在项目中构建的 JSF 模型的一些东西,它不起作用。
回答by Leobons
Had the same problem and tried the same you did and it didn't help. This solved for me:
遇到了同样的问题并尝试了与您相同的方法,但没有帮助。这为我解决了:
Go to project Properties> Java Build Path > Add Library > Select User Library > User Libraries > New > (give it whatever name you want) > Add External JAR > Add the JAR you want (like primefaces-3.5.jar)
转到项目属性> Java构建路径>添加库>选择用户库>用户库>新建>(给它任何你想要的名字)>添加外部JAR>添加你想要的JAR(如primefaces-3.5.jar)