1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fixed NLS warnings, potential NPE and removed excess semicolon

Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Change-Id: I266a72dadae318ae301ca11d2ea2d74082219a24
This commit is contained in:
Torbjörn Svensson 2020-06-29 19:05:05 +02:00 committed by Alexander Fedorov
parent 97c1151f01
commit 39d3bfcc4f
22 changed files with 70 additions and 68 deletions

View file

@ -40,22 +40,22 @@ public class InitializeLaunchConfigurations {
public Optional<String> getVSCodeLocation(String appendPathSuffix) {
String res = null;
if (Platform.getOS().equals(Platform.OS_LINUX)) {
res = "/usr/share/code";
res = "/usr/share/code"; //$NON-NLS-1$
} else if (Platform.getOS().equals(Platform.OS_WIN32)) {
res = "C:/Program Files (x86)/Microsoft VS Code";
res = "C:/Program Files (x86)/Microsoft VS Code"; //$NON-NLS-1$
} else if (Platform.getOS().equals(Platform.OS_MACOSX)) {
res = "/Applications/Visual Studio Code.app";
res = "/Applications/Visual Studio Code.app"; //$NON-NLS-1$
IPath path = new Path(appendPathSuffix);
// resources/ maps to Contents/Resources on macOS
if (path.segmentCount() > 1 && path.segment(0).equals("resources")) {
if (path.segmentCount() > 1 && path.segment(0).equals("resources")) { //$NON-NLS-1$
path = path.removeFirstSegments(1);
appendPathSuffix = new Path("/Contents/Resources").append(path).toOSString();
appendPathSuffix = new Path("/Contents/Resources").append(path).toOSString(); //$NON-NLS-1$
}
}
if (res != null && new File(res).isDirectory()) {
if (res.contains(" ") && Platform.getOS().equals(Platform.OS_WIN32)) {
return Optional.of("\"" + res + appendPathSuffix + "\"");
if (res.contains(" ") && Platform.getOS().equals(Platform.OS_WIN32)) { //$NON-NLS-1$
return Optional.of("\"" + res + appendPathSuffix + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
return Optional.of(res + appendPathSuffix);
}
@ -64,16 +64,16 @@ public class InitializeLaunchConfigurations {
public Optional<String> getNodeJsLocation() {
{
String nodeJsLocation = System.getProperty("org.eclipse.wildwebdeveloper.nodeJSLocation");
String nodeJsLocation = System.getProperty("org.eclipse.wildwebdeveloper.nodeJSLocation"); //$NON-NLS-1$
if (nodeJsLocation != null && Files.exists(Paths.get(nodeJsLocation))) {
return Optional.of(nodeJsLocation);
}
}
String res = "/path/to/node";
String[] command = new String[] { "/bin/bash", "-c", "which node" };
String res = "/path/to/node"; //$NON-NLS-1$
String[] command = new String[] { "/bin/bash", "-c", "which node" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (Platform.getOS().equals(Platform.OS_WIN32)) {
command = new String[] { "cmd", "/c", "where node" };
command = new String[] { "cmd", "/c", "where node" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
try (BufferedReader reader = new BufferedReader(
@ -86,7 +86,7 @@ public class InitializeLaunchConfigurations {
// Try default install path as last resort
if (res == null && Platform.getOS().equals(Platform.OS_MACOSX)) {
res = "/usr/local/bin/node";
res = "/usr/local/bin/node"; //$NON-NLS-1$
}
if (res != null && Files.exists(Paths.get(res))) {

View file

@ -136,7 +136,7 @@ public class MemoryBlock extends CDTDebugElement implements IMemoryBlockExtensio
@Override
public MemoryByte[] getBytesFromAddress(BigInteger address, long units) throws DebugException {
MemoryRequestArguments memoryRequestArguments = new MemoryRequestArguments();
memoryRequestArguments.setAddress("0x" + address.toString(16));
memoryRequestArguments.setAddress("0x" + address.toString(16)); //$NON-NLS-1$
memoryRequestArguments.setLength(units);
CompletableFuture<MemoryContents> memory = getDebugProtocolServer().memory(memoryRequestArguments);
MemoryContents body = complete(memory);

View file

@ -85,7 +85,7 @@ class VMExpressionUpdate extends VMViewerUpdate implements IExpressionUpdate {
if (VMViewerUpdateTracing.DEBUG_VMUPDATES && !isCanceled()
&& VMViewerUpdateTracing.matchesFilterRegex(this.getClass())) {
DsfUIPlugin.debug(DsfPlugin.getDebugTime() + " " + LoggingUtils.toString(this) + " marked done; element = " //$NON-NLS-1$//$NON-NLS-2$
+ LoggingUtils.toString(getElement()) + "\n expression = "
+ LoggingUtils.toString(getElement()) + "\n expression = " //$NON-NLS-1$
+ (fExpressionElement != null ? LoggingUtils.toString(fExpressionElement) : "<unset>")); //$NON-NLS-1$
}

View file

@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-SymbolicName: org.eclipse.cdt.debug.dap.gdbjtag;singleton:=true
Bundle-Version: 1.100.100.qualifier
Bundle-Version: 1.100.200.qualifier
Bundle-Activator: org.eclipse.cdt.debug.dap.gdbjtag.Activator
Require-Bundle: org.apache.commons.io,
org.eclipse.core.runtime,

View file

@ -112,7 +112,7 @@ public class DapGdbJtagLaunchDelegate extends DapLaunchDelegate {
String symbolsOffset = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_SYMBOLS_OFFSET,
IGDBJtagConstants.DEFAULT_SYMBOLS_OFFSET);
if (symbolsOffset != null && symbolsOffset.length() > 0) {
symbolsOffset = "0x" + symbolsOffset;
symbolsOffset = "0x" + symbolsOffset; //$NON-NLS-1$
}
List<String> commands = new ArrayList<>();
jtagDevice.doLoadSymbol(symbolsFileName, symbolsOffset, commands);
@ -170,7 +170,7 @@ public class DapGdbJtagLaunchDelegate extends DapLaunchDelegate {
String imageOffset = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_IMAGE_OFFSET,
IGDBJtagConstants.DEFAULT_IMAGE_OFFSET);
if (imageOffset != null && imageOffset.length() > 0) {
imageOffset = "0x" + CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_IMAGE_OFFSET,
imageOffset = "0x" + CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_IMAGE_OFFSET, //$NON-NLS-1$
IGDBJtagConstants.DEFAULT_IMAGE_OFFSET);
}
List<String> commands = new ArrayList<>();
@ -353,7 +353,7 @@ public class DapGdbJtagLaunchDelegate extends DapLaunchDelegate {
private GDBJtagDeviceContribution getGDBJtagDeviceContribution(Map<String, Object> attributes)
throws CoreException {
if (attributes.containsKey(IGDBJtagConstants.ATTR_JTAG_DEVICE_ID)) {
String deviceId = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_JTAG_DEVICE_ID, "");
String deviceId = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_JTAG_DEVICE_ID, ""); //$NON-NLS-1$
if (!deviceId.isEmpty()) {
return GDBJtagDeviceContributionFactory.getInstance().findByDeviceId(deviceId);
}
@ -361,7 +361,7 @@ public class DapGdbJtagLaunchDelegate extends DapLaunchDelegate {
// Fall back to old behavior with name only if ID is missing
if (attributes.containsKey(IGDBJtagConstants.ATTR_JTAG_DEVICE)) {
String deviceName = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_JTAG_DEVICE, "");
String deviceName = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_JTAG_DEVICE, ""); //$NON-NLS-1$
if (!deviceName.isEmpty()) {
return GDBJtagDeviceContributionFactory.getInstance().findByDeviceName(deviceName);
}

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.gdbjtag.core;singleton:=true
Bundle-Version: 9.5.0.qualifier
Bundle-Version: 9.5.100.qualifier
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.core.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,

View file

@ -26,7 +26,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends Plugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.cdt.debug.gdbjtag.core";
public static final String PLUGIN_ID = "org.eclipse.cdt.debug.gdbjtag.core"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;

View file

@ -195,7 +195,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
}
/** @since 8.2 */
protected static final String GROUP_JTAG = "GROUP_JTAG";
protected static final String GROUP_JTAG = "GROUP_JTAG"; //$NON-NLS-1$
@Override
protected String[] getExecutionOrder(String group) {
@ -209,14 +209,16 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
}));
// Now insert our steps before the data model initialized event is sent
orderList.add(orderList.indexOf("stepDataModelInitializationComplete"), GROUP_JTAG);
orderList.add(orderList.indexOf("stepDataModelInitializationComplete"), GROUP_JTAG); //$NON-NLS-1$
return orderList.toArray(new String[orderList.size()]);
}
// Finally, deal with our groups and their steps.
if (GROUP_JTAG.equals(group)) {
return new String[] { "stepInitializeJTAGFinalLaunchSequence", "stepRetrieveJTAGDevice", //$NON-NLS-2$
return new String[] { //
"stepInitializeJTAGFinalLaunchSequence", //$NON-NLS-1$
"stepRetrieveJTAGDevice", //$NON-NLS-1$
"stepLoadSymbols", //$NON-NLS-1$
"stepConnectToTarget", //$NON-NLS-1$
"stepResetBoard", //$NON-NLS-1$
@ -354,7 +356,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
String symbolsOffset = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SYMBOLS_OFFSET,
IGDBJtagConstants.DEFAULT_SYMBOLS_OFFSET);
if (symbolsOffset.length() > 0) {
symbolsOffset = "0x" + symbolsOffset;
symbolsOffset = "0x" + symbolsOffset; //$NON-NLS-1$
}
List<String> commands = new ArrayList<>();
fGdbJtagDevice.doLoadSymbol(symbolsFileName, symbolsOffset, commands);
@ -553,8 +555,8 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
String imageOffset = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET,
IGDBJtagConstants.DEFAULT_IMAGE_OFFSET);
if (imageOffset.length() > 0) {
imageOffset = (imageFileName.endsWith(".elf")) ? "" //$NON-NLS-2$
: "0x" + CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET,
imageOffset = (imageFileName.endsWith(".elf")) ? "" //$NON-NLS-1$//$NON-NLS-2$
: "0x" + CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET, //$NON-NLS-1$
IGDBJtagConstants.DEFAULT_IMAGE_OFFSET);
}
List<String> commands = new ArrayList<>();
@ -756,7 +758,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
private GDBJtagDeviceContribution getGDBJtagDeviceContribution() {
Map<String, Object> attributes = getAttributes();
if (attributes.containsKey(IGDBJtagConstants.ATTR_JTAG_DEVICE_ID)) {
String deviceId = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_JTAG_DEVICE_ID, "");
String deviceId = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_JTAG_DEVICE_ID, ""); //$NON-NLS-1$
if (!deviceId.isEmpty()) {
return GDBJtagDeviceContributionFactory.getInstance().findByDeviceId(deviceId);
}
@ -764,7 +766,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
// Fall back to old behavior with name only if ID is missing
if (attributes.containsKey(IGDBJtagConstants.ATTR_JTAG_DEVICE)) {
String deviceName = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_JTAG_DEVICE, "");
String deviceName = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_JTAG_DEVICE, ""); //$NON-NLS-1$
if (!deviceName.isEmpty()) {
return GDBJtagDeviceContributionFactory.getInstance().findByDeviceName(deviceName);
}

View file

@ -77,16 +77,16 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
@Override
public void doLoadImage(String imageFileName, String imageOffset, Collection<String> commands) {
addCmd(commands, "load " + escapeScpaces(imageFileName) + ' ' + imageOffset);
addCmd(commands, "load " + escapeScpaces(imageFileName) + ' ' + imageOffset); //$NON-NLS-1$
}
@Override
public void doLoadSymbol(String symbolFileName, String symbolOffset, Collection<String> commands) {
String file = escapeScpaces(symbolFileName);
if (symbolOffset == null || (symbolOffset.length() == 0)) {
addCmd(commands, "symbol-file " + file);
addCmd(commands, "symbol-file " + file); //$NON-NLS-1$
} else {
addCmd(commands, "add-symbol-file " + file + " " + symbolOffset);
addCmd(commands, "add-symbol-file " + file + " " + symbolOffset); //$NON-NLS-1$ //$NON-NLS-2$
}
}

View file

@ -87,8 +87,8 @@ public class GDBJtagDeviceContributionFactory {
String elementValue = configurationElement.getAttribute(name);
if (elementValue == null)
Activator.log(new Status(IStatus.ERROR, Activator.getUniqueIdentifier(), DebugPlugin.INTERNAL_ERROR,
"Extension " + configurationElement.getDeclaringExtension().getUniqueIdentifier()
+ " missing required attribute: " + name,
"Extension " + configurationElement.getDeclaringExtension().getUniqueIdentifier() //$NON-NLS-1$
+ " missing required attribute: " + name, //$NON-NLS-1$
null));
return elementValue;
}

View file

@ -329,7 +329,7 @@ public class ContainerCommandLauncherFactory implements ICommandLauncherFactory,
.append("HEADERS").append(getCleanName(connectionName)) //$NON-NLS-1$
.append(getCleanName(imageName));
toolchain.setProperty("cdt.needScannerRefresh", //$NON-NLS-1$
pluginPath.toFile().exists() ? "false" : "true"); //$NON-NLS-2$
pluginPath.toFile().exists() ? "false" : "true"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return includePaths;

View file

@ -134,7 +134,7 @@ public class ContainerPropertyTab extends AbstractCBuildPropertyTab
int index = connectionSelector.getSelectionIndex();
if (index < 0) {
connection = null;
connectionName = "";
connectionName = ""; //$NON-NLS-1$
return;
}
if (connection != null)
@ -142,7 +142,7 @@ public class ContainerPropertyTab extends AbstractCBuildPropertyTab
connection = connections[index];
connectionUri = connection.getUri();
if (!connectionName.equals(connection.getName())) {
imageCombo.setText("");
imageCombo.setText(""); //$NON-NLS-1$
initialImageId = null;
refreshImages();
setVolumeControlsEnabled(new Button[] { addButton }, false);
@ -308,7 +308,7 @@ public class ContainerPropertyTab extends AbstractCBuildPropertyTab
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).grab(true, false).applyTo(addButton);
addButton.setText(WizardMessages.getString("ImageRunResourceVolVarPage.addButton")); //$NON-NLS-1$
addButton.addSelectionListener(onAddDataVolume(dataVolumesTableViewer));
if (imageCombo.getText() != null && !imageCombo.getText().equals("")) {
if (imageCombo.getText() != null && !imageCombo.getText().equals("")) { //$NON-NLS-1$
setVolumeControlsEnabled(new Button[] { addButton }, true);
}
final Button editButton = new Button(buttonsContainers, SWT.NONE);
@ -967,8 +967,8 @@ public class ContainerPropertyTab extends AbstractCBuildPropertyTab
connection = null;
model.setConnection(null);
model.setSelectedImage(null);
connectionUri = "";
connectionSelector.setText("");
connectionUri = ""; //$NON-NLS-1$
connectionSelector.setText(""); //$NON-NLS-1$
}
connectionSelector.addModifyListener(connectionModifyListener);
}

View file

@ -78,7 +78,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
private List directoriesList;
private String imageName;
private String connectionName;
private String connectionUri = "";
private String connectionUri = ""; //$NON-NLS-1$
private Boolean keepValue;
private Boolean stdinValue;
private Boolean privilegedValue;
@ -217,7 +217,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
Composite composite = createComposite(parent, 1, 1,
GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_END);
composite.setFont(font);
newButton = createPushButton(composite, Messages.ContainerTab_New_Button, null); //$NON-NLS-1$
newButton = createPushButton(composite, Messages.ContainerTab_New_Button, null);
newButton.setLayoutData(new GridData(GridData.FILL_BOTH));
GridData gdb = new GridData(GridData.VERTICAL_ALIGN_CENTER);
gdb.grabExcessHorizontalSpace = false;
@ -231,7 +231,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
}
});
removeButton = createPushButton(composite, Messages.ContainerTab_Remove_Button, null); //$NON-NLS-1$
removeButton = createPushButton(composite, Messages.ContainerTab_Remove_Button, null);
removeButton.setLayoutData(new GridData(GridData.FILL_BOTH));
removeButton.addSelectionListener(new SelectionAdapter() {
@Override
@ -612,7 +612,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
tableViewer.setChecked(m, true);
}
}
connectionUri = configuration.getAttribute(ILaunchConstants.ATTR_CONNECTION_URI, "");
connectionUri = configuration.getAttribute(ILaunchConstants.ATTR_CONNECTION_URI, ""); //$NON-NLS-1$
int defaultIndex = 0;
connections = DockerConnectionManager.getInstance().getConnections();
if (connections.length > 0) {
@ -628,7 +628,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
connectionUri = connections[0].getUri();
}
}
imageName = configuration.getAttribute(ILaunchConstants.ATTR_IMAGE, "");
imageName = configuration.getAttribute(ILaunchConstants.ATTR_IMAGE, ""); //$NON-NLS-1$
imageCombo.setText(imageName);
keepValue = configuration.getAttribute(ILaunchConstants.ATTR_KEEP_AFTER_LAUNCH, false);
keepButton.setSelection(keepValue);
@ -638,7 +638,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
privilegedButton.setSelection(privilegedValue);
} catch (CoreException e) {
setErrorMessage(
Messages.bind(Messages.ContainerTab_Error_Reading_Configuration, e.getStatus().getMessage())); //$NON-NLS-1$
Messages.bind(Messages.ContainerTab_Error_Reading_Configuration, e.getStatus().getMessage()));
DockerLaunchUIPlugin.log(e);
}
}
@ -663,7 +663,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
String image = launchConfig.getAttribute(ILaunchConstants.ATTR_IMAGE, (String) null);
if (image == null)
return false;
int index = image.lastIndexOf(':'); //$NON-NLS-1$
int index = image.lastIndexOf(':');
if (index <= 0)
return false;
if (connection.hasImage(image.substring(0, index), image.substring(index + 1))) {
@ -722,8 +722,8 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
} else {
setErrorMessage(Messages.ContainerTab_Error_No_Connections);
connection = null;
connectionUri = "";
connectionSelector.setText("");
connectionUri = ""; //$NON-NLS-1$
connectionSelector.setText(""); //$NON-NLS-1$
}
connectionSelector.addModifyListener(connectionModifyListener);
}

View file

@ -177,7 +177,7 @@ public class DataVolumeModel extends BaseDatabindingModel implements Comparable<
model.setHostPathMount(convertToWin32Path(Platform.getOS(), items[0]));
model.containerPath = items[1];
model.mountType = MountType.HOST_FILE_SYSTEM;
if (items[2].equals("ro")) {
if (items[2].equals("ro")) { //$NON-NLS-1$
model.setReadOnly(true);
} else {
model.setReadOnly(false);
@ -242,7 +242,7 @@ public class DataVolumeModel extends BaseDatabindingModel implements Comparable<
}
firePropertyChange(MOUNT_TYPE, this.mountType, this.mountType = mountType);
if (this.mountType == MountType.NONE) {
setMount("");
setMount(""); //$NON-NLS-1$
}
}

View file

@ -79,8 +79,8 @@ public class ExposedPortModel extends BaseDatabindingModel implements Comparable
public static List<String> toArrayString(final Collection<ExposedPortModel> exposedPorts) {
final List<String> exposedPortList = new ArrayList<>();
for (ExposedPortModel exposedPort : exposedPorts) {
final String exposedPortString = exposedPort.toString();
if (exposedPort != null) {
final String exposedPortString = exposedPort.toString();
exposedPortList.add(exposedPortString);
}
}
@ -101,7 +101,7 @@ public class ExposedPortModel extends BaseDatabindingModel implements Comparable
final int firstColumnSeparator = exposedPortInfo.indexOf(SEPARATOR);
if (firstColumnSeparator == -1 && exposedPortInfo.indexOf(CONTAINER_TYPE_SEPARATOR) != -1) {
final String type = exposedPortInfo.substring(exposedPortInfo.indexOf(CONTAINER_TYPE_SEPARATOR)); // $NON-NLS-1$
final ExposedPortModel exposedPort = new ExposedPortModel(privatePort, type, "", privatePort); // $NON-NLS-1$
final ExposedPortModel exposedPort = new ExposedPortModel(privatePort, type, "", privatePort); //$NON-NLS-1$
return exposedPort; // $NON-NLS-1$
} else {
final int secondColumnSeparator = exposedPortInfo.indexOf(SEPARATOR, firstColumnSeparator + 1);
@ -223,7 +223,7 @@ public class ExposedPortModel extends BaseDatabindingModel implements Comparable
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(containerPort + CONTAINER_TYPE_SEPARATOR + portType + SEPARATOR
+ (hostAddress != null ? hostAddress : "") + SEPARATOR + hostPort + SEPARATOR + selected);
+ (hostAddress != null ? hostAddress : "") + SEPARATOR + hostPort + SEPARATOR + selected); //$NON-NLS-1$
return buffer.toString();
}

View file

@ -113,7 +113,7 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
setErrorMessage(null);
setMessage(null);
} else {
setErrorMessage(Messages.GDBDebuggerPage0); //$NON-NLS-1$
setErrorMessage(Messages.GDBDebuggerPage0);
setMessage(null);
}
return valid;

View file

@ -46,11 +46,11 @@ public class SWTImagesFactory {
public static final String IMG_WARNING = NAME_PREFIX + "warning_obj.gif"; //$NON-NLS-1$
public static final String IMG_ERROR = NAME_PREFIX + "error_obj.gif"; //$NON-NLS-1$
public static final ImageDescriptor DESC_CONTAINER = createManaged("", IMG_CONTAINER);
public static final ImageDescriptor DESC_FOLDER_CLOSED = createManaged("", IMG_FOLDER_CLOSED);
public static final ImageDescriptor DESC_FILE = createManaged("", IMG_FILE);
public static final ImageDescriptor DESC_WARNING = createManaged("", IMG_WARNING);
public static final ImageDescriptor DESC_ERROR = createManaged("", IMG_ERROR);
public static final ImageDescriptor DESC_CONTAINER = createManaged("", IMG_CONTAINER); //$NON-NLS-1$
public static final ImageDescriptor DESC_FOLDER_CLOSED = createManaged("", IMG_FOLDER_CLOSED); //$NON-NLS-1$
public static final ImageDescriptor DESC_FILE = createManaged("", IMG_FILE); //$NON-NLS-1$
public static final ImageDescriptor DESC_WARNING = createManaged("", IMG_WARNING); //$NON-NLS-1$
public static final ImageDescriptor DESC_ERROR = createManaged("", IMG_ERROR); //$NON-NLS-1$
private static ImageDescriptor createManaged(String prefix, String name) {
return createManaged(imageRegistry, prefix, name);

View file

@ -213,7 +213,7 @@ public class ContainerGCCToolChain extends PlatformObject implements IToolChain,
if (baseScannerInfo.getDefinedSymbols() != null) {
for (Map.Entry<String, String> macro : baseScannerInfo.getDefinedSymbols().entrySet()) {
if (macro.getValue() != null && !macro.getValue().isEmpty()) {
commandLine.add("-D" + macro.getKey() + "=" + macro.getValue()); //$NON-NLS-1$
commandLine.add("-D" + macro.getKey() + "=" + macro.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
} else {
commandLine.add("-D" + macro.getKey()); //$NON-NLS-1$
}
@ -331,7 +331,7 @@ public class ContainerGCCToolChain extends PlatformObject implements IToolChain,
if (baseScannerInfo.getDefinedSymbols() != null) {
for (Map.Entry<String, String> macro : baseScannerInfo.getDefinedSymbols().entrySet()) {
if (macro.getValue() != null && !macro.getValue().isEmpty()) {
commandLine.add("-D" + macro.getKey() + "=" + macro.getValue()); //$NON-NLS-1$
commandLine.add("-D" + macro.getKey() + "=" + macro.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
} else {
commandLine.add("-D" + macro.getKey()); //$NON-NLS-1$
}

View file

@ -58,7 +58,7 @@ public class NewContainerTargetWizardPage extends WizardPage
private IDockerImageListener wizardPage;
private String imageName;
private String connectionName;
private String connectionUri = "";
private String connectionUri = ""; //$NON-NLS-1$
public NewContainerTargetWizardPage(ILaunchTarget launchTarget) {
super(NewContainerTargetWizardPage.class.getName());
@ -259,8 +259,8 @@ public class NewContainerTargetWizardPage extends WizardPage
} else {
setErrorMessage(Messages.NewContainerTargetWizardPage_no_connections);
connection = null;
connectionUri = "";
connectionSelector.setText("");
connectionUri = ""; //$NON-NLS-1$
connectionSelector.setText(""); //$NON-NLS-1$
}
connectionSelector.addModifyListener(connectionModifyListener);
}

View file

@ -23,7 +23,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
@Override
public void initializeDefaultPreferences() {
IPreferenceStore store = DockerLaunchUIPlugin.getDefault().getPreferenceStore();
store.setDefault(PreferenceConstants.DEFAULT_IMAGE, "");
store.setDefault(PreferenceConstants.DEFAULT_IMAGE, ""); //$NON-NLS-1$
store.setDefault(PreferenceConstants.KEEP_CONTAINER_AFTER_LAUNCH, false);
}

View file

@ -57,7 +57,7 @@ public class DefaultLaunchDescriptorType implements ILaunchDescriptorType {
String category = type.getCategory();
return type.isPublic() && !(config.getAttribute(ILaunchManager.ATTR_PRIVATE, false))
&& !("org.eclipse.ui.externaltools.builder".equals(category)); // $NON-NLS-1$
&& !("org.eclipse.ui.externaltools.builder".equals(category)); //$NON-NLS-1$
}
@Override

View file

@ -36,7 +36,7 @@ public interface ILaunchTarget extends IAdaptable {
@Override
public ILaunchTargetWorkingCopy getWorkingCopy() {
throw new UnsupportedOperationException(Messages.ILaunchTarget_notSupported);
};
}
};
/**