JSF editor autocomplete (xhtml) for STS 4

a 夏天 提交于 2020-01-06 06:44:56

问题


I'm working on a PrimeFaces (6.2) project.

I wanted to start using Spring Tool Suite (STS) 4, but I realized very early that it is not working as it used to in STS 3. Specifically support for JSF seems to be missing and so autocomplete doesn't work with xhtml source files.

This answer was an inspiration and I found, that same project facets in STS 3 looks like:

while the same for STS 4 is

which seems like root cause for missing autocomplete.

I have no idea how to fix that.

What I used to do

  1. downloaded STS
  2. download the project (from SVN, Git, ...)
  3. run mvn clean install
  4. run mvn eclipse:eclipse (to prepare Eclipse project)
  5. import project to Eclipse (STS)

and that was it. It was ready, but the same is not working for STS 4.

As an easy-to-start-with project (PrimeFaces + Spring Boot) I like JSF PrimeFaces HelloWorld

Additional info

I installed JST Tools via Eclipse Marketplace searching for WST (select the one for Java EE as there is JSF and JSP support).

On Confirm Selected Features I selected JSF Tools - Web Page Editor as proposed...

At the end the project facets are not the same as in STS 3 (I deleted .setting/, .classpath, .project and executed mvn eclipse:eclipse again)

but code completion is working, so I'm fine.


回答1:


In Eclipse JSF is supported not via STS, but via the Eclipse WTP JavaServer Faces (JSF) Tools.

For Spring and JSF support install STS 4 into the Eclipse IDE for Enterprise Java Developers (which contains Eclipse JSF Tools) or install the Eclipse Java EE Developer Tools into an Eclipse IDE with STS 4 but without JSF support.



来源:https://stackoverflow.com/questions/53942884/jsf-editor-autocomplete-xhtml-for-sts-4

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