0

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:

STS 3 PrimeFaces project facets

while the same for STS 4 is

STS 4 PrimeFaces project facets

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).

Eclipse Java EE Developer Tools 3.11 in Eclipse Marketplace

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)

PrimeFaces project facets in STS 4 after WTP

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

Betlista
  • 10,327
  • 13
  • 69
  • 110
  • 2
    In Eclipse JSF is supported not via STS, but via [Eclipse WTP](https://www.eclipse.org/webtools/jsf/main.php). Does _Help > Install New Software..._, work with `http://download.eclipse.org/releases/latest/` and install _JSF Tools_ and _JSF Tools - Web Page Editor_ fix your issue? – howlger Dec 27 '18 at 10:24
  • And since plain java is not even configured as a facet, pay attention to the config of facets in general. – Kukeltje Dec 27 '18 at 10:38
  • @howlger you are correct I found the same in parallel, I was just confused, that it worked differently with new STS version, seems like it is not based on Eclipse for Java EE, but just for Java. Please add it as an answer, so I can upvote and mark as solved ;-) – Betlista Dec 27 '18 at 10:46
  • 1
    Yes, STS 4 is more decoupled from Eclipse than STS 3 by using [LTS](https://en.wikipedia.org/wiki/Language_Server_Protocol). – howlger Dec 27 '18 at 11:00

1 Answers1

3

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.

howlger
  • 31,050
  • 11
  • 59
  • 99
  • 1
    I installed via Eclipse Marketplace - Eclipse Java EE Developer Tools 3.11, but should be the same. – Betlista Dec 27 '18 at 11:01
  • Yes, it's the same thing. Since it is easier, I have changed my answer accordingly. Thank you for the comment. – howlger Dec 27 '18 at 11:09