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

Support Gradle invalid type code error check #2082

Merged
merged 3 commits into from
May 25, 2022

Conversation

CsCherrYY
Copy link
Contributor

related to redhat-developer/vscode-java#2442, more details can be found in that PR.

Signed-off-by: Shi Chen [email protected]

@CsCherrYY
Copy link
Contributor Author

test this please


public static final GradleDistribution DEFAULT_DISTRIBUTION = GradleDistribution.forVersion(GradleVersion.current().getVersion());

public static final String IMPORTING_GRADLE_PROJECTS = "Importing Gradle project(s)";

public static final String COMPATIBILITY_MARKER_ID = IConstants.PLUGIN_ID + ".gradlecompatibilityerrormarker";
public static final String GRADLE_UPGRADE_WRAPPER_MARKER_ID = IConstants.PLUGIN_ID + ".gradleupgradewrappermarker";

public static final String GRADLE_INVALID_TYPE_CODE_MESSAGE = "Exact exceptions are not shown due to an outdated Gradle version, please consider to update your Gradle version.";
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd explicitly tell user what Gradle version is required.

For example, change the message to "Exact exceptions are not shown due to a lower Gradle version, please consider to update your Gradle version to 7.2 and above."

@@ -539,4 +599,16 @@ public GradleCompatibilityInfo(String projectPath, String message, String highes
this.recommendedGradleVersion = recommendedGradleVersion;
}
}

private class UpgradeGradleWrapperInfo implements Serializable {
Copy link
Contributor

Choose a reason for hiding this comment

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

what's purpose to implements Serializable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The UpgradeGradleWrapperInfo objects will be passed to the client side. But it seems other classes like AccessorField didn't implement Serializable and they work well. Seems redundant under LSP?

Copy link
Contributor

Choose a reason for hiding this comment

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

lsp4j is using Gson library to serialize a class to json, no need of Serializable interface.

Signed-off-by: Shi Chen <[email protected]>
Signed-off-by: Shi Chen <[email protected]>
Copy link
Contributor

@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

@testforstephen testforstephen merged commit 993c3eb into eclipse-jdtls:master May 25, 2022
@testforstephen testforstephen added this to the Early June 2022 milestone May 25, 2022
@CsCherrYY CsCherrYY deleted the cs-gradlebug branch May 31, 2022 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants