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

Skip default project when detecting lombok #2633

Merged
merged 2 commits into from
Aug 18, 2022

Conversation

jdneo
Copy link
Collaborator

@jdneo jdneo commented Aug 17, 2022

Signed-off-by: Sheng Chen sheche@microsoft.com

Signed-off-by: Sheng Chen <sheche@microsoft.com>
@rgrunber
Copy link
Member

rgrunber commented Aug 17, 2022

Change looks good to me so can definitely be merged.

However I noticed a few instances where we verify if one of the project URIs (often from java.project.getAll) is the default java project :

const projectUris: string[] = await commands.executeCommand<string[]>(Commands.EXECUTE_WORKSPACE_COMMAND, Commands.GET_ALL_JAVA_PROJECTS);
if (projectUris.length === 0 || (projectUris.length === 1 && projectUris[0].includes("jdt.ls-java-project"))) {

fsPath.startsWith(this.storagePath) && fsPath.indexOf("jdt.ls-java-project") > -1;

const projectPath = Uri.parse(uriString).fsPath;
if (path.basename(projectPath) === "jdt.ls-java-project") {

It might be nice to provide some utility method that checks this.

@jdneo
Copy link
Collaborator Author

jdneo commented Aug 18, 2022

However I noticed a few instances where we verify if one of the project URIs (often from java.project.getAll) is the default java project

Let me append one more commit in this PR to extract the utility.

Signed-off-by: Sheng Chen <sheche@microsoft.com>
Copy link
Collaborator

@testforstephen testforstephen left a comment

Choose a reason for hiding this comment

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

LGTM

@rgrunber rgrunber merged commit ab3e745 into redhat-developer:master Aug 18, 2022
@rgrunber rgrunber added this to the End August 2022 milestone Aug 18, 2022
@rgrunber rgrunber added the bug label Aug 18, 2022
@jdneo jdneo deleted the cs/lombok branch August 19, 2022 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants