-
Notifications
You must be signed in to change notification settings - Fork 173
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
Render Gradle problem reports as Eclipse error markers #1306
Conversation
eddc018
to
1425085
Compare
private void reportProblem(SingleProblemEvent event) { | ||
List<Location> locations = event.getLocations(); | ||
|
||
// 1/4 offset in file location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make this bit a bit cleaner; let's discuss details.
@reinsch82 I'm interested in your initial feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial feedback :)
Thanks for the work
...ildship.core/src/main/java/org/eclipse/buildship/core/internal/marker/GradleErrorMarker.java
Show resolved
Hide resolved
...ava/org/eclipse/buildship/core/internal/util/progress/ProblemsReportingProgressListener.java
Outdated
Show resolved
Hide resolved
...ava/org/eclipse/buildship/core/internal/util/progress/ProblemsReportingProgressListener.java
Outdated
Show resolved
Hide resolved
...ava/org/eclipse/buildship/core/internal/util/progress/ProblemsReportingProgressListener.java
Outdated
Show resolved
Hide resolved
3bc0216
to
51d75cd
Compare
ab76b10
to
8cd62b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 minor comments
LGTM
@@ -33,14 +33,14 @@ class WorkspaceConfigurationTest extends WorkspaceSpecification { | |||
} | |||
|
|||
@Rollup | |||
def "Can save workpsace configuration"(GradleDistribution distribution, String gradleUserHome, String javaHome, boolean offlineMode, boolean buildScansEnabled, boolean autoSync, List args, List jvmArgs, boolean showConsole, boolean showExecutions, moduleSupportEnabled) { | |||
def "Can save workspace configuration"(GradleDistribution distribution, String gradleUserHome, String javaHome, boolean offlineMode, boolean buildScansEnabled, boolean autoSync, List args, List jvmArgs, boolean showConsole, boolean showExecutions, moduleSupportEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I guess that should be there
def "Can save workspace configuration"(GradleDistribution distribution, String gradleUserHome, String javaHome, boolean offlineMode, boolean buildScansEnabled, boolean autoSync, List args, List jvmArgs, boolean showConsole, boolean showExecutions, moduleSupportEnabled) { | |
def "Can save workspace configuration"(GradleDistribution distribution, String gradleUserHome, String javaHome, boolean offlineMode, boolean buildScansEnabled, boolean autoSync, List args, List jvmArgs, boolean showConsole, boolean showExecutions, boolean moduleSupportEnabled) { |
} | ||
|
||
public static int countLines(String str) { | ||
return Lists.newArrayList(Splitter.on(System.lineSeparator()).split(str)).size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Maybe?
return Lists.newArrayList(Splitter.on(System.lineSeparator()).split(str)).size(); | |
return Splitter.on(System.lineSeparator()).splitToList(str).size(); |
06bb0ed
to
0866650
Compare
The Gradle Tooling API now exposes problem reports via Tooling API events. This change implements a listener consuming problem events an converting them to Eclipse error markers.
The feature is not enabled by default. Users need to explicitly opt-in for the time being.
Reported problems show up in the Eclipse Problems view under the
Gradle Problem
type. The reports are cleared and recreated for every build invocation (sync and task execution).The error marker has a custom properties page with the report details. Documentation links are navigable and there's a button for copying the stacktrace, just like on the generic Eclipse marker properties page.
Tasks