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

enable syntax mode when importing a partial folder of maven/gradle project #1364

Merged
merged 1 commit into from
Mar 30, 2020

Conversation

testforstephen
Copy link
Contributor

Signed-off-by: Jinbo Wang [email protected]

Fix redhat-developer/vscode-java#1275

When opening a partial folder from a maven/gradle project, because the classpath is incomplete, will report syntax errors only.

@fbricon
Copy link
Contributor

fbricon commented Mar 4, 2020

@testforstephen can you please fix the merge conflict?

@testforstephen
Copy link
Contributor Author

PR updated.

IPath srcPath = sourcePath.removeLastSegments(segments.size() -1 - index);
IPath container = srcPath.removeLastSegments(1);
return container.append("pom.xml").toFile().exists()
|| container.append("build.gradle").toFile().exists();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super fan of hardcoding Maven and Gradle specific things here, I think we can improve that by decoupling Build files discovery from the InvisibleProjectImporter, but it'll do for now

@fbricon fbricon merged commit 7ba96eb into eclipse-jdtls:master Mar 30, 2020
@fbricon fbricon added this to the End March 2020 milestone Mar 30, 2020
@testforstephen testforstephen deleted the jinbo_syntaxmode branch March 31, 2020 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable syntax mode when opening a sub folder of a maven/gradle project
2 participants