From e861ce4b62a52eb9731ae93172986092e98b0079 Mon Sep 17 00:00:00 2001 From: Peter Laird Date: Thu, 15 Jul 2021 01:58:51 -0600 Subject: [PATCH] add a description to JUnit launcher in plugin.xml --- bundles/com.salesforce.bazel.eclipse.core/plugin.xml | 1 + .../launch/BazelJunitLaunchConfigurationDelegate.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/bundles/com.salesforce.bazel.eclipse.core/plugin.xml b/bundles/com.salesforce.bazel.eclipse.core/plugin.xml index e853c65b..a3aba9a9 100644 --- a/bundles/com.salesforce.bazel.eclipse.core/plugin.xml +++ b/bundles/com.salesforce.bazel.eclipse.core/plugin.xml @@ -165,6 +165,7 @@ diff --git a/bundles/com.salesforce.bazel.eclipse.core/src/main/java/com/salesforce/bazel/eclipse/launch/BazelJunitLaunchConfigurationDelegate.java b/bundles/com.salesforce.bazel.eclipse.core/src/main/java/com/salesforce/bazel/eclipse/launch/BazelJunitLaunchConfigurationDelegate.java index 697ff531..0cb61b8d 100644 --- a/bundles/com.salesforce.bazel.eclipse.core/src/main/java/com/salesforce/bazel/eclipse/launch/BazelJunitLaunchConfigurationDelegate.java +++ b/bundles/com.salesforce.bazel.eclipse.core/src/main/java/com/salesforce/bazel/eclipse/launch/BazelJunitLaunchConfigurationDelegate.java @@ -44,6 +44,11 @@ /** * Plug point into the Eclipse JUnit launcher call chain; allows us to inject the Bazel runtime classpath provider so * the test uses the Bazel computed classpath. + *

+ * Note that the user must elect to use this delegate (referred to as the 'Launcher' in the UI). This delegate is + * registered in plugin.xml as a "org.eclipse.jdt.junit.launchconfig" type delegate. This means it will compete with the + * native Eclipse delegate for JUnit launching duties. The user will be presented with a UI for them to choose the + * delegate they want, and they *must* choose the Bazel one. */ public class BazelJunitLaunchConfigurationDelegate extends JUnitLaunchConfigurationDelegate { @@ -51,6 +56,7 @@ public class BazelJunitLaunchConfigurationDelegate extends JUnitLaunchConfigurat public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { + // the enable method sets an attribute on the configuration to use the Bazel test classpath provider BazelTestClasspathProvider.enable(configuration); BazelTestClasspathProvider.canOpenErrorDialog.set(true);