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

add logs for build workspace errors[default project] #462

Merged
merged 2 commits into from
Nov 27, 2017

Conversation

ansyral
Copy link
Contributor

@ansyral ansyral commented Nov 24, 2017

when building the workspace, diagnositics of errors from default project will be ignored. Add these errors to logs for trouble shooting,

Signed-off-by: xuzho <xuzho@microsoft.com>
StringBuilder builder = new StringBuilder();
String message = marker.getAttribute(IMarker.MESSAGE, "");
String code = String.valueOf(marker.getAttribute(IJavaModelMarker.ID, 0));
builder.append("message:" + message);
Copy link
Contributor

Choose a reason for hiding this comment

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

you need to add some space, new line or a separator between the message attributes


private static String convertMarker(IMarker marker) {
StringBuilder builder = new StringBuilder();
String message = marker.getAttribute(IMarker.MESSAGE, "");
Copy link
Contributor

@fbricon fbricon Nov 24, 2017

Choose a reason for hiding this comment

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

marker.getAttribute(IMarker.MESSAGE, "<no message>");

if (errors.isEmpty()) {
return BuildWorkspaceStatus.SUCCEED;
} else {
// for default project, problem markers aren't sent. Add logs here for trouble shooting.
logError("Met errors while building workspace." + String.join(";", errors));
Copy link
Contributor

@fbricon fbricon Nov 24, 2017

Choose a reason for hiding this comment

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

"Errors occured while building the workspace: "

Signed-off-by: xuzho <xuzho@microsoft.com>
@fbricon fbricon merged commit ee84b78 into eclipse-jdtls:master Nov 27, 2017
@fbricon fbricon added this to the End November 2017 milestone Nov 27, 2017
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.

None yet

2 participants