Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
authorAlena Laskavaia2008-07-28 15:01:59 -0400
committerAlena Laskavaia2008-07-28 15:01:59 -0400
commitb10d7e75866222debf5838586116e76f8eb96e14 (patch)
tree83711b8f475e241f1d3a6da45ee1180763288718 /jtag
parentfe6577cf5a6039761ef7fcb566c11f1bf41d0ed8 (diff)
downloadorg.eclipse.cdt-b10d7e75866222debf5838586116e76f8eb96e14.tar.gz
org.eclipse.cdt-b10d7e75866222debf5838586116e76f8eb96e14.tar.xz
org.eclipse.cdt-b10d7e75866222debf5838586116e76f8eb96e14.zip
[108331] - applied patch for extending jtag devices
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java12
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java1
2 files changed, 12 insertions, 1 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java
index 6b80fba52f..524fde57c4 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java
@@ -13,6 +13,7 @@ package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
import org.eclipse.cdt.debug.gdbjtag.core.Activator;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
@@ -22,6 +23,7 @@ public class GDBJtagDeviceContribution {
private String deviceName;
private String deviceClassName;
private IGDBJtagDevice device;
+ private String deviceClassBundleName;
/**
* @return the deviceId
@@ -64,13 +66,21 @@ public class GDBJtagDeviceContribution {
public void setDeviceClassName(String deviceClassName) {
this.deviceClassName = deviceClassName;
}
+
+ public String getDeviceClassBundleName() {
+ return deviceClassBundleName;
+ }
+
+ public void setDeviceClassBundleName(String deviceClassBundleName) {
+ this.deviceClassBundleName = deviceClassBundleName;
+ }
public IGDBJtagDevice getDevice() throws NullPointerException {
if (device != null)
return device;
Object o = null;
try {
- o = Class.forName(getDeviceClassName()).newInstance();
+ o = Platform.getBundle(deviceClassBundleName).loadClass(deviceClassName).newInstance();
} catch (InstantiationException e) {
Activator.log(new Status(IStatus.ERROR, Activator.getUniqueIdentifier(),
DebugPlugin.INTERNAL_ERROR, "Error instantiating "
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java
index a74c0f67a3..01c6f868fa 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java
@@ -55,6 +55,7 @@ public class GDBJtagDeviceContributionFactory {
adapter.setDeviceId(id);
adapter.setDeviceName(name);
adapter.setDeviceClassName(className);
+ adapter.setDeviceClassBundleName(configurationElement.getContributor().getName());
addContribution(adapter);
}
}

Back to the top