'STS4 - No content assist in application.properties

Just watched the new Video Getting Super Productive with Spring Tools 4 and Spring Boot 2. Wanted to test the content assist in application.properties under STS4 and it doesn't work.

When I press ctrl+space there is nothing.

Tags should be spring-tools-4. But I don't have enough reputation to create it.



Solution 1:[1]

This works for me:

  1. Right-click on application*{-yourProfile}*.properties
  2. Open With
  3. Other
  4. Generic Editor - Spring Properties
  5. Click Ok
  6. A "Spring-ish" leaf icon will appear besides the file-name and auto-complete/content-assist will now be available.

Solution 2:[2]

try to open this properties file as "Generic Editor - Spring properties"

right-click on file > open with> Generic Editor - Spring properties (or "other" if it not displayed in the list)

Solution 3:[3]

This image response is to support the question, I am facing the same Issue: Looking for solution.

enter image description here

App Run fine but we see these red swiggly lines in application.properties file like below enter image description here

Preferences enter image description here enter image description here

Solution 4:[4]

go to Window -> Preferences (for windows).

Java > Editor > Content Assist : Auto Activation - [checkbox] enable auto activation

Java > Editor > Content Assist > Advanced : select the proposal types - select the checkbox against "Java Proposals"

That's it.

Solution 5:[5]

I have the same problem with my properties/yaml files in STS4. After some researches, I found out, the STS4, uses a language server for code assist/completion which is broken or there is a communication issue with it.

The best solution is to stop using STS4 altogether. Use the more stable version which is STS3 instead.

Update: After I changed the STS's java runtime from 8 to 11 everything fixed.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Y.M.
Solution 3
Solution 4 Partha Mishra
Solution 5