mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56: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:
parent
47ea958d5d
commit
292829c817
1 changed files with 4 additions and 2 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue