1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 01:36:01 +02:00

Bug 547442 - Launchbar shouldn't set newly added Container target active

- change ContainerTargetTypeProvider.changeEvent() to use
  the new ILaunchTargetManager2 interface to use
  addLaunchTargetNoNotify to add image targets from a new or
  enabled Docker connection so as to prevent scanner info jobs

Change-Id: I2aef96c86c926790702a59853f0baf103c7115fc
This commit is contained in:
Jeff Johnston 2019-05-22 14:27:16 -04:00 committed by Jonah Graham
parent 47ea958d5d
commit 292829c817

View file

@ -39,6 +39,7 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.launchbar.core.ILaunchBarManager;
import org.eclipse.launchbar.core.target.ILaunchTarget;
import org.eclipse.launchbar.core.target.ILaunchTargetManager;
import org.eclipse.launchbar.core.target.ILaunchTargetManager2;
import org.eclipse.launchbar.core.target.ILaunchTargetProvider;
import org.eclipse.launchbar.core.target.ILaunchTargetWorkingCopy;
import org.eclipse.launchbar.core.target.TargetStatus;
@ -192,13 +193,14 @@ public class ContainerTargetTypeProvider implements ILaunchTargetProvider, IDock
}
target = targetManager.getLaunchTarget(TYPE_ID, imageName);
if (target != null) {
if (target.getAttribute(IContainerLaunchTarget.ATTR_CONNECTION_URI, "")
if (target.getAttribute(IContainerLaunchTarget.ATTR_CONNECTION_URI, "") //$NON-NLS-1$
.equals(connection.getUri())) {
continue;
}
imageName = imageName2;
}
target = targetManager.addLaunchTarget(TYPE_ID, imageName);
target = ((ILaunchTargetManager2) targetManager).addLaunchTargetNoNotify(TYPE_ID,
imageName);
ILaunchTargetWorkingCopy wc = target.getWorkingCopy();
wc.setAttribute(ILaunchTarget.ATTR_OS, CONTAINER_LINUX);
wc.setAttribute(ILaunchTarget.ATTR_ARCH, Platform.getOSArch());