Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/ChangeLog22
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java34
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java14
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java16
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java28
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/CoreFileCLaunchConfigurationTabGroup.java2
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java18
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java62
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties105
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java28
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java7
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java30
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java28
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java8
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java67
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java5
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java23
18 files changed, 346 insertions, 155 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog
index 9d09fc73ec4..37d35542c67 100644
--- a/launch/org.eclipse.cdt.launch/ChangeLog
+++ b/launch/org.eclipse.cdt.launch/ChangeLog
@@ -1,3 +1,25 @@
+2004-03-01 James Ciesielski
+
+ Marked those strings that are non-translatable as such and
+ externalized those strings that can be translated.
+
+ * src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+ * src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
+ * src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
+ * src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
+ * src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java
+ * src/org/eclipse/cdt/launch/internal/ui/CoreFileCLaunchConfigurationTab.java
+ * src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
+ * src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
+ * src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties
+ * src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
+ * src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
+ * src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java
+ * src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java
+ * src/org/eclipse/cdt/launch/ui/CMainTab.java
+ * src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java
+ * src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java
+
2004-02-18 Alain Magloire
filterClass contribution to be able to use
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
index 4b0462f7064..9dc3fb73d7e 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
@@ -68,7 +68,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
Entry entry;
for (int i = 0; entries.hasNext() && i < array.length; i++) {
entry = (Entry) entries.next();
- array[i] = ((String) entry.getKey()) + "=" + ((String) entry.getValue());
+ array[i] = ((String) entry.getKey()) + "=" + ((String) entry.getValue()); //$NON-NLS-1$
}
return array;
}
@@ -247,7 +247,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
*/
protected void abort(String message, Throwable exception, int code) throws CoreException {
MultiStatus status = new MultiStatus(getPluginID(),code, message,exception);
- status.add(new Status(IStatus.ERROR,getPluginID(),code, exception == null ? "" : exception.getLocalizedMessage(),exception));
+ status.add(new Status(IStatus.ERROR,getPluginID(),code, exception == null ? "" : exception.getLocalizedMessage(),exception)); //$NON-NLS-1$
throw new CoreException(status);
}
@@ -296,7 +296,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
if (id == null) {
ICProject cProject = getCProject(configuration);
if (cProject == null) {
- abort("Project does not exist", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
+ abort(LaunchUIPlugin.getResourceString("Launch.common.Project_does_not_exist"), null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT); //$NON-NLS-1$
}
sourceLocator = CDebugUIPlugin.createDefaultSourceLocator();
sourceLocator.initializeDefaults(configuration);
@@ -345,7 +345,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
try {
dbgCfg =
CDebugCorePlugin.getDefault().getDebugConfiguration(
- config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, ""));
+ config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, "")); //$NON-NLS-1$
}
catch (CoreException e) {
IStatus status =
@@ -353,7 +353,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
IStatus.ERROR,
LaunchUIPlugin.getUniqueIdentifier(),
ICDTLaunchConfigurationConstants.ERR_DEBUGGER_NOT_INSTALLED,
- "CDT Debubger not installed",
+ LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.Debugger_not_installed"), //$NON-NLS-1$
e);
IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
@@ -369,13 +369,13 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
}
protected String renderTargetLabel(ICDebugConfiguration debugConfig) {
- String format = "{0} ({1})";
+ String format = "{0} ({1})"; //$NON-NLS-1$
String timestamp = DateFormat.getInstance().format(new Date(System.currentTimeMillis()));
return MessageFormat.format(format, new String[] { debugConfig.getName(), timestamp });
}
protected String renderProcessLabel(String commandLine) {
- String format = "{0} ({1})";
+ String format = "{0} ({1})"; //$NON-NLS-1$
String timestamp = DateFormat.getInstance().format(new Date(System.currentTimeMillis()));
return MessageFormat.format(format, new String[] { commandLine, timestamp });
}
@@ -383,18 +383,18 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
String name = getProjectName(config);
if (name == null) {
- abort("C Project not specified", null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
+ abort(LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.C_Project_not_specified"), null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT); //$NON-NLS-1$
}
ICProject cproject = getCProject(config);
if (cproject == null) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (!project.exists()) {
- abort("Project '"+ name + "' does not exist", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
+ abort( LaunchUIPlugin.getFormattedResourceString("AbstractCLaunchDelegate.Project_NAME_does_not_exist", name), null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT); //$NON-NLS-1$
}
else if (!project.isOpen()) {
- abort("Project '"+ name + "' is closed", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
+ abort( LaunchUIPlugin.getFormattedResourceString("AbstractCLaunchDelegate.Project_NAME_is_closed", name), null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT); //$NON-NLS-1$
}
- abort("Project is not a C/C++ project", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
+ abort(LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.Not_a_C_CPP_project"), null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT); //$NON-NLS-1$
}
return cproject;
}
@@ -403,12 +403,12 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
ICProject cproject = verifyCProject(config);
String fileName = getProgramName(config);
if (fileName == null) {
- abort("Program file not specified", null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM);
+ abort(LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.Program_file_not_specified"), null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM); //$NON-NLS-1$
}
IFile programPath = ((IProject) cproject.getResource()).getFile(fileName);
if (programPath == null || !programPath.exists() || !programPath.getLocation().toFile().exists()) {
- abort("Program file does not exist", new FileNotFoundException(programPath.getLocation() + " not found."), ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_EXIST);
+ abort(LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.Program_file_does_not_exist"), new FileNotFoundException(LaunchUIPlugin.getFormattedResourceString("AbstractCLaunchDelegate.PROGRAM_PATH_not_found", programPath.getLocation().toOSString())), ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_EXIST); //$NON-NLS-1$ //$NON-NLS-2$
}
return programPath;
}
@@ -445,8 +445,8 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
}
else {
abort(
- "Working directory does not exist",
- new FileNotFoundException(path.toOSString() + " not found."),
+ LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.Working_directory_does_not_exist"), //$NON-NLS-1$
+ new FileNotFoundException( LaunchUIPlugin.getFormattedResourceString("AbstractCLaunchDelegate.PROGRAM_PATH_not_found", path.toOSString())), //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST);
}
}
@@ -457,8 +457,8 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
}
else {
abort(
- "Working directory does not exist",
- new FileNotFoundException(path.toOSString() + "Does not exsit."),
+ LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.Working_directory_does_not_exist"), //$NON-NLS-1$
+ new FileNotFoundException( LaunchUIPlugin.getFormattedResourceString("AbstractCLaunchDelegate.PROGRAM_PATH_does_not_exist", path.toOSString())), //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST);
}
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
index 74bd70f3387..3392740f738 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
@@ -118,7 +118,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut, ILaunchFilte
String os = BootLoader.getOS();
for (int i = 0; i < debugConfigs.length; i++) {
String platform = debugConfigs[i].getPlatform();
- if (platform == null || platform.equals("native") || platform.equals(os)) {
+ if (platform == null || platform.equals(ICDebugConfiguration.PLATFORM_NATIVE) || platform.equals(os)) {
debugList.add(debugConfigs[i]);
}
}
@@ -203,7 +203,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut, ILaunchFilte
*/
public String getText(Object element) {
if (element == null) {
- return "";
+ return ""; //$NON-NLS-1$
} else if (element instanceof ICDebugConfiguration) {
return ((ICDebugConfiguration) element).getName();
}
@@ -304,8 +304,8 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut, ILaunchFilte
dialog.setElements(binList.toArray());
dialog.setTitle(getBinarySelectionDialogTitleString(binList, mode)); //$NON-NLS-1$
dialog.setMessage(getBinarySelectionDialogMessageString(binList, mode)); //$NON-NLS-1$
- dialog.setUpperListLabel("Binaries:");
- dialog.setLowerListLabel("Qualifier:");
+ dialog.setUpperListLabel(LaunchUIPlugin.getResourceString("Launch.common.BinariesColon")); //$NON-NLS-1$
+ dialog.setLowerListLabel(LaunchUIPlugin.getResourceString("Launch.common.QualifierColon")); //$NON-NLS-1$
dialog.setMultipleSelection(false);
if (dialog.open() == ElementListSelectionDialog.OK) {
return (IBinary) dialog.getFirstResult();
@@ -376,12 +376,12 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut, ILaunchFilte
} catch (InterruptedException e) {
return;
} catch (InvocationTargetException e) {
- MessageDialog.openError(getShell(), "Application Launcher", e.getMessage());
+ MessageDialog.openError(getShell(), LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.Application_Launcher"), e.getMessage()); //$NON-NLS-1$
return;
}
int count = results.size();
if (count == 0) {
- MessageDialog.openError(getShell(), "Application Launcher", "Launch failed no binaries");
+ MessageDialog.openError(getShell(), LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.Application_Launcher"), LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.Launch_failed_no_binaries")); //$NON-NLS-1$ //$NON-NLS-2$
} else if (count > 1) {
bin = chooseBinary(results, mode);
} else {
@@ -392,7 +392,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut, ILaunchFilte
launch(bin, mode);
}
} else {
- MessageDialog.openError(getShell(), "Application Launcher", "Launch failed no project selected");
+ MessageDialog.openError(getShell(), LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.Application_Launcher"), LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.Launch_failed_no_project_selected")); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
index c0fb322dd31..7b00758db4c 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
@@ -36,7 +36,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
monitor = new NullProgressMonitor();
}
- monitor.beginTask("Launching postmortem debugger", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(LaunchUIPlugin.getResourceString("CoreFileLaunchDelegate.Launching_postmortem_debugger"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
// check for cancellation
if (monitor.isCanceled()) {
return;
@@ -49,7 +49,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
IPath corefile = getCoreFilePath((IProject) cproject.getResource());
if (corefile == null) {
- cancel("No Corefile selected", ICDTLaunchConfigurationConstants.ERR_NO_COREFILE);
+ cancel(LaunchUIPlugin.getResourceString("CoreFileLaunchDelegate.No_Corefile_selected"), ICDTLaunchConfigurationConstants.ERR_NO_COREFILE); //$NON-NLS-1$
}
Process debugger = null;
IProcess debuggerProcess = null;
@@ -57,10 +57,10 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
dsession = debugConfig.getDebugger().createCoreSession(config, exeFile, corefile);
debugger = dsession.getSessionProcess();
} catch (CDIException e) {
- abort("Failed Launching CDI Debugger", e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ abort(LaunchUIPlugin.getResourceString("CoreFileLaunchDelegate.Failed_Launching_CDI_Debugger"), e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
}
if ( debugger != null ) {
- debuggerProcess = DebugPlugin.newProcess(launch, debugger, "Debug Console");
+ debuggerProcess = DebugPlugin.newProcess(launch, debugger, "Debug Console"); //$NON-NLS-1$
launch.removeProcess(debuggerProcess);
}
// set the source locator
@@ -80,20 +80,20 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
final Shell shell = LaunchUIPlugin.getShell();
final String res[] = { null };
if (shell == null) {
- abort("No Shell available in Launch", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ abort(LaunchUIPlugin.getResourceString("CoreFileLaunchDelegate.No_Shell_available_in_Launch"), null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
}
Display display = shell.getDisplay();
display.syncExec(new Runnable() {
public void run() {
FileDialog dialog = new FileDialog(shell);
- dialog.setText("Select Corefile");
+ dialog.setText(LaunchUIPlugin.getResourceString("CoreFileLaunchDelegate.Select_Corefile")); //$NON-NLS-1$
String initPath = null;
try {
- initPath = project.getPersistentProperty(new QualifiedName(LaunchUIPlugin.getUniqueIdentifier(), "SavePath"));
+ initPath = project.getPersistentProperty(new QualifiedName(LaunchUIPlugin.getUniqueIdentifier(), "SavePath")); //$NON-NLS-1$
} catch (CoreException e) {
}
- if (initPath == null || initPath.equals("")) {
+ if (initPath == null || initPath.equals("")) { //$NON-NLS-1$
initPath = project.getLocation().toString();
}
dialog.setFilterPath(initPath);
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
index 55f76e69208..a0077d2ea36 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
@@ -60,7 +60,7 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
monitor = new NullProgressMonitor();
}
- monitor.beginTask("Launching Local C Application", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.Launching_Local_C_Application"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
// check for cancellation
if (monitor.isCanceled()) {
return;
@@ -99,7 +99,7 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
IProcess iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(commandArray[0]));
debugger = dsession.getSessionProcess();
if ( debugger != null ) {
- debuggerProcess = DebugPlugin.newProcess(launch, debugger, "Debug Console");
+ debuggerProcess = DebugPlugin.newProcess(launch, debugger, "Debug Console"); //$NON-NLS-1$
launch.removeProcess(debuggerProcess);
}
boolean stopInMain = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
@@ -117,12 +117,12 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
} else if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH)) {
int pid = getProcessID();
if (pid == -1) {
- cancel("No Process ID selected", ICDTLaunchConfigurationConstants.ERR_NO_PROCESSID);
+ cancel(LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.No_Process_ID_selected"), ICDTLaunchConfigurationConstants.ERR_NO_PROCESSID); //$NON-NLS-1$
}
dsession = debugConfig.getDebugger().createAttachSession(config, exeFile, pid);
debugger = dsession.getSessionProcess();
if ( debugger != null ) {
- debuggerProcess = DebugPlugin.newProcess(launch, debugger, "Debug Console");
+ debuggerProcess = DebugPlugin.newProcess(launch, debugger, "Debug Console"); //$NON-NLS-1$
launch.removeProcess(debuggerProcess);
}
CDebugModel.newAttachDebugTarget(
@@ -133,12 +133,12 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
exeFile);
}
} catch (CDIException e) {
- abort("Failed Launching CDI Debugger", e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ abort(LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.Failed_Launching_CDI_Debugger"), e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
}
} else {
File wd = getWorkingDirectory(config);
if (wd == null) {
- wd = new File(System.getProperty("user.home", ".")); //NON-NLS-1;
+ wd = new File(System.getProperty("user.home", ".")); //NON-NLS-1; //$NON-NLS-1$//$NON-NLS-2$
}
Process process = exec(commandArray, getEnvironmentProperty(config), wd);
DebugPlugin.newProcess(launch, process, renderProcessLabel(commandArray[0]));
@@ -152,7 +152,7 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
final Shell shell = LaunchUIPlugin.getShell();
final int pid[] = { -1 };
if (shell == null) {
- abort("No Shell availible in Launch", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ abort(LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.No_Shell_available_in_Launch"), null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
}
Display display = shell.getDisplay();
display.syncExec(new Runnable() {
@@ -164,7 +164,7 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
public String getText(Object element) {
IProcessInfo info = (IProcessInfo)element;
IPath path = new Path(info.getName());
- return path.lastSegment() + " - " + info.getPid();
+ return path.lastSegment() + " - " + info.getPid(); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
@@ -186,11 +186,11 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
}
};
TwoPaneElementSelector dialog = new TwoPaneElementSelector(shell, provider, qprovider);
- dialog.setTitle("Select Process");
- dialog.setMessage("Select a Process to attach debugger to:");
+ dialog.setTitle(LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.Select_Process")); //$NON-NLS-1$
+ dialog.setMessage(LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.Select_Process_to_attach_debugger_to")); //$NON-NLS-1$
IProcessList plist = CCorePlugin.getDefault().getProcessList();
if (plist == null) {
- MessageDialog.openError(shell, "CDT Launch Error", "Current platform does not support listing processes");
+ MessageDialog.openError(shell, LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.CDT_Launch_Error"), LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.Platform_cannot_list_processes")); //$NON-NLS-1$ //$NON-NLS-2$
return;
}
dialog.setElements(plist.getProcessList());
@@ -229,7 +229,7 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
if (names != null) {
while (names.hasMoreElements()) {
String key = (String) names.nextElement();
- envList.add(key + "=" + props.getProperty(key));
+ envList.add(key + "=" + props.getProperty(key)); //$NON-NLS-1$
}
envp = (String[]) envList.toArray(new String[envList.size()]);
}
@@ -244,7 +244,7 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
if (p != null) {
p.destroy();
}
- abort("Error starting process", e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ abort(LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.Error_starting_process"), e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
} catch (NoSuchMethodError e) {
//attempting launches on 1.2.* - no ability to set working directory
@@ -253,7 +253,7 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
IStatus.ERROR,
LaunchUIPlugin.getUniqueIdentifier(),
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_NOT_SUPPORTED,
- "Eclipse runtime does not support working directory",
+ LaunchUIPlugin.getResourceString("LocalCLaunchConfigurationDelegate.Does_not_support_working_dir"), //$NON-NLS-1$
e);
IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java
index 0f0ae625317..34b2d1a76c6 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java
@@ -193,7 +193,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
setErrorMessage(null);
setMessage(null);
if (getDebugConfig() == null) {
- setErrorMessage("No debugger available");
+ setErrorMessage(LaunchUIPlugin.getResourceString("AbstractCDebuggerTab.No_debugger_available")); //$NON-NLS-1$
return false;
}
@@ -217,7 +217,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
}
public String getName() {
- return "Debugger";
+ return LaunchUIPlugin.getResourceString("AbstractCDebuggerTab.Debugger"); //$NON-NLS-1$
}
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/CoreFileCLaunchConfigurationTabGroup.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/CoreFileCLaunchConfigurationTabGroup.java
index 2013c1225fb..74afef09429 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/CoreFileCLaunchConfigurationTabGroup.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/CoreFileCLaunchConfigurationTabGroup.java
@@ -32,7 +32,7 @@ public class CoreFileCLaunchConfigurationTabGroup extends AbstractLaunchConfigur
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
// This configuration should work for all platforms
- configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PLATFORM, "*");
+ configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PLATFORM, "*"); //$NON-NLS-1$
super.setDefaults(configuration);
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java
index e23c11d3d27..50a55c371c2 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java
@@ -23,20 +23,20 @@ public class LaunchImages {
private static URL fgIconBaseURL;
static {
try {
- fgIconBaseURL= new URL(LaunchUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/" );
+ fgIconBaseURL= new URL(LaunchUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/" ); //$NON-NLS-1$
} catch (MalformedURLException e) {
//LaunchUIPlugin.getDefault().log(e);
}
}
- private static final String T_TABS = "tabs/";
- private static final String T_OBJS = "obj16/";
+ private static final String T_TABS = "tabs/"; //$NON-NLS-1$
+ private static final String T_OBJS = "obj16/"; //$NON-NLS-1$
- public static String IMG_VIEW_MAIN_TAB = NAME_PREFIX + "main_tab.gif";
- public static String IMG_VIEW_ARGUMENTS_TAB = NAME_PREFIX + "arguments_tab.gif";
- public static String IMG_VIEW_ENVIRONMENT_TAB = NAME_PREFIX + "environment_tab.gif";
- public static String IMG_VIEW_DEBUGGER_TAB = NAME_PREFIX + "debugger_tab.gif";
- public static String IMG_VIEW_SOURCE_TAB = NAME_PREFIX + "source_tab.gif";
+ public static String IMG_VIEW_MAIN_TAB = NAME_PREFIX + "main_tab.gif"; //$NON-NLS-1$
+ public static String IMG_VIEW_ARGUMENTS_TAB = NAME_PREFIX + "arguments_tab.gif"; //$NON-NLS-1$
+ public static String IMG_VIEW_ENVIRONMENT_TAB = NAME_PREFIX + "environment_tab.gif"; //$NON-NLS-1$
+ public static String IMG_VIEW_DEBUGGER_TAB = NAME_PREFIX + "debugger_tab.gif"; //$NON-NLS-1$
+ public static String IMG_VIEW_SOURCE_TAB = NAME_PREFIX + "source_tab.gif"; //$NON-NLS-1$
public static final ImageDescriptor DESC_TAB_MAIN= createManaged(T_TABS, IMG_VIEW_MAIN_TAB);
public static final ImageDescriptor DESC_TAB_ARGUMENTS = createManaged(T_TABS, IMG_VIEW_ARGUMENTS_TAB);
@@ -44,7 +44,7 @@ public class LaunchImages {
public static final ImageDescriptor DESC_TAB_DEBUGGER = createManaged(T_TABS, IMG_VIEW_DEBUGGER_TAB);
public static final ImageDescriptor DESC_TAB_SOURCE = createManaged(T_TABS, IMG_VIEW_SOURCE_TAB);
- public static String IMG_OBJS_EXEC= NAME_PREFIX + "exec_obj.gif";
+ public static String IMG_OBJS_EXEC= NAME_PREFIX + "exec_obj.gif"; //$NON-NLS-1$
public static final ImageDescriptor DESC_OBJS_EXEC = createManaged(T_OBJS, IMG_OBJS_EXEC);
public static void initialize() {
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
index c6ccf3728a3..ee194c22f9e 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
@@ -17,6 +17,12 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.text.MessageFormat;
+
+
/*
* (c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
@@ -25,6 +31,22 @@ public class LaunchUIPlugin extends AbstractUIPlugin
implements IDebugEventSetListener {
public static final String PLUGIN_ID = LaunchUIPlugin.getUniqueIdentifier();
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.launch.internal.ui.LaunchUIPluginResources";//$NON-NLS-1$
+ private static ResourceBundle resourceBundle = null;
+
+ // -------- static methods --------
+
+ static {
+ if ( resourceBundle == null ) {
+ // Acquire a reference to the .properties file for this plug-in
+ try {
+ resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
+ } catch (MissingResourceException e) {
+ resourceBundle = null;
+ }
+ }
+ }
+
/**
* Launch UI plug-in instance
*/
@@ -149,7 +171,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin
log(status);
Shell shell = getActiveWorkbenchShell();
if (shell != null) {
- ErrorDialog.openError(shell, "Error", message, status);
+ ErrorDialog.openError(shell, LaunchUIPlugin.getResourceString("LaunchUIPlugin.Error"), message, status); //$NON-NLS-1$
}
}
@@ -158,7 +180,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin
Shell shell = getActiveWorkbenchShell();
if (shell != null) {
IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), 1, t.getMessage(), null); //$NON-NLS-1$
- ErrorDialog.openError(shell, "Error", message, status);
+ ErrorDialog.openError(shell, LaunchUIPlugin.getResourceString("LaunchUIPlugin.Error"), message, status); //$NON-NLS-1$
}
}
/**
@@ -204,6 +226,40 @@ public class LaunchUIPlugin extends AbstractUIPlugin
}
}
}
- }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ return resourceBundle;
+ }
+
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = LaunchUIPlugin.getDefault().getResourceBundle();
+
+ // No point trying if bundle is null as exceptions are costly
+ if ( bundle != null )
+ {
+ try {
+ return bundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (NullPointerException e) {
+ return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ // If we get here, then bundle is null.
+ return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public static String getFormattedResourceString(String key, String arg) {
+ return MessageFormat.format(getResourceString(key), new String[] { arg });
+ }
+
+ public static String getFormattedResourceString(String key, String[] args) {
+ return MessageFormat.format(getResourceString(key), args);
+ }
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties
new file mode 100644
index 00000000000..36b2fa7147c
--- /dev/null
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPluginResources.properties
@@ -0,0 +1,105 @@
+
+AbstractCLaunchDelegate.Debugger_not_installed=CDT Debugger not installed
+AbstractCLaunchDelegate.C_Project_not_specified=C Project not specified
+AbstractCLaunchDelegate.Not_a_C_CPP_project=Project is not a C/C++ project
+AbstractCLaunchDelegate.Program_file_not_specified=Program file not specified
+AbstractCLaunchDelegate.Program_file_does_not_exist=Program file does not exist
+AbstractCLaunchDelegate.Working_directory_does_not_exist=Working directory does not exist
+AbstractCLaunchDelegate.Project_NAME_does_not_exist=Project {0} does not exist
+AbstractCLaunchDelegate.Project_NAME_is_closed=Project {0} is closed
+AbstractCLaunchDelegate.PROGRAM_PATH_not_found={0} not found
+AbstractCLaunchDelegate.PROGRAM_PATH_does_not_exist={0} Does not exist.
+
+LocalCLaunchConfigurationDelegate.Launching_Local_C_Application=Launching Local C Application
+LocalCLaunchConfigurationDelegate.No_Process_ID_selected=No Process ID selected
+LocalCLaunchConfigurationDelegate.Failed_Launching_CDI_Debugger=Failed Launching CDI Debugger
+LocalCLaunchConfigurationDelegate.No_Shell_available_in_Launch=No Shell available in Launch
+LocalCLaunchConfigurationDelegate.Select_Process=Select Process
+LocalCLaunchConfigurationDelegate.CDT_Launch_Error=CDT Launch Error
+LocalCLaunchConfigurationDelegate.Platform_cannot_list_processes=Current platform does not support listing processes
+LocalCLaunchConfigurationDelegate.Error_starting_process=Error starting process
+LocalCLaunchConfigurationDelegate.Does_not_support_working_dir=Eclipse runtime does not support working directory
+LocalCLaunchConfigurationDelegate.Select_Process_to_attach_debugger_to=Select a Process to attach debugger to:
+
+CoreFileLaunchDelegate.Launching_postmortem_debugger=Launching postmortem debugger
+CoreFileLaunchDelegate.No_Corefile_selected=No Corefile selected
+CoreFileLaunchDelegate.Failed_Launching_CDI_Debugger=Failed Launching CDI Debugger
+CoreFileLaunchDelegate.No_Shell_available_in_Launch=No Shell available in Launch
+CoreFileLaunchDelegate.Select_Corefile=Select Corefile
+
+CApplicationLaunchShortcut.Application_Launcher=Application Launcher
+CApplicationLaunchShortcut.Launch_failed_no_binaries=Launch failed no binaries
+CApplicationLaunchShortcut.Launch_failed_no_project_selected=Launch failed no project selected
+
+AbstractCDebuggerTab.No_debugger_available=No debugger available
+AbstractCDebuggerTab.Debugger=Debugger
+
+LaunchUIPlugin.Error=Error
+
+CSourceLookupTab.Source=Source
+
+CorefileDebuggerTab.Debugger_Options=Debugger Options
+CorefileDebuggerTab.No_debugger_available=No debugger available
+
+CMainTab.Project_required=Project required
+CMainTab.Enter_project_before_searching_for_program=Project must first be entered before searching for a program
+CMainTab.Program_Selection=Program Selection
+CMainTab.Enter_project_before_browsing_for_program=Project must first be entered before browsing for a program
+CMainTab.Program_selection=Program selection
+CMainTab.Selection_must_be_file=Selection must be a file
+CMainTab.Selection_must_be_binary_file=Selection must be a binary file
+CMainTab.Project_Selection=Project Selection
+CMainTab.Choose_project_to_constrain_search_for_program=Choose a &project to constrain the search for a program
+CMainTab.Project_not_specified=Project not specified
+CMainTab.Program_not_specified=Program not specified
+CMainTab.Project_must_be_opened=Project must be opened
+CMainTab.Program_does_not_exist=Program does not exist
+CMainTab.Main=Main
+CMainTab.&ProjectColon=&Project:
+CMainTab.C/C++_Application=C/C++ Application:
+CMainTab.Search...=Searc&h...
+CMainTab.Choose_program_to_run=Choose a &program to run:
+CMainTab.Choose_program_to_run_from_NAME=Choose a program to run from {0}:
+
+CDebuggerTab.Run_program_in_debugger=Run program in debugger.
+CDebuggerTab.Attach_to_running_process=Attach to running process.
+CDebuggerTab.Stop_at_main_on_startup=Stop at main() on startup.
+CDebuggerTab.Automatically_track_values_of_variables=Automatically track the values of variables.
+CDebuggerTab.Debugger_Options=Debugger Options
+CDebuggerTab.No_debugger_available=No debugger available
+CDebuggerTab.Select_Debug_mode=Select a Debug mode.
+
+CEnvironmentTab.Edit_Variable=Edit Variable
+CEnvironmentTab.New_Variable=New Variable
+CEnvironmentTab.NameColon=Name:
+CEnvironmentTab.ValueColon=Value:
+CEnvironmentTab.Name=Name
+CEnvironmentTab.Value=Value
+CEnvironmentTab.New...=New...
+CEnvironmentTab.Import...=Import...
+CEnvironmentTab.Edit...=Edit...
+CEnvironmentTab.Remove=Remove
+CEnvironmentTab.Environment=Environment
+CEnvironmentTab.Existing_Environment_Variable=Existing Environment Variable
+CEnvironmentTab.Environment_variable_NAME_exists=Environment variable \" {0} \" exists.\nDo you want to overwrite?
+
+CArgumentsTab.C/C++_Program_Arguments=C/C++ Program Arguments:
+CArgumentsTab.Arguments=Arguments
+
+WorkingDirectoryBlock.Wor&king_directory=Wor&king directory:
+WorkingDirectoryBlock.Use_de&fault_working_directory=Use de&fault working directory
+WorkingDirectoryBlock.&Local_directory=&Local directory
+WorkingDirectoryBlock.Works&pace=Works&pace
+WorkingDirectoryBlock.Select_&working_directory_for_launch_configuration=Select a &working directory for the launch configuration
+WorkingDirectoryBlock.Select_&workspace_relative_working_directory=Select a &workspace relative working directory
+WorkingDirectoryBlock.Working_directory_does_not_exist=Working directory does not exist
+WorkingDirectoryBlock.Working_directory_is_not_a_directory=Working directory is not a directory
+WorkingDirectoryBlock.Project_or_folder_does_not_exist=Specified project or folder does not exist.
+WorkingDirectoryBlock.Working_Directory=Working Directory
+
+Launch.common.Exception_occurred_reading_configuration_EXCEPTION=Exception occurred reading configuration {0}
+Launch.common.DebuggerColon=Debugger:
+Launch.common.BinariesColon=Binaries:
+Launch.common.QualifierColon=Qualifier:
+Launch.common.B&rowse...=B&rowse...
+Launch.common.Project_does_not_exist=Project does not exist \ No newline at end of file
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
index 5867bae887c..5e7d9255391 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
@@ -75,13 +75,13 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
setControl(workingDirComp);
fWorkingDirLabel = new Label(workingDirComp, SWT.NONE);
- fWorkingDirLabel.setText("Wor&king directory:");
+ fWorkingDirLabel.setText(LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Wor&king_directory")); //$NON-NLS-1$
gd = new GridData();
gd.horizontalSpan = 3;
fWorkingDirLabel.setLayoutData(gd);
fUseDefaultWorkingDirButton = new Button(workingDirComp,SWT.CHECK);
- fUseDefaultWorkingDirButton.setText("Use de&fault working directory");
+ fUseDefaultWorkingDirButton.setText(LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Use_de&fault_working_directory")); //$NON-NLS-1$
gd = new GridData();
gd.horizontalSpan = 3;
fUseDefaultWorkingDirButton.setLayoutData(gd);
@@ -91,7 +91,7 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
}
});
- fLocalDirButton = createRadioButton(workingDirComp, "&Local directory");
+ fLocalDirButton = createRadioButton(workingDirComp, LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.&Local_directory")); //$NON-NLS-1$
fLocalDirButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleLocationButtonSelected();
@@ -107,14 +107,14 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
}
});
- fWorkingDirBrowseButton = createPushButton(workingDirComp, "&Browse", null);
+ fWorkingDirBrowseButton = createPushButton(workingDirComp, LaunchUIPlugin.getResourceString("Launch.common.B&rowse..."), null); //$NON-NLS-1$
fWorkingDirBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleWorkingDirBrowseButtonSelected();
}
});
- fWorkspaceDirButton = createRadioButton(workingDirComp, "Works&pace");
+ fWorkspaceDirButton = createRadioButton(workingDirComp, LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Works&pace")); //$NON-NLS-1$
fWorkspaceDirButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleLocationButtonSelected();
@@ -130,7 +130,7 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
}
});
- fWorkspaceDirBrowseButton = createPushButton(workingDirComp, "B&rowse...", null);
+ fWorkspaceDirBrowseButton = createPushButton(workingDirComp, LaunchUIPlugin.getResourceString("Launch.common.B&rowse..."), null); //$NON-NLS-1$
fWorkspaceDirBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleWorkspaceDirBrowseButtonSelected();
@@ -150,7 +150,7 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
*/
protected void handleWorkingDirBrowseButtonSelected() {
DirectoryDialog dialog = new DirectoryDialog(getShell());
- dialog.setMessage("Select a &working directory for the launch configuration");
+ dialog.setMessage(LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Select_&working_directory_for_launch_configuration")); //$NON-NLS-1$
String currentWorkingDir = fWorkingDirText.getText();
if (!currentWorkingDir.trim().equals(EMPTY_STRING)) {
File path = new File(currentWorkingDir);
@@ -173,7 +173,7 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(),
ResourcesPlugin.getWorkspace().getRoot(),
false,
- "Select a &workspace relative working directory");
+ LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Select_&workspace_relative_working_directory")); //$NON-NLS-1$
IContainer currentContainer = getContainer();
if (currentContainer != null) {
@@ -263,7 +263,7 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
}
}
- fWorkingDirText.setText(System.getProperty("user.dir"));
+ fWorkingDirText.setText(System.getProperty("user.dir")); //$NON-NLS-1$
fLocalDirButton.setSelection(true);
fWorkspaceDirButton.setSelection(false);
}
@@ -281,17 +281,17 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
if (workingDirPath.length() > 0) {
File dir = new File(workingDirPath);
if (!dir.exists()) {
- setErrorMessage("Working directory does not exist");
+ setErrorMessage(LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Working_directory_does_not_exist")); //$NON-NLS-1$
return false;
}
if (!dir.isDirectory()) {
- setErrorMessage("Working directory is not a directory_11");
+ setErrorMessage(LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Working_directory_is_not_a_directory")); //$NON-NLS-1$
return false;
}
}
} else {
if (getContainer() == null) {
- setErrorMessage("Specified project or folder does not exist.");
+ setErrorMessage(LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Project_or_folder_does_not_exist")); //$NON-NLS-1$
return false;
}
}
@@ -335,7 +335,7 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
}
handleUseDefaultWorkingDirButtonSelected();
} catch (CoreException e) {
- setErrorMessage("Exception occurred reading configuration " + e.getStatus().getMessage());
+ setErrorMessage(LaunchUIPlugin.getFormattedResourceString("Launch.common.Exception_occurred_reading_configuration_EXCEPTION", e.getStatus().getMessage())); //$NON-NLS-1$
LaunchUIPlugin.log(e);
}
}
@@ -374,7 +374,7 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
* @see ILaunchConfigurationTab#getName()
*/
public String getName() {
- return "Working Directory";
+ return LaunchUIPlugin.getResourceString("WorkingDirectoryBlock.Working_Directory"); //$NON-NLS-1$
}
/**
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
index 71d79f61ce4..b225da36909 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
@@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
+
/**
* A launch configuration tab that displays and edits program arguments,
* and working directory launch configuration attributes.
@@ -57,7 +58,7 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
createVerticalSpacer(comp, 1);
fPrgmArgumentsLabel = new Label(comp, SWT.NONE);
- fPrgmArgumentsLabel.setText("C/C++ Program Arguments:");
+ fPrgmArgumentsLabel.setText(LaunchUIPlugin.getResourceString("CArgumentsTab.C/C++_Program_Arguments")); //$NON-NLS-1$
fPrgmArgumentsText = new Text(comp, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 40;
@@ -105,7 +106,7 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
fWorkingDirectoryBlock.initializeFrom(configuration);
}
catch (CoreException e) {
- setErrorMessage("Exception occurred reading configuration " + e.getStatus().getMessage());
+ setErrorMessage(LaunchUIPlugin.getFormattedResourceString("Launch.common.Exception_occurred_reading_configuration_EXCEPTION", e.getStatus().getMessage())); //$NON-NLS-1$
LaunchUIPlugin.log(e);
}
}
@@ -137,7 +138,7 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
* @see ILaunchConfigurationTab#getName()
*/
public String getName() {
- return "Arguments";
+ return LaunchUIPlugin.getResourceString("CArgumentsTab.Arguments"); //$NON-NLS-1$
}
/**
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
index 2fbdc664550..fe71430c688 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
@@ -13,6 +13,7 @@ import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.launch.internal.ui.AbstractCDebuggerTab;
+import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
import org.eclipse.core.boot.BootLoader;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -31,6 +32,7 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.help.WorkbenchHelp;
+
public class CDebuggerTab extends AbstractCDebuggerTab {
protected Combo fDCombo;
@@ -56,7 +58,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
layout = new GridLayout(2, false);
comboComp.setLayout(layout);
Label dlabel = new Label(comboComp, SWT.NONE);
- dlabel.setText("Debugger:");
+ dlabel.setText(LaunchUIPlugin.getResourceString("Launch.common.DebuggerColon")); //$NON-NLS-1$
fDCombo = new Combo(comboComp, SWT.DROP_DOWN | SWT.READ_ONLY);
fDCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
@@ -69,7 +71,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
radioLayout.marginHeight = 0;
radioLayout.marginWidth = 0;
radioComp.setLayout(radioLayout);
- fRunButton = createRadioButton(radioComp, "Run program in debugger.");
+ fRunButton = createRadioButton(radioComp, LaunchUIPlugin.getResourceString("CDebuggerTab.Run_program_in_debugger")); //$NON-NLS-1$
fRunButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (fRunButton.getSelection() == true) {
@@ -80,7 +82,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
updateLaunchConfigurationDialog();
}
});
- fAttachButton = createRadioButton(radioComp, "Attach to running process.");
+ fAttachButton = createRadioButton(radioComp, LaunchUIPlugin.getResourceString("CDebuggerTab.Attach_to_running_process")); //$NON-NLS-1$
fAttachButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
updateLaunchConfigurationDialog();
@@ -96,7 +98,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
optionComp.setLayoutData(gd);
fStopInMain = new Button(optionComp, SWT.CHECK);
- fStopInMain.setText("Stop at main() on startup.");
+ fStopInMain.setText(LaunchUIPlugin.getResourceString("CDebuggerTab.Stop_at_main_on_startup")); //$NON-NLS-1$
fStopInMain.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
updateLaunchConfigurationDialog();
@@ -104,7 +106,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
});
fVarBookKeeping = new Button(optionComp, SWT.CHECK);
- fVarBookKeeping.setText("Automatically track the values of variables.");
+ fVarBookKeeping.setText(LaunchUIPlugin.getResourceString("CDebuggerTab.Automatically_track_values_of_variables")); //$NON-NLS-1$
fVarBookKeeping.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
updateLaunchConfigurationDialog();
@@ -112,7 +114,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
});
Group debuggerGroup = new Group(comp, SWT.SHADOW_ETCHED_IN);
- debuggerGroup.setText("Debugger Options");
+ debuggerGroup.setText(LaunchUIPlugin.getResourceString("CDebuggerTab.Debugger_Options")); //$NON-NLS-1$
setDynamicTabHolder(debuggerGroup);
GridLayout tabHolderLayout = new GridLayout();
tabHolderLayout.marginHeight = 0;
@@ -127,7 +129,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
protected void loadDebuggerComboBox(ILaunchConfiguration config, String selection) {
ICDebugConfiguration[] debugConfigs;
String configPlatform = getPlatform(config);
- String programCPU = "native";
+ String programCPU = ICDebugConfiguration.PLATFORM_NATIVE;
ICElement ce = getContext(config, configPlatform);
if (ce instanceof IBinary) {
IBinary bin = (IBinary) ce;
@@ -150,7 +152,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
String debuggerPlatform = debugConfigs[i].getPlatform();
boolean isNative = configPlatform.equals(BootLoader.getOS());
if (debuggerPlatform.equalsIgnoreCase(configPlatform)
- || (isNative && debuggerPlatform.equalsIgnoreCase("native"))) {
+ || (isNative && debuggerPlatform.equalsIgnoreCase(ICDebugConfiguration.PLATFORM_NATIVE))) {
if (debugConfigs[i].supportsCPU(programCPU)) {
fDCombo.add(debugConfigs[i].getName());
fDCombo.setData(Integer.toString(x), debugConfigs[i]);
@@ -165,7 +167,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
}
}
// if no selection meaning nothing in config the force initdefault on tab
- setInitializeDefault(selection.equals("") ? true : false);
+ setInitializeDefault(selection.equals("") ? true : false); //$NON-NLS-1$
fDCombo.select(selndx == -1 ? 0 : selndx);
//The behaviour is undefined for if the callbacks should be triggered for this,
@@ -215,7 +217,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
public void initializeFrom(ILaunchConfiguration config) {
super.initializeFrom(config);
try {
- String id = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, "");
+ String id = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, ""); //$NON-NLS-1$
if (getDebugConfig() == null || !getDebugConfig().getID().equals(id)) {
loadDebuggerComboBox(config, id);
}
@@ -261,14 +263,14 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
public boolean isValid(ILaunchConfiguration config) {
if (!validateDebuggerConfig(config)) {
- setErrorMessage("No debugger available");
+ setErrorMessage(LaunchUIPlugin.getResourceString("CDebuggerTab.No_debugger_available")); //$NON-NLS-1$
return false;
}
if (super.isValid(config) == false) {
return false;
}
if (!fRunButton.getSelection() && !fAttachButton.getSelection()) {
- setErrorMessage("Select a Debug mode.");
+ setErrorMessage(LaunchUIPlugin.getResourceString("CDebuggerTab.Select_Debug_mode")); //$NON-NLS-1$
return false;
}
return true;
@@ -278,7 +280,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
String platform = getPlatform(config);
ICElement ce = getContext(config, null);
String projectPlatform = getPlatform(config);
- String projectCPU = "native";
+ String projectCPU = ICDebugConfiguration.PLATFORM_NATIVE;
if (ce != null) {
if (ce instanceof IBinary) {
IBinary bin = (IBinary) ce;
@@ -291,7 +293,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
}
String debuggerPlatform = debugConfig.getPlatform();
boolean isNative = platform.equals(projectPlatform);
- if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (isNative && debuggerPlatform.equalsIgnoreCase("native"))) {
+ if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (isNative && debuggerPlatform.equalsIgnoreCase(ICDebugConfiguration.PLATFORM_NATIVE))) {
if (debugConfig.supportsCPU(projectCPU)) {
return true;
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java
index 8d070ee9822..defb00de4a9 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java
@@ -15,6 +15,7 @@ import java.util.Properties;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.launch.internal.ui.LaunchImages;
+import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -55,6 +56,7 @@ import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
+
public class CEnvironmentTab extends CLaunchConfigurationTab {
protected Properties fElements;
@@ -124,7 +126,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
protected void configureShell(Shell shell) {
super.configureShell(shell);
- String title = (fEdit) ? "Edit Variable" : "New Variable";
+ String title = (fEdit) ? LaunchUIPlugin.getResourceString("CEnvironmentTab.Edit_Variable") : LaunchUIPlugin.getResourceString("CEnvironmentTab.New_Variable"); //$NON-NLS-1$ //$NON-NLS-2$
shell.setText(title);
}
@@ -142,14 +144,14 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
int fieldWidthHint = convertWidthInCharsToPixels(metrics, 50);
Label label = new Label(composite, SWT.NONE);
- label.setText("Name:");
+ label.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.NameColon")); //$NON-NLS-1$
fTextName = new Text(composite, SWT.SINGLE | SWT.BORDER);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.grabExcessHorizontalSpace = true;
gd.widthHint = fieldWidthHint;
fTextName.setLayoutData(gd);
label = new Label(composite, SWT.NONE);
- label.setText("Value:");
+ label.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.ValueColon")); //$NON-NLS-1$
fTextValue = new Text(composite, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_BOTH);
gd.grabExcessHorizontalSpace = true;
@@ -265,11 +267,11 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
table.setLinesVisible(true);
TableColumn column1 = new TableColumn(table, SWT.NULL);
- column1.setText("Name");
+ column1.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.Name")); //$NON-NLS-1$
tableLayout.addColumnData(new ColumnWeightData(30));
TableColumn column2 = new TableColumn(table, SWT.NULL);
- column2.setText("Value");
+ column2.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.Value")); //$NON-NLS-1$
tableLayout.addColumnData(new ColumnWeightData(30));
fVariableList.addDoubleClickListener(new IDoubleClickListener() {
@@ -289,7 +291,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
composite.setLayout(new GridLayout(1, true));
fBtnNew = new Button(composite, SWT.NONE);
- fBtnNew.setText("New...");
+ fBtnNew.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.New...")); //$NON-NLS-1$
fBtnNew.setLayoutData(new GridData(GridData.FILL_BOTH));
fBtnNew.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -297,7 +299,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
}
});
fBtnImport = new Button(composite, SWT.NONE);
- fBtnImport.setText("Import...");
+ fBtnImport.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.Import...")); //$NON-NLS-1$
fBtnImport.setLayoutData(new GridData(GridData.FILL_BOTH));
fBtnImport.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -305,7 +307,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
}
});
fBtnEdit = new Button(composite, SWT.NONE);
- fBtnEdit.setText("Edit...");
+ fBtnEdit.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.Edit...")); //$NON-NLS-1$
fBtnEdit.setLayoutData(new GridData(GridData.FILL_BOTH));
fBtnEdit.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -313,7 +315,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
}
});
fBtnRemove = new Button(composite, SWT.NONE);
- fBtnRemove.setText("Remove");
+ fBtnRemove.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.Remove")); //$NON-NLS-1$
fBtnRemove.setLayoutData(new GridData(GridData.FILL_BOTH));
fBtnRemove.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -374,10 +376,10 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
continue;
}
- int demarcation = line.indexOf("=");
+ int demarcation = line.indexOf("="); //$NON-NLS-1$
if(demarcation == -1) {
key = line;
- value = "";
+ value = ""; //$NON-NLS-1$
} else {
key = line.substring(0, demarcation);
value = line.substring(demarcation + 1, line.length());
@@ -385,7 +387,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
if(fElements.getProperty(key) != null) {
boolean overwrite;
- overwrite = MessageDialog.openQuestion(getShell(), "Existing Environment Variable", "Environment variable \"" + key + "\" exists.\nDo you want to overwrite?");
+ overwrite = MessageDialog.openQuestion(getShell(), LaunchUIPlugin.getResourceString("CEnvironmentTab.Existing_Environment_Variable"), LaunchUIPlugin.getFormattedResourceString("CEnvironmentTab.Environment_variable_NAME_exists", key)); //$NON-NLS-1$ //$NON-NLS-2$
if(!overwrite) {
continue;
}
@@ -454,7 +456,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
public String getName() {
- return "Environment";
+ return LaunchUIPlugin.getResourceString("CEnvironmentTab.Environment"); //$NON-NLS-1$
}
/**
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java
index c7832d439bd..1b9c71664e0 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java
@@ -46,7 +46,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
}
catch (CoreException e) {
}
- if (projectName != null && !projectName.equals("")) {
+ if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
ICProject cProject = CCorePlugin.getDefault().getCoreModel().create(project);
if (cProject != null && cProject.exists()) {
@@ -73,12 +73,12 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
obj = ce;
}
if (obj instanceof ICElement) {
- if (platform != null && !platform.equals("*")) {
+ if (platform != null && !platform.equals("*")) { //$NON-NLS-1$
ICDescriptor descriptor;
try {
descriptor = CCorePlugin.getDefault().getCProjectDescription(((ICElement) obj).getCProject().getProject());
String projectPlatform = descriptor.getPlatform();
- if (!projectPlatform.equals(platform) && !projectPlatform.equals("*")) {
+ if (!projectPlatform.equals(platform) && !projectPlatform.equals("*")) { //$NON-NLS-1$
obj = null;
}
}
@@ -86,7 +86,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
}
}
if (obj != null) {
- if (programName == null || programName.equals("")) {
+ if (programName == null || programName.equals("")) { //$NON-NLS-1$
return (ICElement) obj;
}
ICElement ce = (ICElement) obj;
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
index 3bb97f84430..4063527d414 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
@@ -14,6 +14,7 @@ import org.eclipse.cdt.core.model.IBinary;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.internal.ui.CElementImageProvider;
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.launch.internal.ui.LaunchImages;
@@ -107,7 +108,7 @@ public class CMainTab extends CLaunchConfigurationTab {
projComp.setLayoutData(gd);
fProjLabel = new Label(projComp, SWT.NONE);
- fProjLabel.setText("&Project:");
+ fProjLabel.setText(LaunchUIPlugin.getResourceString("CMainTab.&ProjectColon")); //$NON-NLS-1$
gd = new GridData();
gd.horizontalSpan = 2;
fProjLabel.setLayoutData(gd);
@@ -121,7 +122,7 @@ public class CMainTab extends CLaunchConfigurationTab {
}
});
- fProjButton = createPushButton(projComp, "&Browse...", null);
+ fProjButton = createPushButton(projComp, LaunchUIPlugin.getResourceString("Launch.common.B&rowse..."), null); //$NON-NLS-1$
fProjButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleProjectButtonSelected();
@@ -140,7 +141,7 @@ public class CMainTab extends CLaunchConfigurationTab {
gd = new GridData(GridData.FILL_HORIZONTAL);
mainComp.setLayoutData(gd);
fProgLabel = new Label(mainComp, SWT.NONE);
- fProgLabel.setText("C/C++ Application:");
+ fProgLabel.setText(LaunchUIPlugin.getResourceString("CMainTab.C/C++_Application")); //$NON-NLS-1$
gd = new GridData();
gd.horizontalSpan = 3;
fProgLabel.setLayoutData(gd);
@@ -153,7 +154,7 @@ public class CMainTab extends CLaunchConfigurationTab {
}
});
- fSearchButton = createPushButton(mainComp, "Searc&h...", null);
+ fSearchButton = createPushButton(mainComp, LaunchUIPlugin.getResourceString("CMainTab.Search..."), null); //$NON-NLS-1$
fSearchButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleSearchButtonSelected();
@@ -162,7 +163,7 @@ public class CMainTab extends CLaunchConfigurationTab {
});
Button fBrowseForBinaryButton;
- fBrowseForBinaryButton = createPushButton(mainComp, "B&rowse...", null);
+ fBrowseForBinaryButton = createPushButton(mainComp, LaunchUIPlugin.getResourceString("Launch.common.B&rowse..."), null); //$NON-NLS-1$
fBrowseForBinaryButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleBinaryBrowseButtonSelected();
@@ -219,8 +220,8 @@ public class CMainTab extends CLaunchConfigurationTab {
if (getCProject() == null) {
MessageDialog.openInformation(
getShell(),
- "Project required",
- "Project must first be entered before searching for a program");
+ LaunchUIPlugin.getResourceString("CMainTab.Project_required"), //$NON-NLS-1$
+ LaunchUIPlugin.getResourceString("CMainTab.Enter_project_before_searching_for_program")); //$NON-NLS-1$
return;
}
@@ -261,8 +262,8 @@ public class CMainTab extends CLaunchConfigurationTab {
if (element instanceof IBinary) {
IBinary bin = (IBinary)element;
StringBuffer name = new StringBuffer();
- name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be"));
- name.append(" - ");
+ name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be")); //$NON-NLS-1$ //$NON-NLS-2$
+ name.append(" - "); //$NON-NLS-1$
name.append(bin.getPath().toString());
return name.toString();
}
@@ -272,10 +273,10 @@ public class CMainTab extends CLaunchConfigurationTab {
TwoPaneElementSelector dialog = new TwoPaneElementSelector(getShell(), programLabelProvider, qualifierLabelProvider);
dialog.setElements(getBinaryFiles(getCProject()));
- dialog.setMessage("Choose a &program to run:");
- dialog.setTitle("Program Selection");
- dialog.setUpperListLabel("Binaries:");
- dialog.setLowerListLabel("Qualifier:");
+ dialog.setMessage(LaunchUIPlugin.getResourceString("CMainTab.Choose_program_to_run")); //$NON-NLS-1$
+ dialog.setTitle(LaunchUIPlugin.getResourceString("CMainTab.Program_Selection")); //$NON-NLS-1$
+ dialog.setUpperListLabel(LaunchUIPlugin.getResourceString("Launch.common.BinariesColon")); //$NON-NLS-1$
+ dialog.setLowerListLabel(LaunchUIPlugin.getResourceString("Launch.common.QualifierColon")); //$NON-NLS-1$
dialog.setMultipleSelection(false);
//dialog.set
if (dialog.open() == ElementListSelectionDialog.OK) {
@@ -296,8 +297,8 @@ public class CMainTab extends CLaunchConfigurationTab {
if(cproject == null) {
MessageDialog.openInformation(
getShell(),
- "Project required",
- "Project must first be entered before browsing for a program");
+ LaunchUIPlugin.getResourceString("CMainTab.Project_required"), //$NON-NLS-1$
+ LaunchUIPlugin.getResourceString("CMainTab.Enter_project_before_browsing_for_program")); //$NON-NLS-1$
return;
}
@@ -305,26 +306,26 @@ public class CMainTab extends CLaunchConfigurationTab {
WorkbenchLabelProvider labelProvider = new WorkbenchLabelProvider();
WorkbenchContentProvider contentProvider = new WorkbenchContentProvider();
dialog = new ElementTreeSelectionDialog(getShell(), labelProvider, contentProvider);
- dialog.setTitle("Program selection");
- dialog.setMessage("Choose a program to run from " + cproject.getResource().getName() + ":");
+ dialog.setTitle(LaunchUIPlugin.getResourceString("CMainTab.Program_selection")); //$NON-NLS-1$
+ dialog.setMessage(LaunchUIPlugin.getFormattedResourceString("CMainTab.Choose_program_to_run_from_NAME", cproject.getResource().getName())); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.setAllowMultiple(false);
dialog.setInput(cproject.getResource());
dialog.setValidator(new ISelectionStatusValidator() {
public IStatus validate(Object [] selection) {
if(selection.length == 0 || !(selection[0] instanceof IFile)) {
- return new Status(IStatus.ERROR, LaunchUIPlugin.PLUGIN_ID, 1, "Selection must be a file", null);
+ return new Status(IStatus.ERROR, LaunchUIPlugin.PLUGIN_ID, 1, LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_file"), null); //$NON-NLS-1$
} else {
try {
ICElement celement = cproject.findElement(((IFile)selection[0]).getProjectRelativePath());
if(celement == null ||
(celement.getElementType() != ICElement.C_BINARY && celement.getElementType() != ICElement.C_ARCHIVE)) {
- return new Status(IStatus.ERROR, LaunchUIPlugin.PLUGIN_ID, 1, "Selection must be a binary file", null);
+ return new Status(IStatus.ERROR, LaunchUIPlugin.PLUGIN_ID, 1, LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_binary_file"), null); //$NON-NLS-1$
}
return new Status(IStatus.OK, LaunchUIPlugin.PLUGIN_ID, IStatus.OK, celement.getResource().getName(), null);
} catch(Exception ex) {
- return new Status(IStatus.ERROR, LaunchUIPlugin.PLUGIN_ID, 1, "Selection must be a binary file", null);
+ return new Status(IStatus.ERROR, LaunchUIPlugin.PLUGIN_ID, 1, LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_binary_file"), null); //$NON-NLS-1$
}
}
}
@@ -391,8 +392,8 @@ public class CMainTab extends CLaunchConfigurationTab {
ILabelProvider labelProvider = new CElementLabelProvider();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
- dialog.setTitle("Project Selection");
- dialog.setMessage("Choose a &project to constrain the search for a program");
+ dialog.setTitle(LaunchUIPlugin.getResourceString("CMainTab.Project_Selection")); //$NON-NLS-1$
+ dialog.setMessage(LaunchUIPlugin.getResourceString("CMainTab.Choose_project_to_constrain_search_for_program")); //$NON-NLS-1$
dialog.setElements(projects);
ICProject cProject = getCProject();
@@ -419,9 +420,9 @@ public class CMainTab extends CLaunchConfigurationTab {
try {
cdesciptor = CCorePlugin.getDefault().getCProjectDescription((IProject) cproject[i].getResource());
String projectPlatform = cdesciptor.getPlatform();
- if (filterPlatform.equals("*")
- || projectPlatform.equals("*")
- || (isNative && cdesciptor.getPlatform().equalsIgnoreCase("native"))
+ if (filterPlatform.equals("*") //$NON-NLS-1$
+ || projectPlatform.equals("*") //$NON-NLS-1$
+ || (isNative && cdesciptor.getPlatform().equalsIgnoreCase(ICDebugConfiguration.PLATFORM_NATIVE))
|| filterPlatform.equalsIgnoreCase(cdesciptor.getPlatform()) == true) {
list.add(cproject[i]);
}
@@ -453,30 +454,30 @@ public class CMainTab extends CLaunchConfigurationTab {
String name = fProjText.getText().trim();
if (name.length() == 0) {
- setErrorMessage("Project not specified");
+ setErrorMessage(LaunchUIPlugin.getResourceString("CMainTab.Project_not_specified")); //$NON-NLS-1$
return false;
}
if (!ResourcesPlugin.getWorkspace().getRoot().getProject(name).exists()) {
- setErrorMessage("Project does not exist");
+ setErrorMessage(LaunchUIPlugin.getResourceString("Launch.common.Project_does_not_exist")); //$NON-NLS-1$
return false;
}
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
name = fProgText.getText().trim();
if (name.length() == 0) {
- setErrorMessage("Program not specified");
+ setErrorMessage(LaunchUIPlugin.getResourceString("CMainTab.Program_not_specified")); //$NON-NLS-1$
return false;
}
- if (name.equals(".") || name.equals("..")) {
- setErrorMessage("Program does not exist");
+ if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
+ setErrorMessage(LaunchUIPlugin.getResourceString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
return false;
}
if (!project.isOpen()) {
- setErrorMessage("Project must be opened");
+ setErrorMessage(LaunchUIPlugin.getResourceString("CMainTab.Project_must_be_opened")); //$NON-NLS-1$
return false;
}
if (!project.getFile(name).exists()) {
- setErrorMessage("Program does not exist");
+ setErrorMessage(LaunchUIPlugin.getResourceString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
return false;
}
return true;
@@ -533,7 +534,7 @@ public class CMainTab extends CLaunchConfigurationTab {
* @see ILaunchConfigurationTab#getName()
*/
public String getName() {
- return "Main";
+ return LaunchUIPlugin.getResourceString("CMainTab.Main"); //$NON-NLS-1$
}
/**
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java
index ec7cc355dd2..8985393ba0e 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java
@@ -9,6 +9,7 @@ import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.debug.ui.sourcelookup.SourceLookupBlock;
import org.eclipse.cdt.launch.internal.ui.LaunchImages;
+import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -77,7 +78,7 @@ public class CSourceLookupTab extends CLaunchConfigurationTab
*/
public String getName()
{
- return "Source";
+ return LaunchUIPlugin.getResourceString("CSourceLookupTab.Source"); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -93,7 +94,7 @@ public class CSourceLookupTab extends CLaunchConfigurationTab
IProject project = null;
try
{
- String projectName = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "" );
+ String projectName = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "" ); //$NON-NLS-1$
if ( !isEmpty( projectName ) )
project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName );
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java
index 3bfbdf2e505..27dde39df52 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java
@@ -12,6 +12,7 @@ import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.launch.internal.ui.AbstractCDebuggerTab;
+import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -40,7 +41,7 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
GridLayout topLayout = new GridLayout(2, false);
comp.setLayout(topLayout);
Label dlabel = new Label(comp, SWT.NONE);
- dlabel.setText("Debugger:");
+ dlabel.setText(LaunchUIPlugin.getResourceString("Launch.common.DebuggerColon")); //$NON-NLS-1$
fDCombo = new Combo(comp, SWT.DROP_DOWN | SWT.READ_ONLY);
fDCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
@@ -48,7 +49,7 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
}
});
Group debuggerGroup = new Group(comp, SWT.SHADOW_ETCHED_IN);
- debuggerGroup.setText("Debugger Options");
+ debuggerGroup.setText(LaunchUIPlugin.getResourceString("CorefileDebuggerTab.Debugger_Options")); //$NON-NLS-1$
setDynamicTabHolder(debuggerGroup);
GridLayout tabHolderLayout = new GridLayout();
tabHolderLayout.marginHeight = 0;
@@ -68,8 +69,8 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
ICDebugConfiguration[] debugConfigs;
String configPlatform = getPlatform(config);
ICElement ce = getContext(config, null);
- String projectPlatform = "*";
- String projectCPU = "*";
+ String projectPlatform = "*"; //$NON-NLS-1$
+ String projectCPU = "*"; //$NON-NLS-1$
if (ce != null) {
try {
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(ce.getCProject().getProject());
@@ -87,7 +88,7 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
if (debugConfigs[i].supportsMode(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE)) {
String debuggerPlatform = debugConfigs[i].getPlatform();
boolean platformMatch = configPlatform.equals(projectPlatform);
- if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (platformMatch && projectPlatform.equals("*"))) {
+ if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (platformMatch && projectPlatform.equals("*"))) { //$NON-NLS-1$
if (debugConfigs[i].supportsCPU(projectCPU)) {
fDCombo.add(debugConfigs[i].getName());
fDCombo.setData(Integer.toString(x), debugConfigs[i]);
@@ -102,7 +103,7 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
}
}
// if no selection meaning nothing in config the force initdefault on tab
- setInitializeDefault(selection.equals("") ? true : false);
+ setInitializeDefault(selection.equals("") ? true : false); //$NON-NLS-1$
fDCombo.select(selndx == -1 ? 0 : selndx);
//The behaviour is undefined for if the callbacks should be triggered for this,
@@ -115,7 +116,7 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
public void initializeFrom(ILaunchConfiguration config) {
super.initializeFrom(config);
try {
- String id = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, "");
+ String id = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, ""); //$NON-NLS-1$
if (getDebugConfig() == null || !getDebugConfig().getID().equals(id)) {
loadDebuggerComboBox(config, id);
}
@@ -133,7 +134,7 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
public boolean isValid(ILaunchConfiguration config) {
if (!validateDebuggerConfig(config)) {
- setErrorMessage("No debugger available");
+ setErrorMessage(LaunchUIPlugin.getResourceString("CorefileDebuggerTab.No_debugger_available")); //$NON-NLS-1$
return false;
}
return super.isValid(config);
@@ -142,8 +143,8 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
private boolean validateDebuggerConfig(ILaunchConfiguration config) {
String platform = getPlatform(config);
ICElement ce = getContext(config, null);
- String projectPlatform = "*";
- String projectCPU = "*";
+ String projectPlatform = "*"; //$NON-NLS-1$
+ String projectCPU = "*"; //$NON-NLS-1$
if (ce != null) {
try {
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(ce.getCProject().getProject());
@@ -159,7 +160,7 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
}
String debuggerPlatform = debugConfig.getPlatform();
boolean platformMatch = platform.equals(projectPlatform);
- if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (platformMatch && projectPlatform.equals("*"))) {
+ if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (platformMatch && projectPlatform.equals("*"))) { //$NON-NLS-1$
if (debugConfig.supportsCPU(projectCPU)) {
return true;
}

Back to the top