Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.project.addToSourcePath command should be allowed in gradle/maven project #964

Closed
Poytr1 opened this issue Mar 19, 2019 · 2 comments
Closed

Comments

@Poytr1
Copy link

Poytr1 commented Mar 19, 2019

This issue is related to #859

https:/eclipse/eclipse.jdt.ls/blob/ca81aa7b935b52c0aff7624fa9f330c832578233/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/commands/BuildPathCommand.java#L45

Currently jdt-langserver doesn't allow users to add folder to source path if the project is a Maven/Gradle project which doesn't make sense.

When I open a source file which isn't included in the build path, there isn't any code intelligence at all. Meanwhile I need to modify the build script to add these source folders.

It will be nice if we have code intelligence on these files(even without auto-build) by adding the folder to source path, or can jdt-langserver just treats them as standalone files?

screenshot:
image

@fbricon
Copy link
Contributor

fbricon commented Apr 4, 2019

For Maven and Gradle project, the "truth" comes from the build descriptor. So adding new source folders from the IDE would likely introduce an impedance mismatch with CLI builds, if those folders are not defined as well. So I'd rather prefer we fixed potential issues with jdt.ls not adding source folders when it should, rather than introduce than providing more ways to users to shoot them in the foot

@rgrunber
Copy link
Contributor

Closing as the discussion can continue on #1954 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants