diff --git a/Launch Buildship.launch b/Launch Buildship.launch
index 0cc0ea2da..525a768a3 100644
--- a/Launch Buildship.launch
+++ b/Launch Buildship.launch
@@ -18,11 +18,12 @@
+
-
+
-
+
diff --git a/gradle.properties b/gradle.properties
index f0f0c3c63..e46689f11 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +1,5 @@
# production library version numbers
-toolingApiVersion=8.1.1
+toolingApiVersion=8.6
# testing library version numbers
guavaVersion=33.0.0
diff --git a/org.eclipse.buildship.compat/META-INF/MANIFEST.MF b/org.eclipse.buildship.compat/META-INF/MANIFEST.MF
index 6e3838d8c..c2669c964 100644
--- a/org.eclipse.buildship.compat/META-INF/MANIFEST.MF
+++ b/org.eclipse.buildship.compat/META-INF/MANIFEST.MF
@@ -6,5 +6,5 @@ Bundle-Version: 3.1.10.qualifier
Bundle-Vendor: Eclipse Buildship
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
-Require-Bundle: org.gradle.toolingapi;bundle-version="[8.1.1,8.2.0)";visibility:=reexport
+Require-Bundle: org.gradle.toolingapi;bundle-version="[8.6.0,8.7.0)";visibility:=reexport
Export-Package: org.eclipse.buildship.core.internal.workspace
diff --git a/org.eclipse.buildship.core.test/src/main/groovy/org/eclipse/buildship/core/internal/marker/GradleErrorMarkerTest.groovy b/org.eclipse.buildship.core.test/src/main/groovy/org/eclipse/buildship/core/internal/marker/GradleErrorMarkerTest.groovy
index d4e12ffe6..41cfc6020 100644
--- a/org.eclipse.buildship.core.test/src/main/groovy/org/eclipse/buildship/core/internal/marker/GradleErrorMarkerTest.groovy
+++ b/org.eclipse.buildship.core.test/src/main/groovy/org/eclipse/buildship/core/internal/marker/GradleErrorMarkerTest.groovy
@@ -11,6 +11,10 @@ package org.eclipse.buildship.core.internal.marker
import org.gradle.tooling.BuildException
+import org.eclipse.core.resources.IMarker
+import org.eclipse.core.runtime.IStatus
+
+import org.eclipse.buildship.core.GradleDistribution
import org.eclipse.buildship.core.internal.test.fixtures.ProjectSynchronizationSpecification
class GradleErrorMarkerTest extends ProjectSynchronizationSpecification {
@@ -120,4 +124,35 @@ class GradleErrorMarkerTest extends ProjectSynchronizationSpecification {
findProject('sub')
numOfGradleErrorMarkers == 0
}
+
+
+ def "Convers problem reports to error markers"() {
+ setup:
+ File projectDir = dir('error-marker-test') {
+ file 'build.gradle', '''
+ import org.gradle.api.internal.GradleInternal
+ import org.gradle.api.problems.Problems
+ import org.gradle.api.problems.Severity
+
+ def gradleInternal = gradle as GradleInternal
+ def problems = gradleInternal.services.get(Problems)
+
+ problems.forNamespace("buildscript").reporting {
+ it.label("Problem label")
+ .category('deprecation', 'plugin')
+ .severity(Severity.WARNING)
+ .solution("Please use 'standard-plugin-2' instead of this plugin")
+ }
+ '''
+ }
+
+ when:
+ tryImportAndWait(projectDir)
+
+ then:
+ numOfGradleErrorMarkers == 1
+ gradleErrorMarkers[0].getAttribute(IMarker.MESSAGE) == 'Problem label'
+ gradleErrorMarkers[0].getAttribute(GradleErrorMarker.ATTRIBUTE_PROBLEM_CATEGORY) == 'buildscript:deprecation:plugin'
+
+ }
}
diff --git a/org.eclipse.buildship.core/META-INF/MANIFEST.MF b/org.eclipse.buildship.core/META-INF/MANIFEST.MF
index 5005bf19f..9ec540f6d 100644
--- a/org.eclipse.buildship.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.buildship.core/META-INF/MANIFEST.MF
@@ -16,7 +16,7 @@ Require-Bundle: org.eclipse.core.expressions,
org.eclipse.jdt.junit.core,
org.eclipse.jdt.launching,
org.eclipse.debug.core,
- org.gradle.toolingapi;bundle-version="[8.1.1,8.2.0)";visibility:=reexport,
+ org.gradle.toolingapi;bundle-version="[8.6.0,8.7.0)";visibility:=reexport,
com.google.guava;bundle-version="33.0.0",
com.google.gson;bundle-version="[2.7.0,3.0.0)",
org.eclipse.buildship.compat;visibility:=reexport
diff --git a/org.eclipse.buildship.core/plugin.xml b/org.eclipse.buildship.core/plugin.xml
index d054f1e1e..29ec081e4 100644
--- a/org.eclipse.buildship.core/plugin.xml
+++ b/org.eclipse.buildship.core/plugin.xml
@@ -104,12 +104,14 @@
+
+
withSystemProperties(Map systemPro
this.delegate.withSystemProperties(systemProperties);
return this;
}
+
+ @Override
+ public void setStreamedValueListener(StreamedValueListener listener) {
+ this.delegate.setStreamedValueListener(listener);
+ }
}
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/DefaultGradleBuild.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/DefaultGradleBuild.java
index cc7eda97b..0a774cdc9 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/DefaultGradleBuild.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/DefaultGradleBuild.java
@@ -328,7 +328,7 @@ public GradleConnectionOperation(Function action
@Override
public void runInToolingApi(CancellationTokenSource tokenSource, IProgressMonitor monitor) throws Exception {
// TODO (donat) use AutoCloseable once we update to Tooling API 5.0
- ProjectConnection connection = IdeAttachedProjectConnection.newInstance(tokenSource, getGradleArguments(), monitor);
+ ProjectConnection connection = IdeAttachedProjectConnection.newInstance(tokenSource, getGradleArguments(), DefaultGradleBuild.this, monitor);
if (isSynchronizing()) {
connection = new CachingProjectConnection(connection, DefaultGradleBuild.this.projectConnectionCache);
}
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/configuration/WorkspaceConfiguration.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/configuration/WorkspaceConfiguration.java
index aa7ace72d..2014cdd9f 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/configuration/WorkspaceConfiguration.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/configuration/WorkspaceConfiguration.java
@@ -35,12 +35,13 @@ public final class WorkspaceConfiguration {
private final boolean showConsoleView;
private final boolean showExecutionsView;
private final boolean experimentalModuleSupportEnabled;
+ private final boolean problemsApiSupportEnabled;
public WorkspaceConfiguration(GradleDistribution gradleDistribution, File gradleUserHome,
File javaHome, boolean gradleIsOffline, boolean buildScansEnabled,
boolean autoSync, List arguments,
List jvmArguments, boolean showConsoleView,
- boolean showExecutionsView, boolean experimentalModuleSupportEnabled) {
+ boolean showExecutionsView, boolean experimentalModuleSupportEnabled, boolean problemApiSupportEnabled) {
this.gradleDistribution = gradleDistribution;
this.gradleUserHome = gradleUserHome;
this.javaHome = javaHome;
@@ -52,6 +53,7 @@ public WorkspaceConfiguration(GradleDistribution gradleDistribution, File gradle
this.showConsoleView = showConsoleView;
this.showExecutionsView = showExecutionsView;
this.experimentalModuleSupportEnabled = experimentalModuleSupportEnabled;
+ this.problemsApiSupportEnabled = problemApiSupportEnabled;
}
public GradleDistribution getGradleDistribution() {
@@ -100,6 +102,11 @@ public boolean isExperimentalModuleSupportEnabled() {
return this.experimentalModuleSupportEnabled;
}
+
+ public boolean isProblemsApiSupportEnabled() {
+ return this.problemsApiSupportEnabled;
+ }
+
@Override
public boolean equals(Object obj) {
if (obj instanceof WorkspaceConfiguration) {
@@ -114,13 +121,14 @@ public boolean equals(Object obj) {
&& Objects.equal(this.jvmArguments, other.jvmArguments)
&& Objects.equal(this.showConsoleView, other.showConsoleView)
&& Objects.equal(this.showExecutionsView, other.showExecutionsView)
- && Objects.equal(this.experimentalModuleSupportEnabled, other.experimentalModuleSupportEnabled);
+ && Objects.equal(this.experimentalModuleSupportEnabled, other.experimentalModuleSupportEnabled)
+ && Objects.equal(this.problemsApiSupportEnabled, other.problemsApiSupportEnabled);
}
return false;
}
@Override
public int hashCode() {
- return Objects.hashCode(this.gradleDistribution, this.gradleUserHome, this.javaHome, this.gradleIsOffline, this.buildScansEnabled, this.autoSync, this.arguments, this.jvmArguments, this.showConsoleView, this.showExecutionsView, this.experimentalModuleSupportEnabled);
+ return Objects.hashCode(this.gradleDistribution, this.gradleUserHome, this.javaHome, this.gradleIsOffline, this.buildScansEnabled, this.autoSync, this.arguments, this.jvmArguments, this.showConsoleView, this.showExecutionsView, this.experimentalModuleSupportEnabled, this.problemsApiSupportEnabled);
}
}
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/configuration/WorkspaceConfigurationPersistence.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/configuration/WorkspaceConfigurationPersistence.java
index bd26a5c63..1112ab00f 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/configuration/WorkspaceConfigurationPersistence.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/configuration/WorkspaceConfigurationPersistence.java
@@ -44,6 +44,7 @@ final class WorkspaceConfigurationPersistence {
private static final String SHOW_CONSOLE_VIEW = "show.console.view";
private static final String SHOW_EXECUTIONS_VIEW = "show.executions.view";
private static final String EXPERIMENTAL_ENABLE_MODULE_SUPPORT = "experimental.module.support";
+ private static final String PROBLEMS_API_SUPPORT = "problems.api.support";
public WorkspaceConfiguration readWorkspaceConfig() {
IEclipsePreferences preferences = getPreferences();
@@ -72,8 +73,8 @@ public WorkspaceConfiguration readWorkspaceConfig() {
boolean showConsoleView = preferences.getBoolean(SHOW_CONSOLE_VIEW, true);
boolean showExecutionsView = preferences.getBoolean(SHOW_EXECUTIONS_VIEW, true);
boolean moduleSupport = preferences.getBoolean(EXPERIMENTAL_ENABLE_MODULE_SUPPORT, false);
-
- return new WorkspaceConfiguration(distribution, gradleUserHome, javaHome, offlineMode, buildScansEnabled, autoSyncEnabled, arguments, jvmArguments, showConsoleView, showExecutionsView, moduleSupport);
+ boolean problemsApiSupport = preferences.getBoolean(PROBLEMS_API_SUPPORT, true);
+ return new WorkspaceConfiguration(distribution, gradleUserHome, javaHome, offlineMode, buildScansEnabled, autoSyncEnabled, arguments, jvmArguments, showConsoleView, showExecutionsView, moduleSupport, problemsApiSupport);
}
public void saveWorkspaceConfiguration(WorkspaceConfiguration config) {
@@ -98,6 +99,7 @@ public void saveWorkspaceConfiguration(WorkspaceConfiguration config) {
preferences.putBoolean(SHOW_CONSOLE_VIEW, config.isShowConsoleView());
preferences.putBoolean(SHOW_EXECUTIONS_VIEW, config.isShowExecutionsView());
preferences.putBoolean(EXPERIMENTAL_ENABLE_MODULE_SUPPORT, config.isExperimentalModuleSupportEnabled());
+ preferences.putBoolean(PROBLEMS_API_SUPPORT, config.isProblemsApiSupportEnabled());
try {
preferences.flush();
} catch (BackingStoreException e) {
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/gradle/GradleProgressAttributes.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/gradle/GradleProgressAttributes.java
index e1f4ee31f..9b8f7e297 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/gradle/GradleProgressAttributes.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/gradle/GradleProgressAttributes.java
@@ -11,12 +11,13 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.util.EnumSet;
import java.util.List;
-
import org.gradle.tooling.CancellationToken;
import org.gradle.tooling.CancellationTokenSource;
import org.gradle.tooling.LongRunningOperation;
import org.gradle.tooling.ProgressListener;
+import org.gradle.tooling.events.OperationType;
import com.google.common.base.Preconditions;
import com.google.common.base.StandardSystemProperty;
@@ -32,6 +33,8 @@
import org.eclipse.buildship.core.internal.console.ProcessStreamsProvider;
import org.eclipse.buildship.core.internal.util.progress.CancellationForwardingListener;
import org.eclipse.buildship.core.internal.util.progress.DelegatingProgressListener;
+import org.eclipse.buildship.core.internal.util.progress.ProblemsReportingProgressListener;
+import org.eclipse.buildship.core.internal.workspace.InternalGradleBuild;
/**
* Holds attributes that are commonly used to handle progress in each Gradle invocation.
@@ -70,7 +73,12 @@ public void applyTo(LongRunningOperation operation) {
operation.addProgressListener(listener);
}
for (org.gradle.tooling.events.ProgressListener listener : this.progressEventListeners) {
- operation.addProgressListener(listener);
+ if (CorePlugin.configurationManager().loadWorkspaceConfiguration().isProblemsApiSupportEnabled()) {
+ operation.addProgressListener(listener);
+ } else {
+ operation.addProgressListener(listener, EnumSet.complementOf(EnumSet.of(OperationType.PROBLEMS)));
+ }
+
}
operation.withCancellationToken(this.cancellationToken);
}
@@ -98,8 +106,8 @@ public void close() {
this.streams.close();
}
- public static final GradleProgressAttributesBuilder builder(CancellationTokenSource tokenSource, IProgressMonitor monitor) {
- return new GradleProgressAttributesBuilder(tokenSource, monitor);
+ public static final GradleProgressAttributesBuilder builder(CancellationTokenSource tokenSource, InternalGradleBuild gradleBuild, IProgressMonitor monitor) {
+ return new GradleProgressAttributesBuilder(tokenSource, gradleBuild, monitor);
}
/**
@@ -114,9 +122,11 @@ public static class GradleProgressAttributesBuilder {
private ProcessDescription processDescription = null;
private boolean isInteractive = true;
private ProgressListener delegatingListener = null;
+ private final InternalGradleBuild gradleBuild;
- public GradleProgressAttributesBuilder(CancellationTokenSource tokenSource, IProgressMonitor monitor) {
+ public GradleProgressAttributesBuilder(CancellationTokenSource tokenSource, InternalGradleBuild gradleBuild, IProgressMonitor monitor) {
this.tokenSource = tokenSource;
+ this.gradleBuild = gradleBuild;
this.monitor = monitor;
}
@@ -158,6 +168,9 @@ public GradleProgressAttributes build() {
CancellationForwardingListener cancellationListener = new CancellationForwardingListener(this.monitor, this.tokenSource);
progressListeners.add(cancellationListener);
progressEventListeners.add(cancellationListener);
+ if (CorePlugin.configurationManager().loadWorkspaceConfiguration().isProblemsApiSupportEnabled()) {
+ progressEventListeners.add(new ProblemsReportingProgressListener(this.gradleBuild));
+ }
return new GradleProgressAttributes(streams, this.tokenSource.token(), progressListeners.build(), progressEventListeners.build(), this.isInteractive);
}
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/i18n/CoreMessages.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/i18n/CoreMessages.java
index f06344719..74d4af2a0 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/i18n/CoreMessages.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/i18n/CoreMessages.java
@@ -78,6 +78,9 @@ public final class CoreMessages extends NLS {
public static String Preference_Label_ModulePath;
public static String Preference_Label_ModulePathHover;
+ public static String Preference_Label_ProblemsApiSupport;
+ public static String Preference_Label_ProblemsApiSupportHover;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, CoreMessages.class);
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/launch/BaseLaunchRequestJob.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/launch/BaseLaunchRequestJob.java
index 0d8b3d5c6..e5146278c 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/launch/BaseLaunchRequestJob.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/launch/BaseLaunchRequestJob.java
@@ -23,6 +23,7 @@
import org.eclipse.buildship.core.internal.console.ProcessDescription;
import org.eclipse.buildship.core.internal.event.Event;
import org.eclipse.buildship.core.internal.gradle.GradleProgressAttributes;
+import org.eclipse.buildship.core.internal.marker.GradleMarkerManager;
import org.eclipse.buildship.core.internal.operation.ToolingApiJob;
import org.eclipse.buildship.core.internal.workspace.InternalGradleBuild;
@@ -52,12 +53,13 @@ protected final void executeLaunch(CancellationTokenSource tokenSource, final IP
ProcessDescription processDescription = createProcessDescription();
BaseRunConfiguration runConfig = getRunConfig();
InternalGradleBuild gradleBuild = CorePlugin.internalGradleWorkspace().getGradleBuild(runConfig.getProjectConfiguration().getBuildConfiguration());
- GradleProgressAttributes attributes = GradleProgressAttributes.builder(tokenSource, monitor)
+ GradleProgressAttributes attributes = GradleProgressAttributes.builder(tokenSource, gradleBuild, monitor)
.forDedicatedProcess(processDescription)
.withFullProgress()
.build();
T launcher = createLaunch(gradleBuild, attributes, processDescription);
+ GradleMarkerManager.clear(gradleBuild);
writeExtraConfigInfo(attributes);
Event event = new DefaultExecuteLaunchRequestEvent(processDescription, launcher);
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/marker/GradleErrorMarker.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/marker/GradleErrorMarker.java
index 09312a950..e1634f2d8 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/marker/GradleErrorMarker.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/marker/GradleErrorMarker.java
@@ -10,6 +10,8 @@
package org.eclipse.buildship.core.internal.marker;
import java.nio.charset.StandardCharsets;
+import java.util.List;
+import java.util.stream.Collectors;
import com.google.common.base.Throwables;
@@ -21,7 +23,7 @@
import org.eclipse.buildship.core.internal.workspace.InternalGradleBuild;
/**
- * Describes Gradle error marker.
+ * Describes a Gradle problem marker.
*
* @author Donat Csikos
*/
@@ -30,6 +32,10 @@ public class GradleErrorMarker {
public static String ID = CorePlugin.PLUGIN_ID + ".errormarker";
public static String ATTRIBUTE_STACKTRACE = "stacktrace";
public static String ATTRIBUTE_ROOT_DIR = "rootdir";
+ public static String ATTRIBUTE_PROBLEM_CATEGORY = "problem.category";
+ public static String ATTRIBUTE_PROBLEM_SOLUTIONS = "problem.solutions";
+ public static String ATTRIBUTE_DOCUMENTATION_LINK = "problem.documentationlink";
+
private GradleErrorMarker() {
}
@@ -40,7 +46,7 @@ public static boolean belongsToBuild(IMarker marker, InternalGradleBuild build)
}
public static void createError(IResource resource, InternalGradleBuild gradleBuild, String message, Throwable exception, int lineNumber) {
- createMarker(IMarker.SEVERITY_ERROR, resource, gradleBuild, message, exception,lineNumber);
+ createMarker(IMarker.SEVERITY_ERROR, resource, gradleBuild, message, exception, lineNumber);
}
public static void createWarning(IResource resource, InternalGradleBuild gradleBuild, String message, Throwable exception, int lineNumber) {
@@ -48,6 +54,11 @@ public static void createWarning(IResource resource, InternalGradleBuild gradleB
}
private static void createMarker(int severity, IResource resource, InternalGradleBuild gradleBuild, String message, Throwable exception, int lineNumber) {
+ createMarker(severity, resource, gradleBuild, message, exception, lineNumber, null, null, null);
+ }
+
+ public static void createMarker(int severity, IResource resource, InternalGradleBuild gradleBuild, String message, Throwable exception, int lineNumber, String category,
+ List solutions, String documentationLink) {
try {
IMarker marker = resource.createMarker(GradleErrorMarker.ID);
@@ -63,6 +74,16 @@ private static void createMarker(int severity, IResource resource, InternalGradl
String stackTrace = Throwables.getStackTraceAsString(exception);
marker.setAttribute(GradleErrorMarker.ATTRIBUTE_STACKTRACE, trimMarkerProperty(stackTrace));
}
+ if (category != null) {
+ marker.setAttribute(ATTRIBUTE_PROBLEM_CATEGORY, category);
+ }
+ if (solutions != null) {
+ String solutionsString = solutions.stream().collect(Collectors.joining(System.getProperty("line.separator")));
+ marker.setAttribute(ATTRIBUTE_PROBLEM_SOLUTIONS, solutionsString);
+ }
+ if (documentationLink != null) {
+ marker.setAttribute(ATTRIBUTE_DOCUMENTATION_LINK, documentationLink);
+ }
} catch (CoreException e) {
CorePlugin.logger().warn("Cannot create Gradle error marker", e);
}
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/CompatProjectConnection.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/CompatProjectConnection.java
index ee6436f06..0cf3c4075 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/CompatProjectConnection.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/CompatProjectConnection.java
@@ -29,6 +29,7 @@
import org.gradle.tooling.ProgressListener;
import org.gradle.tooling.ProjectConnection;
import org.gradle.tooling.ResultHandler;
+import org.gradle.tooling.StreamedValueListener;
import org.gradle.tooling.TestLauncher;
import org.gradle.tooling.events.OperationType;
import org.gradle.tooling.model.eclipse.EclipseProject;
@@ -433,6 +434,11 @@ public BuildActionExecuter withSystemProperties(Map systemPro
this.delegate.withSystemProperties(systemProperties);
return this;
}
+
+ @Override
+ public void setStreamedValueListener(StreamedValueListener listener) {
+ this.delegate.setStreamedValueListener(listener);
+ }
}
private static class CompatIntermediateResultHander implements IntermediateResultHandler {
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/CompatTask.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/CompatTask.java
index 74ea47b5c..639445bc3 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/CompatTask.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/CompatTask.java
@@ -90,4 +90,14 @@ public boolean isPublic() {
}
}
+ @Override
+ public String getBuildTreePath() {
+ // returns true for Gradle versions < 2.1
+ try {
+ return this.delegate.getBuildTreePath();
+ } catch (Exception ignore) {
+ return getPath();
+ }
+ }
+
}
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/IdeAttachedProjectConnection.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/IdeAttachedProjectConnection.java
index 1ede3e01e..19a91f584 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/IdeAttachedProjectConnection.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/gradle/IdeAttachedProjectConnection.java
@@ -29,8 +29,10 @@
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.buildship.core.internal.DefaultGradleBuild;
import org.eclipse.buildship.core.internal.configuration.GradleArguments;
import org.eclipse.buildship.core.internal.gradle.GradleProgressAttributes;
+import org.eclipse.buildship.core.internal.workspace.InternalGradleBuild;
public final class IdeAttachedProjectConnection implements ProjectConnection {
@@ -96,12 +98,12 @@ public void notifyDaemonsAboutChangedPaths(List changedPaths) {
this.delegate.notifyDaemonsAboutChangedPaths(changedPaths);
}
- public static ProjectConnection newInstance(CancellationTokenSource tokenSource, GradleArguments gradleArguments, IProgressMonitor monitor) {
+ public static ProjectConnection newInstance(CancellationTokenSource tokenSource, GradleArguments gradleArguments, InternalGradleBuild gradleBuild, IProgressMonitor monitor) {
GradleConnector connector = GradleConnector.newConnector();
gradleArguments.applyTo(connector);
ProjectConnection connection = new CompatProjectConnection(connector.connect());
- GradleProgressAttributes progressAttributes = GradleProgressAttributes.builder(tokenSource, monitor)
+ GradleProgressAttributes progressAttributes = GradleProgressAttributes.builder(tokenSource, gradleBuild, monitor)
.forBackgroundProcess()
.withFullProgress()
.build();
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/progress/ProblemsReportingProgressListener.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/progress/ProblemsReportingProgressListener.java
new file mode 100644
index 000000000..4f3abe5ce
--- /dev/null
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/progress/ProblemsReportingProgressListener.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2023 Gradle Inc. and others
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+package org.eclipse.buildship.core.internal.util.progress;
+
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+import org.gradle.tooling.events.ProgressEvent;
+import org.gradle.tooling.events.ProgressListener;
+import org.gradle.tooling.events.problems.BaseProblemDescriptor;
+import org.gradle.tooling.events.problems.FileLocation;
+import org.gradle.tooling.events.problems.LineInFileLocation;
+import org.gradle.tooling.events.problems.ProblemAggregation;
+import org.gradle.tooling.events.problems.ProblemAggregationDescriptor;
+import org.gradle.tooling.events.problems.ProblemDescriptor;
+import org.gradle.tooling.events.problems.ProblemEvent;
+import org.gradle.tooling.events.problems.Solution;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.buildship.core.internal.CorePlugin;
+import org.eclipse.buildship.core.internal.marker.GradleErrorMarker;
+import org.eclipse.buildship.core.internal.util.gradle.Pair;
+import org.eclipse.buildship.core.internal.workspace.InternalGradleBuild;
+
+public class ProblemsReportingProgressListener implements ProgressListener {
+
+ private InternalGradleBuild gradleBuild;
+
+ public ProblemsReportingProgressListener(InternalGradleBuild gradleBuild) {
+ this.gradleBuild = gradleBuild;
+ }
+
+ @Override
+ public void statusChanged(ProgressEvent event) {
+ if (event instanceof ProblemEvent) {
+ ProblemEvent problemEvent = (ProblemEvent) event;
+ BaseProblemDescriptor eventDescriptor = problemEvent.getDescriptor();
+ try {
+ if (eventDescriptor instanceof ProblemDescriptor) {
+ reportProblem((ProblemDescriptor) eventDescriptor);
+ } else if (eventDescriptor instanceof ProblemAggregationDescriptor) {
+ for (ProblemAggregation aggregation : ((ProblemAggregationDescriptor) eventDescriptor).getAggregations()) {
+ for (ProblemDescriptor descriptor : aggregation.getProblemDescriptors()) {
+ reportProblem(descriptor);
+ }
+ }
+ }
+ } catch (Exception e) {
+ CorePlugin.logger().warn("Cannot report problem " + problemEvent, e);
+ }
+ }
+ }
+
+ private void reportProblem(ProblemDescriptor descriptor) {
+ Optional> location = resourceAndFileNumberOfFirstFileLocation(descriptor);
+ if (location.isPresent()) {
+ GradleErrorMarker.createMarker(
+ toMarkerSeverity(descriptor.getSeverity()),
+ location.get().getFirst(), this.gradleBuild,
+ descriptor.getLabel().getLabel(),
+ null, // TODO (donat) Gradle 8.7 descriptor.getException().getException(),
+ location.get().getSecond(),
+ toPath(descriptor.getCategory()),
+ descriptor.getSolutions().stream().map(Solution::getSolution).collect(Collectors.toList()),
+ descriptor.getDocumentationLink().getUrl()
+ );
+ } else {
+ GradleErrorMarker.createMarker(
+ toMarkerSeverity(descriptor.getSeverity()),
+ ResourcesPlugin.getWorkspace().getRoot(),
+ this.gradleBuild,
+ descriptor.getLabel().getLabel(),
+ null, // TODO (donat) Gradle 8.7 descriptor.getException().getException(),
+ -1,
+ toPath(descriptor.getCategory()),
+ descriptor.getSolutions().stream().map(Solution::getSolution).collect(Collectors.toList()),
+ descriptor.getDocumentationLink().getUrl()
+ );
+ }
+ }
+
+ private static String toPath(org.gradle.tooling.events.problems.ProblemCategory problemCategory) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(problemCategory.getNamespace());
+ sb.append(':');
+ sb.append(problemCategory.getCategory());
+ for (String sc : problemCategory.getSubcategories()) {
+ sb.append(':');
+ sb.append(sc);
+ }
+ return sb.toString();
+ }
+
+ public Optional firstFileLocation(ProblemDescriptor descriptor) {
+ return descriptor.getLocations().stream().filter(FileLocation.class::isInstance).map(FileLocation.class::cast).findFirst();
+ }
+
+ public Optional> resourceAndFileNumberOfFirstFileLocation(ProblemDescriptor descriptor) {
+ return firstFileLocation(descriptor).map(location -> new Pair<>(toResource(location), lineNumberOf(location)));
+ }
+
+ private static IResource toResource(FileLocation location) {
+ IPath absolutePath = Path.fromOSString(location.getPath());
+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+ IFile workspacePath = workspaceRoot.getFileForLocation(absolutePath);
+ if (workspacePath != null && workspacePath.exists()) {
+ return workspacePath;
+ }
+ return ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ private static Integer lineNumberOf(FileLocation location) {
+ if (location instanceof LineInFileLocation) {
+ if (((LineInFileLocation) location).getLine() > 0) {
+ return ((LineInFileLocation) location).getLine();
+ }
+ }
+ return -1;
+ }
+
+ public int toMarkerSeverity(org.gradle.tooling.events.problems.Severity severity) {
+ if (severity == org.gradle.tooling.events.problems.Severity.ERROR) {
+ return IMarker.SEVERITY_ERROR;
+ } else if (severity == org.gradle.tooling.events.problems.Severity.ADVICE) {
+ return IMarker.SEVERITY_INFO;
+ } else {
+ return IMarker.SEVERITY_WARNING;
+ }
+ }
+}
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/InitializeNewProjectOperation.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/InitializeNewProjectOperation.java
index 59ba145cc..e6ee9cbef 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/InitializeNewProjectOperation.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/InitializeNewProjectOperation.java
@@ -58,7 +58,7 @@ private static void initProjectIfNotExists(BuildConfiguration buildConfig, Cance
if (projectDir.mkdir()) {
InternalGradleBuild gradleBuild = CorePlugin.internalGradleWorkspace().getGradleBuild(buildConfig);
RunConfiguration runConfiguration = CorePlugin.configurationManager().createDefaultRunConfiguration(buildConfig);
- GradleProgressAttributes progressAttributes = GradleProgressAttributes.builder(tokenSource, monitor)
+ GradleProgressAttributes progressAttributes = GradleProgressAttributes.builder(tokenSource, gradleBuild, monitor)
.forNonInteractiveBackgroundProcess()
.withFilteredProgress()
.build();
diff --git a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/RunOnImportTasksOperation.java b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/RunOnImportTasksOperation.java
index 1be713d5c..f5563524a 100644
--- a/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/RunOnImportTasksOperation.java
+++ b/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/RunOnImportTasksOperation.java
@@ -106,11 +106,12 @@ private boolean isIncludedProject(EclipseProject eclipseProject) {
private void runTasks(final List tasksToRun, IProgressMonitor monitor, CancellationTokenSource tokenSource) {
RunConfiguration runConfiguration = CorePlugin.configurationManager().createDefaultRunConfiguration(this.buildConfig);
- GradleProgressAttributes progressAttributes = GradleProgressAttributes.builder(tokenSource, monitor)
+ InternalGradleBuild gradleBuild = CorePlugin.internalGradleWorkspace().getGradleBuild(this.buildConfig);
+ GradleProgressAttributes progressAttributes = GradleProgressAttributes.builder(tokenSource, gradleBuild, monitor)
.forBackgroundProcess()
.withFilteredProgress()
.build();
- BuildLauncher launcher = CorePlugin.internalGradleWorkspace().getGradleBuild(this.buildConfig).newBuildLauncher(runConfiguration, progressAttributes);
+ BuildLauncher launcher = gradleBuild.newBuildLauncher(runConfiguration, progressAttributes);
launcher.forTasks(tasksToRun.toArray(new String[tasksToRun.size()])).run();
}
}
diff --git a/org.eclipse.buildship.core/src/main/resources/org/eclipse/buildship/core/internal/i18n/CoreMessages.properties b/org.eclipse.buildship.core/src/main/resources/org/eclipse/buildship/core/internal/i18n/CoreMessages.properties
index 3cbdeb0c0..550c93b61 100644
--- a/org.eclipse.buildship.core/src/main/resources/org/eclipse/buildship/core/internal/i18n/CoreMessages.properties
+++ b/org.eclipse.buildship.core/src/main/resources/org/eclipse/buildship/core/internal/i18n/CoreMessages.properties
@@ -64,4 +64,6 @@ Preference_Label_AutoSyncHover=Automatically start project synchronization in th
Preference_Label_ShowConsoleViewHover=Makes the Console view visible during task execution
Preference_Label_ShowExecutionsViewHover=Makes the Executions view visible during task execution
Preference_Label_ModulePath=Enable module support
-Preference_Label_ModulePathHover=Add module dependencies to the modulepath
\ No newline at end of file
+Preference_Label_ModulePathHover=Add module dependencies to the modulepath
+Preference_Label_ProblemsApiSupport=Enable Problems API support
+Preference_Label_ProblemsApiSupportHover=Problems reported via the Problems API will appear as error markers on the UI.
\ No newline at end of file
diff --git a/org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF b/org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF
index a43d22472..db0b2ed9c 100644
--- a/org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF
@@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.swtbot.eclipse.finder,
junit-platform-suite-engine,
org.apache.log4j,
org.eclipse.jdt.launching,
- org.hamcrest.core;bundle-version="1.3.0"
+ org.hamcrest.core;bundle-version="1.3.0",
+ org.eclipse.e4.ui.model.workbench;resolution:=optional
Bundle-ClassPath: .,
lib/ant-1.10.12.jar,
lib/ant-antlr-1.10.12.jar,
diff --git a/org.eclipse.buildship.ui/META-INF/MANIFEST.MF b/org.eclipse.buildship.ui/META-INF/MANIFEST.MF
index ba58568d8..8bb2997aa 100644
--- a/org.eclipse.buildship.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.buildship.ui/META-INF/MANIFEST.MF
@@ -22,7 +22,7 @@ Require-Bundle: org.eclipse.buildship.core,
org.eclipse.jface.text,
com.ibm.icu,
com.google.guava;bundle-version="33.0.0",
- org.gradle.toolingapi;bundle-version="[8.1.1,8.2.0)",
+ org.gradle.toolingapi;bundle-version="[8.6.0,8.7.0)",
org.eclipse.ui.workbench.texteditor
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/marker/MarkersPropertyPage.java b/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/marker/MarkersPropertyPage.java
index ff1e7bc35..07be0ffd5 100644
--- a/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/marker/MarkersPropertyPage.java
+++ b/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/marker/MarkersPropertyPage.java
@@ -9,21 +9,37 @@
******************************************************************************/
package org.eclipse.buildship.ui.internal.marker;
+import java.net.MalformedURLException;
+import java.net.URL;
+
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.wizards.IWizardDescriptor;
+import org.eclipse.buildship.core.internal.CorePlugin;
+import org.eclipse.buildship.core.internal.GradlePluginsRuntimeException;
import org.eclipse.buildship.core.internal.marker.GradleErrorMarker;
+import org.eclipse.buildship.ui.internal.UiPluginConstants;
+import org.eclipse.buildship.ui.internal.view.task.TaskViewMessages;
/**
* Property page displaying details of Gradle problem markers.
@@ -32,7 +48,6 @@
*/
public class MarkersPropertyPage extends PropertyPage {
-
public MarkersPropertyPage() {
super();
noDefaultAndApplyButton();
@@ -73,6 +88,50 @@ private void doCreateContents(Composite parent) {
GridDataFactory.fillDefaults().hint(100, 100).grab(true, true).applyTo(stacktraceAreaText);
stacktraceAreaText.setText(stacktrace);
+
+ String category = marker.getAttribute(GradleErrorMarker.ATTRIBUTE_PROBLEM_CATEGORY, "(no category provided)");
+
+ Label categoryLabel = new Label(parent, SWT.NONE);
+ categoryLabel.setText("Category:");
+ GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.TOP).applyTo(categoryLabel);
+
+ Text categoryAreaText = new Text(parent, SWT.MULTI | SWT.READ_ONLY | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ GridDataFactory.fillDefaults().hint(100, 1).grab(true, false).applyTo(categoryAreaText);
+
+ categoryAreaText.setText(category);
+
+ String solutions = marker.getAttribute(GradleErrorMarker.ATTRIBUTE_PROBLEM_SOLUTIONS, "(no solutions provided)");
+ if (solutions.equals("")) {
+ solutions = "(no solutions provided)";
+ }
+ Label solutionsLabel = new Label(parent, SWT.NONE);
+ solutionsLabel.setText("Solutions:");
+ GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.TOP).applyTo(solutionsLabel);
+
+ Text solutionsAreaText = new Text(parent, SWT.MULTI | SWT.READ_ONLY | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ GridDataFactory.fillDefaults().hint(100, 1).grab(true, false).applyTo(solutionsAreaText);
+
+ solutionsAreaText.setText(solutions);
+
+ String documentationLink = marker.getAttribute(GradleErrorMarker.ATTRIBUTE_DOCUMENTATION_LINK, "(no documentation link provided)");
+ Label documentationLabel = new Label(parent, SWT.NONE);
+ documentationLabel.setText("Documentation:");
+ GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.TOP).applyTo(documentationLabel);
+
+ Link documentationAreaText = new Link(parent, SWT.BORDER | SWT.READ_ONLY);
+ GridDataFactory.fillDefaults().hint(100, 1).grab(true, false).applyTo(documentationAreaText);
+
+ documentationAreaText.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ try {
+ PlatformUI.getWorkbench().getBrowserSupport().createBrowser(null).openURL(new URL(documentationLink));
+ } catch (Exception e) {
+ CorePlugin.logger().warn("Cannot open URL + " + documentationLink, e);
+ }
+ }
+ });
+ documentationAreaText.setText("" + documentationLink + "");
}
public static int countLines(String str) {
diff --git a/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/preferences/GradleExperimentalFeaturesPreferencePage.java b/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/preferences/GradleExperimentalFeaturesPreferencePage.java
index a90d9ab9d..95bdda8d2 100644
--- a/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/preferences/GradleExperimentalFeaturesPreferencePage.java
+++ b/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/preferences/GradleExperimentalFeaturesPreferencePage.java
@@ -33,6 +33,7 @@ public final class GradleExperimentalFeaturesPreferencePage extends PreferencePa
public static final String PAGE_ID = "org.eclipse.buildship.ui.preferences.experimental";
private Button enableModuleSuppotCheckbox;
+ private Button enableProblemApiCheckbox;
@Override
public void init(IWorkbench workbench) {
@@ -49,6 +50,12 @@ protected Control createContents(Composite parent) {
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.TOP).grab(true, false).applyTo(this.enableModuleSuppotCheckbox);
HoverText.createAndAttach(this.enableModuleSuppotCheckbox, CoreMessages.Preference_Label_ModulePathHover);
+ this.enableProblemApiCheckbox = new Button(composite, SWT.CHECK);
+ this.enableProblemApiCheckbox.setText(CoreMessages.Preference_Label_ProblemsApiSupport);
+ this.enableProblemApiCheckbox.setSelection(CorePlugin.configurationManager().loadWorkspaceConfiguration().isProblemsApiSupportEnabled());
+ GridDataFactory.swtDefaults().align(SWT.FILL, SWT.TOP).grab(true, false).applyTo(this.enableProblemApiCheckbox);
+ HoverText.createAndAttach(this.enableProblemApiCheckbox, CoreMessages.Preference_Label_ProblemsApiSupportHover);
+
return composite;
}
@@ -57,7 +64,7 @@ public boolean performOk() {
ConfigurationManager manager = CorePlugin.configurationManager();
WorkspaceConfiguration c = manager.loadWorkspaceConfiguration();
manager.saveWorkspaceConfiguration(new WorkspaceConfiguration(c.getGradleDistribution(), c.getGradleUserHome(), c.getJavaHome(), c.isOffline(), c.isBuildScansEnabled(),
- c.isAutoSync(), c.getArguments(), c.getJvmArguments(), c.isShowConsoleView(), c.isShowExecutionsView(), this.enableModuleSuppotCheckbox.getSelection()));
+ c.isAutoSync(), c.getArguments(), c.getJvmArguments(), c.isShowConsoleView(), c.isShowExecutionsView(), this.enableModuleSuppotCheckbox.getSelection(), this.enableProblemApiCheckbox.getSelection()));
return true;
}
}
diff --git a/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/preferences/GradleWorkbenchPreferencePage.java b/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/preferences/GradleWorkbenchPreferencePage.java
index 9b7b71d65..669ab16a3 100644
--- a/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/preferences/GradleWorkbenchPreferencePage.java
+++ b/org.eclipse.buildship.ui/src/main/java/org/eclipse/buildship/ui/internal/preferences/GradleWorkbenchPreferencePage.java
@@ -42,6 +42,7 @@ public final class GradleWorkbenchPreferencePage extends PreferencePage implemen
private GradleProjectSettingsComposite gradleProjectSettingsComposite;
private boolean experimentalModuleSupportEnabled;
+ private boolean problemsApiSupportEnabled;
public GradleWorkbenchPreferencePage() {
@@ -76,6 +77,7 @@ private void initValues() {
this.gradleProjectSettingsComposite.getShowConsoleViewCheckbox().setSelection(config.isShowConsoleView());
this.gradleProjectSettingsComposite.getShowExecutionsViewCheckbox().setSelection(config.isShowExecutionsView());
this.experimentalModuleSupportEnabled = config.isExperimentalModuleSupportEnabled();
+ this.problemsApiSupportEnabled = config.isProblemsApiSupportEnabled();
}
private void addListeners() {
@@ -99,7 +101,7 @@ public boolean performOk() {
List jvmArguments = this.gradleProjectSettingsComposite.getAdvancedOptionsGroup().getJvmArguments();
boolean showConsoleView = this.gradleProjectSettingsComposite.getShowConsoleViewCheckbox().getSelection();
boolean showExecutionsView = this.gradleProjectSettingsComposite.getShowExecutionsViewCheckbox().getSelection();
- WorkspaceConfiguration workspaceConfig = new WorkspaceConfiguration(distribution, gradleUserHome, javaHome, offlineMode, buildScansEnabled, autoSync, arguments, jvmArguments, showConsoleView, showExecutionsView, this.experimentalModuleSupportEnabled);
+ WorkspaceConfiguration workspaceConfig = new WorkspaceConfiguration(distribution, gradleUserHome, javaHome, offlineMode, buildScansEnabled, autoSync, arguments, jvmArguments, showConsoleView, showExecutionsView, this.experimentalModuleSupportEnabled, this.problemsApiSupportEnabled);
CorePlugin.configurationManager().saveWorkspaceConfiguration(workspaceConfig);
return super.performOk();
}
diff --git a/org.gradle.toolingapi/.classpath b/org.gradle.toolingapi/.classpath
index c50ab5d99..ed70d9150 100644
--- a/org.gradle.toolingapi/.classpath
+++ b/org.gradle.toolingapi/.classpath
@@ -2,5 +2,5 @@
-
+
diff --git a/org.gradle.toolingapi/META-INF/MANIFEST.MF b/org.gradle.toolingapi/META-INF/MANIFEST.MF
index b648a3f83..ee3bb84da 100644
--- a/org.gradle.toolingapi/META-INF/MANIFEST.MF
+++ b/org.gradle.toolingapi/META-INF/MANIFEST.MF
@@ -3,30 +3,33 @@ Bundle-ManifestVersion: 2
Bundle-Name: Gradle Tooling API
Bundle-Vendor: Gradle Inc.
Bundle-SymbolicName: org.gradle.toolingapi
-Bundle-ClassPath: org.gradle.toolingapi_8.1.1.jar
+Bundle-ClassPath: org.gradle.toolingapi_8.6.0.jar
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.slf4j;version="1.7.2"
-Export-Package: org.gradle.api;version="8.1.1",
- org.gradle.cache;version="8.1.1",
- org.gradle.cli;version="8.1.1",
- org.gradle.scripts;version="8.1.1",
- org.gradle.tooling;version="8.1.1",
- org.gradle.tooling.events;version="8.1.1",
- org.gradle.tooling.events.configuration;version="8.1.1",
- org.gradle.tooling.events.download;version="8.1.1",
- org.gradle.tooling.events.lifecycle;version="8.1.1",
- org.gradle.tooling.events.task;version="8.1.1",
- org.gradle.tooling.events.task.java;version="8.1.1",
- org.gradle.tooling.events.test;version="8.1.1",
- org.gradle.tooling.events.transform;version="8.1.1",
- org.gradle.tooling.events.work;version="8.1.1",
- org.gradle.tooling.exceptions;version="8.1.1",
- org.gradle.tooling.model;version="8.1.1",
- org.gradle.tooling.model.build;version="8.1.1",
- org.gradle.tooling.model.cpp;version="8.1.1",
- org.gradle.tooling.model.eclipse;version="8.1.1",
- org.gradle.tooling.model.gradle;version="8.1.1",
- org.gradle.tooling.model.idea;version="8.1.1",
- org.gradle.tooling.model.java;version="8.1.1",
- org.gradle.tooling.model.kotlin.dsl;version="8.1.1"
-Bundle-Version: 3.1.10.qualifier
+Export-Package: org.gradle.api;version="8.6.0",
+ org.gradle.cache;version="8.6.0",
+ org.gradle.cli;version="8.6.0",
+ org.gradle.problems;version="8.6.0",
+ org.gradle.problems.buildtree;version="8.6.0",
+ org.gradle.scripts;version="8.6.0",
+ org.gradle.tooling;version="8.6.0",
+ org.gradle.tooling.events;version="8.6.0",
+ org.gradle.tooling.events.configuration;version="8.6.0",
+ org.gradle.tooling.events.download;version="8.6.0",
+ org.gradle.tooling.events.lifecycle;version="8.6.0",
+ org.gradle.tooling.events.problems;version="8.6.0",
+ org.gradle.tooling.events.task;version="8.6.0",
+ org.gradle.tooling.events.task.java;version="8.6.0",
+ org.gradle.tooling.events.test;version="8.6.0",
+ org.gradle.tooling.events.transform;version="8.6.0",
+ org.gradle.tooling.events.work;version="8.6.0",
+ org.gradle.tooling.exceptions;version="8.6.0",
+ org.gradle.tooling.model;version="8.6.0",
+ org.gradle.tooling.model.build;version="8.6.0",
+ org.gradle.tooling.model.cpp;version="8.6.0",
+ org.gradle.tooling.model.eclipse;version="8.6.0",
+ org.gradle.tooling.model.gradle;version="8.6.0",
+ org.gradle.tooling.model.idea;version="8.6.0",
+ org.gradle.tooling.model.java;version="8.6.0",
+ org.gradle.tooling.model.kotlin.dsl;version="8.6.0"
+Bundle-Version: 8.6.0.qualifier
diff --git a/org.gradle.toolingapi/org.gradle.toolingapi.source_8.1.1.jar b/org.gradle.toolingapi/org.gradle.toolingapi.source_8.6.0.jar
similarity index 71%
rename from org.gradle.toolingapi/org.gradle.toolingapi.source_8.1.1.jar
rename to org.gradle.toolingapi/org.gradle.toolingapi.source_8.6.0.jar
index 435bc7a07..b3a758ac5 100644
Binary files a/org.gradle.toolingapi/org.gradle.toolingapi.source_8.1.1.jar and b/org.gradle.toolingapi/org.gradle.toolingapi.source_8.6.0.jar differ
diff --git a/org.gradle.toolingapi/org.gradle.toolingapi_8.1.1.jar b/org.gradle.toolingapi/org.gradle.toolingapi_8.1.1.jar
deleted file mode 100644
index 8ca9fc5a8..000000000
Binary files a/org.gradle.toolingapi/org.gradle.toolingapi_8.1.1.jar and /dev/null differ
diff --git a/org.gradle.toolingapi/org.gradle.toolingapi_8.6.0.jar b/org.gradle.toolingapi/org.gradle.toolingapi_8.6.0.jar
new file mode 100644
index 000000000..16b826035
Binary files /dev/null and b/org.gradle.toolingapi/org.gradle.toolingapi_8.6.0.jar differ