Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
authorAlena Laskavaia2010-05-06 12:01:29 -0400
committerAlena Laskavaia2010-05-06 12:01:29 -0400
commit221d891570e24085e89dfa64e6d06487fbca5e64 (patch)
treea2f40a65ad95c8112b66f67ced471686224c245c /jtag
parent3e77d51532610bcdfef88ffb201ec7cc2754aff6 (diff)
downloadorg.eclipse.cdt-221d891570e24085e89dfa64e6d06487fbca5e64.tar.gz
org.eclipse.cdt-221d891570e24085e89dfa64e6d06487fbca5e64.tar.xz
org.eclipse.cdt-221d891570e24085e89dfa64e6d06487fbca5e64.zip
java warnings
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java51
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java23
2 files changed, 41 insertions, 33 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java
index 11ad5f4776..2a2aea3880 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java
@@ -15,24 +15,29 @@ package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
import java.util.Collection;
/**
- * @author ajin
+ * Default implementation of the "jtag device"
*
*/
public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
+ /**
+ * @since 7.0
+ */
+ protected static final String LINESEP = System.getProperty("line.separator"); //$NON-NLS-1$
+
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doDelay(int, java.util.Collection)
*/
- public void doDelay(int delay, Collection commands) {
- String cmd = "monitor delay " + String.valueOf(delay * 1000);
+ public void doDelay(int delay, Collection<String> commands) {
+ String cmd = "monitor delay " + String.valueOf(delay * 1000); //$NON-NLS-1$
addCmd(commands, cmd);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doReset(java.util.Collection)
*/
- public void doReset(Collection commands) {
- String cmd = "monitor reset run";
+ public void doReset(Collection<String> commands) {
+ String cmd = "monitor reset run"; //$NON-NLS-1$
addCmd(commands, cmd);
}
@@ -46,42 +51,42 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doRemote(java.lang.String, int, java.util.Collection)
*/
- public void doRemote(String ip, int port, Collection commands) {
- String cmd = "target remote " + ip + ":" + String.valueOf(port);
+ public void doRemote(String ip, int port, Collection<String> commands) {
+ String cmd = "target remote " + ip + ":" + String.valueOf(port); //$NON-NLS-1$ //$NON-NLS-2$
addCmd(commands, cmd);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doHalt(java.util.Collection)
*/
- public void doHalt(Collection commands) {
- String cmd = "monitor halt";
+ public void doHalt(Collection<String> commands) {
+ String cmd = "monitor halt"; //$NON-NLS-1$
addCmd(commands, cmd);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doContinue(java.util.Collection)
*/
- public void doContinue(Collection commands) {
- String cmd = "continue";
+ public void doContinue(Collection<String> commands) {
+ String cmd = "continue"; //$NON-NLS-1$
addCmd(commands, cmd);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doLoadImage(java.lang.String, java.lang.String, java.util.Collection)
*/
- public void doLoadImage(String imageFileName, String imageOffset, Collection commands) {
+ public void doLoadImage(String imageFileName, String imageOffset, Collection<String> commands) {
String file = escapeScpaces(imageFileName);
- String cmd = "restore " + file + " " + imageOffset;
+ String cmd = "restore " + file + " " + imageOffset; //$NON-NLS-1$ //$NON-NLS-2$
addCmd(commands, cmd);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doLoadSymbol(java.lang.String, java.lang.String, java.util.Collection)
*/
- public void doLoadSymbol(String symbolFileName, String symbolOffset, Collection commands) {
+ public void doLoadSymbol(String symbolFileName, String symbolOffset, Collection<String> commands) {
String file = escapeScpaces(symbolFileName);
- String cmd = "add-sym " + file + " " + symbolOffset;
+ String cmd = "add-sym " + file + " " + symbolOffset; //$NON-NLS-1$ //$NON-NLS-2$
addCmd(commands, cmd);
}
@@ -93,38 +98,38 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doSetPC(java.lang.String, java.util.Collection)
*/
- public void doSetPC(String pc, Collection commands) {
- String cmd = "set $pc=0x" + pc;
+ public void doSetPC(String pc, Collection<String> commands) {
+ String cmd = "set $pc=0x" + pc; //$NON-NLS-1$
addCmd(commands, cmd);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doStopAt(java.lang.String, java.util.Collection)
*/
- public void doStopAt(String stopAt, Collection commands) {
- String cmd = "tbreak " + stopAt;
+ public void doStopAt(String stopAt, Collection<String> commands) {
+ String cmd = "tbreak " + stopAt; //$NON-NLS-1$
addCmd(commands, cmd);
}
/*
* addCmd Utility method to format commands
*/
- protected void addCmd(Collection commands, String cmd) {
- commands.add(cmd + System.getProperty("line.separator"));
+ protected void addCmd(Collection<String> commands, String cmd) {
+ commands.add(cmd + LINESEP);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#getDefaultIpAddress()
*/
public String getDefaultIpAddress() {
- return "localhost";
+ return "localhost"; //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#getDefaultPortNumber()
*/
public String getDefaultPortNumber() {
- return "10000";
+ return "10000"; //$NON-NLS-1$
}
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java
index e305c54dd9..2c9d1e7470 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java
@@ -24,9 +24,9 @@ public interface IGDBJtagDevice {
/**
* Device reset command
- * @param commands ommands collection
+ * @param commands collection
*/
- public void doReset(Collection commands);
+ public void doReset(Collection<String> commands);
/**
* Default device delay in millisecond
@@ -39,7 +39,7 @@ public interface IGDBJtagDevice {
* @param delay delay in second
* @param commands device specific delay commands
*/
- public void doDelay(int delay, Collection commands);
+ public void doDelay(int delay, Collection<String> commands);
/**
* Target needs to be in pause mode in order to do
@@ -47,15 +47,16 @@ public interface IGDBJtagDevice {
* MMU takes control
* @param commands device specific pause commands
*/
- public void doHalt(Collection commands);
+ public void doHalt(Collection<String> commands);
/**
* Commands to connect to remote JTAG device
* @param ip host name of IP address of JTAG device
* @param port TCP socket port number of JTAG device
* @param commands remote connection commands
+
*/
- public void doRemote(String ip, int port, Collection commands);
+ public void doRemote(String ip, int port, Collection<String> commands);
/**
* Commands to download the executable binary to target
@@ -63,7 +64,7 @@ public interface IGDBJtagDevice {
* @param imageOffset executable binary memory offset
* @param commands executable binary download commands
*/
- public void doLoadImage(String imageFileName, String imageOffset, Collection commands);
+ public void doLoadImage(String imageFileName, String imageOffset, Collection<String> commands);
/**
* Commands to download the symbols file to target
@@ -71,37 +72,39 @@ public interface IGDBJtagDevice {
* @param symbolOffset symbols file memory offset
* @param commands symbols file download command
*/
- public void doLoadSymbol(String symbolFileName, String symbolOffset, Collection commands);
+ public void doLoadSymbol(String symbolFileName, String symbolOffset, Collection<String> commands);
/**
* Commands to set initial program counter
* @param pc program counter
* @param commands set program counter commands
*/
- public void doSetPC(String pc, Collection commands);
+ public void doSetPC(String pc, Collection<String> commands);
/**
* Commands to set initial breakpoint
* @param stopAt initial breakpoint location
* @param commands set breakpoint commands
*/
- public void doStopAt(String stopAt, Collection commands);
+ public void doStopAt(String stopAt, Collection<String> commands);
/**
* De-freeze the target in order to start debugging
* @param commands commands to continue the target
*/
- public void doContinue(Collection commands);
+ public void doContinue(Collection<String> commands);
/**
* Device specific default hostname of IP address
* @return default hostname of IP address
+
*/
public String getDefaultIpAddress();
/**
* Device specific default port number
* @return default port number
+
*/
public String getDefaultPortNumber();

Back to the top