Spring Tool Suite AutoComplete / Content Assist not working - No proposal kinds present in settings

Viewed 25926

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

8 Answers

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

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

Check this: for Spring Tool Suite 4

window - preferences - general - key

enter image description here

After press (ctrl+space) for view options

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.

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

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.

Related