From 806ae521c6c00885fdbeaee6207b4de7c4ef4d4d Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Tue, 8 Sep 2015 10:48:31 -0400 Subject: [PATCH] launchbar: when there is no descriptors show all connections - when you bring IDE in new workspace all drops downs are empty, so you create new connection from target drop down, but its still remain empty after connection is created which is quite confusing. So its better to show all connection when descriptor is null (i.e. no descriptor at all) Change-Id: Idef1b676baef4978f8327135691e485ca287d7fe --- .../launchbar/core/internal/LaunchBarManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchBarManager.java b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchBarManager.java index 9bad6cdba57..ca8787cb1f3 100644 --- a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchBarManager.java +++ b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchBarManager.java @@ -598,7 +598,7 @@ public class LaunchBarManager implements ILaunchBarManager, IRemoteConnectionCha /** * Sets the preferred mode for the given descriptor - * + * * @param desc * @param mode * @throws CoreException @@ -643,7 +643,7 @@ public class LaunchBarManager implements ILaunchBarManager, IRemoteConnectionCha public List getLaunchTargets(ILaunchDescriptor descriptor) throws CoreException { if (descriptor == null) - return Collections.emptyList(); + return remoteServicesManager.getAllRemoteConnections(); List targets = new ArrayList<>(); for (IRemoteConnection target : remoteServicesManager.getAllRemoteConnections()) { @@ -677,7 +677,7 @@ public class LaunchBarManager implements ILaunchBarManager, IRemoteConnectionCha /** * Sets preferred target for launch descriptor - * + * * @param desc * @param target * @throws CoreException @@ -816,7 +816,7 @@ public class LaunchBarManager implements ILaunchBarManager, IRemoteConnectionCha @Override public void launchConfigurationChanged(ILaunchConfiguration configuration) { // we have to ignore notifications from working copies, otherwise - // we will get thousand of events and we don't track working copies + // we will get thousand of events and we don't track working copies // (add/remove events are not sent for WCs) if (configuration.isWorkingCopy()) return; @@ -889,7 +889,7 @@ public class LaunchBarManager implements ILaunchBarManager, IRemoteConnectionCha return; fireLaunchTargetsChanged(); // if we added new target we probably want to use it - if (activeLaunchDesc != null && supportsTarget(activeLaunchDesc, target)) { + if (activeLaunchDesc == null || supportsTarget(activeLaunchDesc, target)) { setActiveLaunchTarget(target); } }