I have a simple project configured with the pom.xml file that I copy below. The problem is that Spring Tool Suite 4.9.0.RELEASE does not suggests automplete for classes nor methods from JUnit library. If I write code like this one:
Assert.assertEquals(text_1, text_2);
It compiles and works, but if I put the mouse cursor right after the dot after Assert
and press Ctrl . "No default proposal" message is shown. With other classes out of JUnit autocomplete suggestions works fine.
I checked configuration as proposed in other questions but none fixes this issue.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.microservices</groupId>
<artifactId>Module</artifactId>
<version>1.0.0</version>
<name>module</name>
<description>Module tools</description>
<properties>
<springframework.version>2.1.4.RELEASE</springframework.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>
${project.name}
</finalName>
</build>
</project>
CodePudding user response:
Removing .metadata
and .settings
folders along with .project
and .classpath
files seems to have resolved the issue (in addition to reboot Eclipse and import projects again).
This way I also lost launch configurations, etc.