适用于STS 4的JSF编辑器自动完成(xhtml) [英] JSF editor autocomplete (xhtml) for STS 4

查看:120
本文介绍了适用于STS 4的JSF编辑器自动完成(xhtml)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事PrimeFaces(6.2)项目.

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

我想开始使用 Spring Tool Suite(STS)4 ,但是我很早就意识到这是无法像以前在STS 3中那样工作.似乎缺少对JSF的支持,因此自动完成功能不适用于xhtml源文件.

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.

这个答案是一个灵感,我发现,STS 3中的相同项目方面看起来像这样:

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

而对于STS 4来说是相同的

while the same for STS 4 is

这似乎是缺少自动完成功能的根本原因.

which seems like root cause for missing autocomplete.

我不知道该如何解决.

我以前做什么

  1. 下载了STS
  2. 下载项目(从SVN,Git等)
  3. 运行mvn clean install
  4. 运行mvn eclipse:eclipse(以准备Eclipse项目)
  5. 将项目导入Eclipse(STS)
  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)

就是这样.它已经准备好了,但是对于STS 4却不起作用.

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

作为一个易于启动的项目(PrimeFaces + Spring Boot),我喜欢

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

其他信息

我通过Eclipse Marketplace搜索WST安装了JST工具(由于有JSF和JSP支持,因此选择一种用于Java EE).

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

在确认选定的功能时,我按建议选择了JSF Tools-Web Page Editor ...

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

最后,项目方面与STS 3中不同(我删除了.setting/.classpath.project并再次执行了mvn eclipse:eclipse)

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.

推荐答案

在Eclipse中, JSF 不是通过STS,而是通过

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

要获得Spring和JSF的支持,请将STS 4安装到 用于企业Java开发人员的Eclipse IDE (其中包含 Eclipse JSF Tools ).安装 Eclipse Java EE开发人员工具 集成到具有STS 4但不提供JSF支持的Eclipse IDE中.

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.

这篇关于适用于STS 4的JSF编辑器自动完成(xhtml)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆