9

I'm trying to use Spring Tool Suite 4 with Eclipse Oxygen, but the Auto Complete / Content Assist features specific to Spring Tool Suite do not seem to be present. The normal eclipse content assist appears, but nothing specific to STS will appear.

I followed some of the other helpful posts on StackOverflow, and was pointed to make sure that the Spring proposal kinds in Preferences -> Java -> Editor -> Content Assist -> Advanced are selected. However, upon doing this I discovered that there are no Spring proposal kinds in that section. I am using STS 4, but for some reason the proposal kinds do not appear in that list.

How can I fix this and get content assist / autocomplete to work for Spring Tool Suite 4?

Note: I have tried the solutions for the following StackOverflow articles, but none of them have worked for one reason or another. They all seem to assume that the proposal kinds are present where they should be. Content autocomplete in spring tool suite 4 Eclipse Spring Tools missing content assist/ autocomplete Spring tool suite can not automatically show fields variable name suggest?

Here's the list of what appears in for the proposal kinds in my IDE - note that no Spring related options appear.

screenshot

Alex A
  • 521
  • 1
  • 4
  • 16

9 Answers9

32

While upgrading from lower version to sts-4 faced the same issue.

Found this thread and followed the instruction given by vvalencia-cl then the issue got fixed. https://github.com/spring-projects/sts4/issues/82

Solution :

Go to Preferences -> Java -> Editor -> Content Assist -> Advanced, and enabled:

  • Java Proposals
  • Java Type Proposals

and then click Apply and close

enter image description here

Chandra
  • 1,722
  • 16
  • 19
6

Go to Window tab at the top -> Preferences -> Java -> Editor -> Content Assist. Now find Auto activation triggers for Java usually at the bottom and now in its textbox paste the following value:

.@(#&$abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
yu.pitomets
  • 1,660
  • 2
  • 17
  • 44
Prajwal
  • 61
  • 1
  • 2
2

Check this: for Spring Tool Suite 4

window - preferences - general - key

enter image description here

After press (ctrl+space) for view options

Nitin Bisht
  • 5,053
  • 4
  • 14
  • 26
Elu Ramos
  • 31
  • 2
1

I discovered that this was implemented in Spring Tool Suite 3.9, but is not implemented in Spring Tool Suite 4. That is the cause of this issue.

https://github.com/spring-projects/sts4/issues/107

Alex A
  • 521
  • 1
  • 4
  • 16
1

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

For STS 4 install the Eclipse Java EE Developer Tools through Eclipse Marketplace.

While installing select check boxes (I guess 3 check boxes) related to JSF Tools.

Harshal_Kalavadiya
  • 312
  • 1
  • 5
  • 15
0

The problem might be that your MavenProject doesn't contain Spring-Context jar... downlode the jar from here

1)   https://mvnrepository.com/artifact/org.springframework/spring-context


or simply copy this in POM.xml file-


<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
     <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>4.3.18.RELEASE</version>

note- make sure you are choosing dependency (SPRING-CORE) and (SPRING-CONTEXT) of same version.

0

Just add Thymeleaf Processor Proposal to default content assist list.

  1. Go to Preference -> Web -> Editor -> Content Assist.
  2. Add Thymeleaf processor proposal from bottom box to default box just above it with help of 'up' button.
  3. Make sure your xml namespace doesn't contain http secure protocol. (it should be http://www.thymeleaf.org)

Example here:

Reference Screenshot

This worked for me. Hope it helps! Happy Coding

Shivani P
  • 1
  • 2
0

Go to Window -> Preferences -> Java -> Editor -> Content Assist Now find Auto something like activation triggers for Java (at the bottom) and set the value as:

.@(#&$abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

Also, make sure in the content assist there is one advance tab in which Java Type proposals and Java proposals should be checked.

0

Please proceed with the below steps :

1 ) Window tab
2 ) Preferences - > Java -> Editor-> Content Assist 3 ) Make the following changes as shown in the below screens

enter image description here enter image description here

Lova Chittumuri
  • 2,994
  • 1
  • 30
  • 33