diff --git a/launchbar/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF b/launchbar/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF index e0ce6e134a1..88063cda849 100644 --- a/launchbar/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF +++ b/launchbar/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF @@ -2,14 +2,15 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.launchbar.ui;singleton:=true -Bundle-Version: 2.5.400.qualifier +Bundle-Version: 2.5.500.qualifier Bundle-Activator: org.eclipse.launchbar.ui.internal.Activator Bundle-Vendor: %providerName Require-Bundle: org.eclipse.core.runtime, org.eclipse.ui, org.eclipse.ui.ide, org.eclipse.debug.ui, - org.eclipse.launchbar.core + org.eclipse.launchbar.core, + org.eclipse.cdt.debug.core;bundle-version="8.8.400" Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-Localization: plugin diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/BuildActiveCommandHandler.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/BuildActiveCommandHandler.java index 5ca972b1385..de91986f0c5 100644 --- a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/BuildActiveCommandHandler.java +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/BuildActiveCommandHandler.java @@ -18,6 +18,7 @@ import java.util.HashSet; import java.util.Set; +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -33,6 +34,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchDelegate; import org.eclipse.debug.core.ILaunchMode; import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; @@ -100,6 +102,12 @@ protected IStatus run(IProgressMonitor monitor) { if (delegate == null) delegate = config.getType().getDelegates(modes)[0]; ILaunchConfigurationDelegate configDel = delegate.getDelegate(); + /* This build is started manually by pressing the LaunchBar build button. + * Always build, regardless if auto build is disabled in the launch configuration. + */ + ILaunchConfigurationWorkingCopy configCopy = config.copy(config.getName() + "Copy"); //$NON-NLS-1$ + configCopy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_BUILD_BEFORE_LAUNCH, + ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_ENABLED); if (configDel instanceof ILaunchConfigurationTargetedDelegate) { ILaunchConfigurationTargetedDelegate configDel2 = (ILaunchConfigurationTargetedDelegate) configDel; boolean ret; @@ -107,7 +115,7 @@ protected IStatus run(IProgressMonitor monitor) { if (!ret) { return Status.CANCEL_STATUS; } - if (!configDel2.buildForLaunch(config, mode, target, monitor)) { + if (!configDel2.buildForLaunch(configCopy, mode, target, monitor)) { return Status.OK_STATUS; } } else if (configDel instanceof ILaunchConfigurationDelegate2) { @@ -117,7 +125,8 @@ protected IStatus run(IProgressMonitor monitor) { if (!ret) { return Status.CANCEL_STATUS; } - if (!configDel2.buildForLaunch(config, mode, monitor)) { + + if (!configDel2.buildForLaunch(configCopy, mode, monitor)) { return Status.OK_STATUS; } }