From baa294b085fb0ded8b406fdb872de116dfba4484 Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Fri, 10 Apr 2015 10:00:16 -0400 Subject: [PATCH] launch-bar: config selector - remove active config chage in last patch I did not actually remove setting active config from configSelector - it should not set it, but it will be set automatically when config is saved. Change-Id: Idcb84d2d71567f1e60cb452fb4df15ed962dded6 --- .../launchbar/ui/internal/controls/ConfigSelector.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/ConfigSelector.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/ConfigSelector.java index d1e2df04f2a..01bab01a5ea 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/ConfigSelector.java +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/ConfigSelector.java @@ -17,7 +17,6 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.LabelProvider; @@ -199,11 +198,12 @@ public class ConfigSelector extends CSelector { new Job("Create Launch Configuration") { protected IStatus run(IProgressMonitor monitor) { try { - ILaunchConfiguration config = wizard.getWorkingCopy().doSave(); final LaunchBarManager barManager = uiManager.getManager(); - final ILaunchDescriptor desc = barManager.getDefaultDescriptorType().getDescriptor(config); - barManager.setLaunchMode(desc, wizard.getLaunchMode()); - barManager.setActiveLaunchDescriptor(desc); + final ILaunchDescriptor desc = barManager.getDefaultDescriptorType().getDescriptor(wizard.getWorkingCopy()); + if (desc != null) { + barManager.setLaunchMode(desc, wizard.getLaunchMode()); + } + wizard.getWorkingCopy().doSave();// that would trigger active config change return Status.OK_STATUS; } catch (CoreException e) { return e.getStatus();