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

Improve the mechanism to resolve the package name for empty java file #950

Merged
merged 1 commit into from
Mar 14, 2019

Conversation

testforstephen
Copy link
Contributor

@testforstephen testforstephen commented Mar 5, 2019

Signed-off-by: Jinbo Wang jinbwan@microsoft.com

Fixes redhat-developer/vscode-java#750

Follow the priority below to infer the package name for an empty java file.

  1. Try to search whether a nearby non-empty java file exists in the same directory. If so, use the nearby non-empty file to compute the package name.
  2. Try to find whether the java file is under src folder. If so, compute the package name beginning from the src path.
  3. Compute the relative path with the workspaceRoot and use that as the package name.

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
@fbricon fbricon merged commit b39107e into eclipse-jdtls:master Mar 14, 2019
@fbricon
Copy link
Contributor

fbricon commented Mar 14, 2019

Thanks @testforstephen

@fbricon fbricon added this to the Mid March 2019 milestone Mar 14, 2019
@testforstephen testforstephen deleted the jinbo_fixpackageName branch March 15, 2019 01:18
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.

2 participants