7

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.

Hesk
  • 307
  • 4
  • 16
  • Hard to say what is going wrong here without any more details. Make sure that your project is a Spring Boot project and has resolved the necessary dependencies, so that the tooling can find them. Attaching a sample project might also help to reproduce this issue. – Martin Lippert Oct 24 '18 at 08:20
  • Works now with STS 4.4.0 – Hesk Feb 18 '20 at 08:01

6 Answers6

6

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.
jumping_monkey
  • 5,941
  • 2
  • 43
  • 58
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)

Y.M.
  • 640
  • 1
  • 7
  • 17
2

Go To

Window -> Preferences -> click on Language Servers -> check all rows -> click on apply

Now it should work.

0

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

Johnny
  • 282
  • 1
  • 15
  • Did anyone figure this out? It looks like I am having the exact same problem with STS 4.1 installed just now. Please help if you know the answer. – cooler Jan 20 '19 at 23:41
0

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.

Mehdi
  • 746
  • 1
  • 10
  • 25
0

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.

Partha Mishra
  • 304
  • 3
  • 10