redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.05k stars 420 forks source link

Spring Boot Tools extension may conflict with Java extension #3669

Closed zjwmiao closed 2 weeks ago

zjwmiao commented 3 weeks ago
Environment
Steps To Reproduce
  1. Just open a Java project
Current Result

ext Line 3 and 4, the imports should be green Line 10, the color of args is incorrect as well

Expected Result
Additional Informations
rgrunber commented 3 weeks ago

I'm assuming you imported this as a Gradle project ? Can you check your problems view and see if there are any errors ?

I tried with a sample project and ran into https://github.com/eclipse-jdtls/eclipse.jdt.ls/issues/1743 .

Status WARNING: org.eclipse.buildship.core code=4 Synchronize project initial failed due to an unsupported configuration in the referenced Gradle build. org.eclipse.buildship.core.internal.UnsupportedConfigurationException: A project with the name spring-boot already exists.
zjwmiao commented 3 weeks ago

I'm assuming you imported this as a Gradle project ? Can you check your problems view and see if there are any errors ?

I tried with a sample project and ran into eclipse-jdtls/eclipse.jdt.ls#1743 .

Status WARNING: org.eclipse.buildship.core code=4 Synchronize project initial failed due to an unsupported configuration in the referenced Gradle build. org.eclipse.buildship.core.internal.UnsupportedConfigurationException: A project with the name spring-boot already exists.

Thanks for your reply, I opened the folder as a maven project, all the functionalities are OK, but the syntax highlighting is weird.

Just found out that the problem is caused by Spring Boot Tools extension, the syntax highlight become normal as soon as I disable the Spring Boot Tools extension.

rgrunber commented 3 weeks ago

It might be worth filing the issue at https://github.com/spring-projects/sts4/issues if it happens when the VS Code Sprint Boot Tools extension happens to be present. The extension does contribute into the JDT-LS runtime : https://github.com/spring-projects/sts4/blob/d779a8466c4c261d699f49bcbb9dddbe217c0e89/vscode-extensions/vscode-spring-boot/package.json#L31-L38 .

zjwmiao commented 3 weeks ago

It might be worth filing the issue at https://github.com/spring-projects/sts4/issues if it happens when the VS Code Sprint Boot Tools extension happens to be present. The extension does contribute into the JDT-LS runtime : https://github.com/spring-projects/sts4/blob/d779a8466c4c261d699f49bcbb9dddbe217c0e89/vscode-extensions/vscode-spring-boot/package.json#L31-L38 .

OK, I found a issue about the same problem in their repository. https://github.com/spring-projects/sts4/issues/1249

rgrunber commented 2 weeks ago

Looks like this should be fixed (according to the referenced issue), so I'll close for now.