mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed warnings
This commit is contained in:
parent
74e858e927
commit
8b16325786
4 changed files with 35 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue