mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 14:15:23 +02:00
Allow setting of target attributes for remote targets.
This is used, for example, by ESP8266 to set the OS and ARCH attributes on new launch targets created by the remote launch target provider. Change-Id: If0e5f2c20debfa17dcab3608584b54638679bb63
This commit is contained in:
parent
b43933ec2b
commit
c39d229f46
5 changed files with 11 additions and 8 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: LaunchBar Remote Core
|
||||
Bundle-SymbolicName: org.eclipse.launchbar.remote.core;singleton:=true
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Version: 1.0.1.qualifier
|
||||
Bundle-Activator: org.eclipse.launchbar.remote.core.internal.Activator
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</parent>
|
||||
|
||||
<artifactId>org.eclipse.launchbar.remote.core</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
|
|
|
@ -29,6 +29,10 @@ public abstract class RemoteLaunchTargetProvider implements ILaunchTargetProvide
|
|||
|
||||
protected abstract String getTypeId();
|
||||
|
||||
protected void initLaunchTarget(ILaunchTarget target) {
|
||||
// default nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(ILaunchTargetManager targetManager) {
|
||||
this.targetManager = targetManager;
|
||||
|
@ -49,7 +53,7 @@ public abstract class RemoteLaunchTargetProvider implements ILaunchTargetProvide
|
|||
for (IRemoteConnection remote : remoteType.getConnections()) {
|
||||
String id = remote.getName();
|
||||
if (targetManager.getLaunchTarget(typeId, id) == null) {
|
||||
targetManager.addLaunchTarget(typeId, id);
|
||||
initLaunchTarget(targetManager.addLaunchTarget(typeId, id));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +79,7 @@ public abstract class RemoteLaunchTargetProvider implements ILaunchTargetProvide
|
|||
if (connection.getConnectionType().getId().equals(getTypeId())) {
|
||||
switch (event.getType()) {
|
||||
case RemoteConnectionChangeEvent.CONNECTION_ADDED:
|
||||
targetManager.addLaunchTarget(getTypeId(), connection.getName());
|
||||
initLaunchTarget(targetManager.addLaunchTarget(getTypeId(), connection.getName()));
|
||||
break;
|
||||
case RemoteConnectionChangeEvent.CONNECTION_REMOVED:
|
||||
ILaunchTarget target = targetManager.getLaunchTarget(getTypeId(), connection.getName());
|
||||
|
@ -91,11 +95,10 @@ public abstract class RemoteLaunchTargetProvider implements ILaunchTargetProvide
|
|||
if (target != null ) {
|
||||
targetManager.removeLaunchTarget(target);
|
||||
}
|
||||
targetManager.addLaunchTarget(getTypeId(), wc.getName());
|
||||
initLaunchTarget(targetManager.addLaunchTarget(getTypeId(), wc.getName()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<feature
|
||||
id="org.eclipse.launchbar.remote"
|
||||
label="Remote Launch Targets"
|
||||
version="1.0.0.qualifier"
|
||||
version="1.0.1.qualifier"
|
||||
provider-name="Eclipse CDT"
|
||||
license-feature="org.eclipse.license"
|
||||
license-feature-version="0.0.0">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<groupId>org.eclipse.launchbar.features</groupId>
|
||||
<artifactId>org.eclipse.launchbar.remote</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
|
||||
<packaging>eclipse-feature</packaging>
|
||||
</project>
|
||||
|
|
Loading…
Add table
Reference in a new issue