Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
authorJohn Cortell2010-05-06 15:25:07 -0400
committerJohn Cortell2010-05-06 15:25:07 -0400
commit8b163257869cf84a7dd0acb9ecf0f1297fadca4a (patch)
tree4e9231b14d6b0cb650c96c3a0c3ff5d5eb9e4a11 /jtag
parent74e858e927bd4d3f2f7a1b41e2012b5123da2b58 (diff)
downloadorg.eclipse.cdt-8b163257869cf84a7dd0acb9ecf0f1297fadca4a.tar.gz
org.eclipse.cdt-8b163257869cf84a7dd0acb9ecf0f1297fadca4a.tar.xz
org.eclipse.cdt-8b163257869cf84a7dd0acb9ecf0f1297fadca4a.zip
Fixed warnings
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF3
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java30
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java2
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java3
4 files changed, 35 insertions, 3 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF
index a42ce8b41e..de1593e297 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF
@@ -16,6 +16,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.cdt.debug.core,
org.eclipse.cdt.dsf.gdb,
org.eclipse.cdt.dsf.gdb.ui
-Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Export-Package: org.eclipse.cdt.debug.gdbjtag.ui
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java
index 11f629a718..34310ed870 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.ui;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -58,4 +60,32 @@ public class Activator extends AbstractUIPlugin {
return plugin;
}
+ /**
+ * Logs the specified status with this plug-in's log.
+ *
+ * @param status
+ * status to log
+ */
+ static void log(IStatus status) {
+ getDefault().getLog().log(status);
+ }
+ /**
+ * Logs an internal error with the specified message.
+ *
+ * @param message
+ * the error message to log
+ */
+ static void logErrorMessage(String message) {
+ log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, message, null));
+ }
+
+ /**
+ * Logs an internal error with the specified throwable
+ *
+ * @param e
+ * the exception to be logged
+ */
+ static void log(Throwable e) {
+ log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, e.getMessage(), e));
+ }
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java
index e84d9f3f2c..a8479447bb 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java
@@ -299,6 +299,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
/**
* @param text
*/
+ @SuppressWarnings("deprecation")
protected void updateDeviceIpPort(String selectedDeviceName) {
if (selectedDeviceName.equals(savedJtagDevice)) { return; }
GDBJtagDeviceContribution[] availableDevices = GDBJtagDeviceContributionFactory.getInstance()
@@ -313,6 +314,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
IGDBJtagConnection connectionDevice = (IGDBJtagConnection)selectedDevice;
connection.setText(connectionDevice.getDefaultDeviceConnection());
} else {
+ // support for deprecated TCP/IP based methods
ipAddress.setText(selectedDevice.getDefaultIpAddress());
portNumber.setText(selectedDevice.getDefaultPortNumber());
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java
index 78c143203d..3319f0f0e4 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java
@@ -14,7 +14,6 @@ package org.eclipse.cdt.debug.gdbjtag.ui;
import java.net.MalformedURLException;
import java.net.URL;
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
@@ -59,7 +58,7 @@ public class GDBJtagImages {
try {
return new URL(iconBaseURL, buffer.toString());
} catch (MalformedURLException e) {
- LaunchUIPlugin.log(e);
+ Activator.log(e);
return null;
}
}

Back to the top