mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-11 11:05:24 +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-ManifestVersion: 2
|
||||||
Bundle-Name: LaunchBar Remote Core
|
Bundle-Name: LaunchBar Remote Core
|
||||||
Bundle-SymbolicName: org.eclipse.launchbar.remote.core;singleton:=true
|
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
|
Bundle-Activator: org.eclipse.launchbar.remote.core.internal.Activator
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.launchbar.remote.core</artifactId>
|
<artifactId>org.eclipse.launchbar.remote.core</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -29,6 +29,10 @@ public abstract class RemoteLaunchTargetProvider implements ILaunchTargetProvide
|
||||||
|
|
||||||
protected abstract String getTypeId();
|
protected abstract String getTypeId();
|
||||||
|
|
||||||
|
protected void initLaunchTarget(ILaunchTarget target) {
|
||||||
|
// default nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ILaunchTargetManager targetManager) {
|
public void init(ILaunchTargetManager targetManager) {
|
||||||
this.targetManager = targetManager;
|
this.targetManager = targetManager;
|
||||||
|
@ -49,7 +53,7 @@ public abstract class RemoteLaunchTargetProvider implements ILaunchTargetProvide
|
||||||
for (IRemoteConnection remote : remoteType.getConnections()) {
|
for (IRemoteConnection remote : remoteType.getConnections()) {
|
||||||
String id = remote.getName();
|
String id = remote.getName();
|
||||||
if (targetManager.getLaunchTarget(typeId, id) == null) {
|
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())) {
|
if (connection.getConnectionType().getId().equals(getTypeId())) {
|
||||||
switch (event.getType()) {
|
switch (event.getType()) {
|
||||||
case RemoteConnectionChangeEvent.CONNECTION_ADDED:
|
case RemoteConnectionChangeEvent.CONNECTION_ADDED:
|
||||||
targetManager.addLaunchTarget(getTypeId(), connection.getName());
|
initLaunchTarget(targetManager.addLaunchTarget(getTypeId(), connection.getName()));
|
||||||
break;
|
break;
|
||||||
case RemoteConnectionChangeEvent.CONNECTION_REMOVED:
|
case RemoteConnectionChangeEvent.CONNECTION_REMOVED:
|
||||||
ILaunchTarget target = targetManager.getLaunchTarget(getTypeId(), connection.getName());
|
ILaunchTarget target = targetManager.getLaunchTarget(getTypeId(), connection.getName());
|
||||||
|
@ -91,11 +95,10 @@ public abstract class RemoteLaunchTargetProvider implements ILaunchTargetProvide
|
||||||
if (target != null ) {
|
if (target != null ) {
|
||||||
targetManager.removeLaunchTarget(target);
|
targetManager.removeLaunchTarget(target);
|
||||||
}
|
}
|
||||||
targetManager.addLaunchTarget(getTypeId(), wc.getName());
|
initLaunchTarget(targetManager.addLaunchTarget(getTypeId(), wc.getName()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="org.eclipse.launchbar.remote"
|
id="org.eclipse.launchbar.remote"
|
||||||
label="Remote Launch Targets"
|
label="Remote Launch Targets"
|
||||||
version="1.0.0.qualifier"
|
version="1.0.1.qualifier"
|
||||||
provider-name="Eclipse CDT"
|
provider-name="Eclipse CDT"
|
||||||
license-feature="org.eclipse.license"
|
license-feature="org.eclipse.license"
|
||||||
license-feature-version="0.0.0">
|
license-feature-version="0.0.0">
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<groupId>org.eclipse.launchbar.features</groupId>
|
<groupId>org.eclipse.launchbar.features</groupId>
|
||||||
<artifactId>org.eclipse.launchbar.remote</artifactId>
|
<artifactId>org.eclipse.launchbar.remote</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Add table
Reference in a new issue