mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 14:25:37 +02:00
NLS-style string resources.
This commit is contained in:
parent
2a8a5ec51a
commit
09fa3a7581
27 changed files with 894 additions and 773 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.launch; singleton:=true
|
||||
Bundle-Version: 6.2.0.qualifier
|
||||
Bundle-Version: 7.0.0.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
|
|
|
@ -71,6 +71,7 @@ import org.eclipse.debug.core.model.IProcess;
|
|||
import org.eclipse.debug.core.model.ISourceLocator;
|
||||
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
|
||||
import org.eclipse.debug.ui.RefreshTab;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.MessageFormat;
|
||||
|
@ -102,7 +103,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
final ILaunchConfiguration config = getLaunchConfiguration();
|
||||
try {
|
||||
if (RefreshTab.getRefreshScope(config) != null) {
|
||||
Job refreshJob = new Job("Refresh"){
|
||||
Job refreshJob = new Job(LaunchMessages.AbstractCLaunchDelegate_Refresh) {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
|
||||
|
@ -119,9 +120,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
refreshJob.setSystem(true);
|
||||
refreshJob.schedule();
|
||||
}
|
||||
}
|
||||
catch(CoreException e) {
|
||||
LaunchUIPlugin.log( e.getStatus() );
|
||||
} catch(CoreException e) {
|
||||
LaunchUIPlugin.log(e.getStatus());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
if (id == null) {
|
||||
ICProject cProject = CDebugUtils.getCProject(configuration);
|
||||
if (cProject == null) {
|
||||
abort(LaunchMessages.getString("Launch.common.Project_does_not_exist"), null, //$NON-NLS-1$
|
||||
abort(LaunchMessages.Launch_common_Project_does_not_exist, null,
|
||||
ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
||||
}
|
||||
sourceLocator = CDebugUIPlugin.createDefaultSourceLocator();
|
||||
|
@ -353,13 +353,11 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
ICDebugConfiguration dbgCfg = null;
|
||||
try {
|
||||
dbgCfg = CDebugCorePlugin.getDefault().getDebugConfiguration(
|
||||
config.getAttribute(
|
||||
ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID,
|
||||
"")); //$NON-NLS-1$
|
||||
config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, "")); //$NON-NLS-1$
|
||||
} catch (CoreException e) {
|
||||
IStatus status = new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(),
|
||||
ICDTLaunchConfigurationConstants.ERR_DEBUGGER_NOT_INSTALLED,
|
||||
LaunchMessages.getString("AbstractCLaunchDelegate.Debugger_not_installed"), //$NON-NLS-1$
|
||||
LaunchMessages.AbstractCLaunchDelegate_Debugger_not_installed,
|
||||
e);
|
||||
IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
|
||||
|
||||
|
@ -395,7 +393,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
String format = "{0} ({1})"; //$NON-NLS-1$
|
||||
String timestamp = DateFormat.getInstance().format(new Date(System.currentTimeMillis()));
|
||||
return MessageFormat.format(format, new String[]{
|
||||
LaunchMessages.getString("AbstractCLaunchDelegate.Debugger_Process"), timestamp}); //$NON-NLS-1$
|
||||
LaunchMessages.AbstractCLaunchDelegate_Debugger_Process, timestamp});
|
||||
}
|
||||
|
||||
|
||||
|
@ -410,17 +408,16 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
ICProject cproject = CDebugUtils.verifyCProject(config);
|
||||
String fileName = CDebugUtils.getProgramName(config);
|
||||
if (fileName == null) {
|
||||
abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_not_specified"), null, //$NON-NLS-1$
|
||||
abort(LaunchMessages.AbstractCLaunchDelegate_Program_file_not_specified, null,
|
||||
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM);
|
||||
}
|
||||
|
||||
IFile programPath = ((IProject)cproject.getResource()).getFile(fileName);
|
||||
if (programPath == null || !programPath.exists() || !programPath.getLocation().toFile().exists()) {
|
||||
abort(
|
||||
LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_does_not_exist"), //$NON-NLS-1$
|
||||
abort(LaunchMessages.AbstractCLaunchDelegate_Program_file_does_not_exist,
|
||||
new FileNotFoundException(
|
||||
LaunchMessages.getFormattedString(
|
||||
"AbstractCLaunchDelegate.PROGRAM_PATH_not_found", programPath.getLocation().toOSString())), //$NON-NLS-1$
|
||||
NLS.bind(LaunchMessages.AbstractCLaunchDelegate_PROGRAM_PATH_not_found,
|
||||
programPath.getLocation().toOSString())),
|
||||
ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_EXIST);
|
||||
}
|
||||
return programPath;
|
||||
|
@ -471,22 +468,21 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
if (dir.isDirectory()) {
|
||||
return dir;
|
||||
}
|
||||
abort(
|
||||
LaunchMessages.getString("AbstractCLaunchDelegate.Working_directory_does_not_exist"), //$NON-NLS-1$
|
||||
abort(LaunchMessages.AbstractCLaunchDelegate_Working_directory_does_not_exist,
|
||||
new FileNotFoundException(
|
||||
LaunchMessages.getFormattedString(
|
||||
"AbstractCLaunchDelegate.WORKINGDIRECTORY_PATH_not_found", path.toOSString())), //$NON-NLS-1$
|
||||
NLS.bind(LaunchMessages.AbstractCLaunchDelegate_WORKINGDIRECTORY_PATH_not_found,
|
||||
path.toOSString())),
|
||||
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST);
|
||||
} else {
|
||||
IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
|
||||
if (res instanceof IContainer && res.exists()) {
|
||||
return res.getLocation().toFile();
|
||||
}
|
||||
abort(
|
||||
LaunchMessages.getString("AbstractCLaunchDelegate.Working_directory_does_not_exist"), //$NON-NLS-1$
|
||||
abort(LaunchMessages.AbstractCLaunchDelegate_Working_directory_does_not_exist,
|
||||
new FileNotFoundException(
|
||||
LaunchMessages.getFormattedString(
|
||||
"AbstractCLaunchDelegate.WORKINGDIRECTORY_PATH_not_found", path.toOSString())), //$NON-NLS-1$
|
||||
NLS.bind(
|
||||
LaunchMessages.AbstractCLaunchDelegate_WORKINGDIRECTORY_PATH_not_found,
|
||||
path.toOSString())),
|
||||
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST);
|
||||
}
|
||||
}
|
||||
|
@ -602,15 +598,15 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
int totalWork = (orderedProjects.size() + 1) * scale;
|
||||
|
||||
try {
|
||||
monitor.beginTask(LaunchMessages.getString("AbstractCLaunchDelegate.building_projects"), totalWork); //$NON-NLS-1$
|
||||
monitor.beginTask(LaunchMessages.AbstractCLaunchDelegate_building_projects, totalWork);
|
||||
|
||||
for (Iterator i = orderedProjects.iterator(); i.hasNext();) {
|
||||
IProject proj = (IProject)i.next();
|
||||
monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.building") + proj.getName()); //$NON-NLS-1$
|
||||
monitor.subTask(LaunchMessages.AbstractCLaunchDelegate_building + proj.getName());
|
||||
proj.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(monitor, scale));
|
||||
}
|
||||
|
||||
monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.building") + project.getName()); //$NON-NLS-1$
|
||||
monitor.subTask(LaunchMessages.AbstractCLaunchDelegate_building + project.getName());
|
||||
setBuildConfiguration(configuration, project);
|
||||
project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(monitor, scale));
|
||||
} finally {
|
||||
|
@ -640,11 +636,10 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
ICConfigurationDescription buildConfig = LaunchUtils.getBuildConfigByProgramPath(buildProject, programPath);
|
||||
if (buildConfig != null)
|
||||
buildConfigID = buildConfig.getId();
|
||||
} else
|
||||
} else {
|
||||
buildConfigID = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, EMPTY_STR);
|
||||
|
||||
if (buildConfigID != null && buildConfigID.length() > 0 && projDes != null)
|
||||
{
|
||||
}
|
||||
if (buildConfigID != null && buildConfigID.length() > 0 && projDes != null) {
|
||||
ICConfigurationDescription buildConfiguration = projDes.getConfigurationById(buildConfigID);
|
||||
if (buildConfiguration != null) {
|
||||
preLaunchBuildConfiguration = projDes.getActiveConfiguration().getId();
|
||||
|
@ -670,7 +665,6 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
*/
|
||||
@Override
|
||||
public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
|
||||
|
||||
if (!workspaceBuildBeforeLaunch) {
|
||||
// buildForLaunch was not called which means that the workspace pref is disabled. see if the user enabled the
|
||||
// launch specific setting in the main tab. if so, we do call buildBeforeLaunch here.
|
||||
|
@ -678,10 +672,10 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING)) {
|
||||
|
||||
IProgressMonitor buildMonitor = new SubProgressMonitor(monitor, 10, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
|
||||
buildMonitor.beginTask(LaunchMessages.getString("AbstractCLaunchDelegate.BuildBeforeLaunch"), 10); //$NON-NLS-1$
|
||||
buildMonitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.PerformingBuild")); //$NON-NLS-1$
|
||||
buildMonitor.beginTask(LaunchMessages.AbstractCLaunchDelegate_BuildBeforeLaunch, 10);
|
||||
buildMonitor.subTask(LaunchMessages.AbstractCLaunchDelegate_PerformingBuild);
|
||||
if (buildForLaunch(configuration, mode, new SubProgressMonitor(buildMonitor, 7))) {
|
||||
buildMonitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.PerformingIncrementalBuild")); //$NON-NLS-1$
|
||||
buildMonitor.subTask(LaunchMessages.AbstractCLaunchDelegate_PerformingIncrementalBuild);
|
||||
ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(buildMonitor, 3));
|
||||
}
|
||||
else {
|
||||
|
@ -702,14 +696,13 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
int scale = 1000;
|
||||
int totalWork = (orderedProjects.size() + 1) * scale;
|
||||
try {
|
||||
monitor.beginTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors"), totalWork); //$NON-NLS-1$
|
||||
|
||||
monitor.beginTask(LaunchMessages.AbstractCLaunchDelegate_searching_for_errors, totalWork);
|
||||
boolean compileErrorsInProjs = false;
|
||||
|
||||
//check prerequisite projects for compile errors.
|
||||
for (Iterator i = orderedProjects.iterator(); i.hasNext();) {
|
||||
IProject proj = (IProject)i.next();
|
||||
monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors_in") + proj.getName()); //$NON-NLS-1$
|
||||
monitor.subTask(LaunchMessages.AbstractCLaunchDelegate_searching_for_errors_in + proj.getName());
|
||||
monitor.worked(scale);
|
||||
compileErrorsInProjs = existsErrors(proj);
|
||||
if (compileErrorsInProjs) {
|
||||
|
@ -719,7 +712,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
|
||||
//check current project, if prerequite projects were ok
|
||||
if (!compileErrorsInProjs) {
|
||||
monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors_in") + project.getName()); //$NON-NLS-1$
|
||||
monitor.subTask(LaunchMessages.AbstractCLaunchDelegate_searching_for_errors_in + project.getName());
|
||||
monitor.worked(scale);
|
||||
compileErrorsInProjs = existsErrors(project);
|
||||
}
|
||||
|
@ -804,7 +797,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
int totalWork = 2 * scale;
|
||||
|
||||
try {
|
||||
monitor.beginTask(LaunchMessages.getString("AbstractCLaunchDelegate.20"), totalWork); //$NON-NLS-1$
|
||||
monitor.beginTask(LaunchMessages.AbstractCLaunchDelegate_20, totalWork);
|
||||
|
||||
// build project list
|
||||
orderedProjects = null;
|
||||
|
@ -839,7 +832,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
}
|
||||
Status status = new Status(IStatus.ERROR,getPluginID(),
|
||||
ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_BINARY,
|
||||
LaunchMessages.getString("AbstractCLaunchDelegate.Program_is_not_a_recongnized_executable") + " " + exePath.toOSString(), //$NON-NLS-1$
|
||||
LaunchMessages.AbstractCLaunchDelegate_Program_is_not_a_recongnized_executable + " " + exePath.toOSString(),
|
||||
exception);
|
||||
throw new CoreException(status);
|
||||
}
|
||||
|
@ -851,8 +844,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
*/
|
||||
protected Properties getEnvironmentAsProperty(ILaunchConfiguration config) throws CoreException {
|
||||
String[] envp = getEnvironment(config);
|
||||
Properties p = new Properties( );
|
||||
for( int i = 0; i < envp.length; i++ ) {
|
||||
Properties p = new Properties();
|
||||
for(int i = 0; i < envp.length; i++) {
|
||||
int idx = envp[i].indexOf('=');
|
||||
if (idx != -1) {
|
||||
String key = envp[i].substring(0, idx);
|
||||
|
@ -949,7 +942,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
*/
|
||||
protected Map getDefaultProcessMap() {
|
||||
Map map = new HashMap();
|
||||
map.put( IProcess.ATTR_PROCESS_TYPE, ICDTLaunchConfigurationConstants.ID_PROGRAM_PROCESS_TYPE );
|
||||
map.put(IProcess.ATTR_PROCESS_TYPE, ICDTLaunchConfigurationConstants.ID_PROGRAM_PROCESS_TYPE);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ import org.eclipse.debug.core.IStatusHandler;
|
|||
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
|
||||
import org.eclipse.debug.internal.core.DebugCoreMessages;
|
||||
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
/**
|
||||
* AbstractCLaunchDelegate2 is used by most DSF based debuggers. It replaces AbstractCLaunchDelegate
|
||||
|
@ -453,7 +454,7 @@ public abstract class AbstractCLaunchDelegate2 extends LaunchConfigurationDelega
|
|||
@Override
|
||||
public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
|
||||
try {
|
||||
SubMonitor localMonitor = SubMonitor.convert(monitor, LaunchMessages.getString("AbstractCLaunchDelegate.BuildBeforeLaunch"), 10); //$NON-NLS-1$
|
||||
SubMonitor localMonitor = SubMonitor.convert(monitor, LaunchMessages.AbstractCLaunchDelegate_BuildBeforeLaunch, 10);
|
||||
|
||||
if (!workspaceBuildBeforeLaunch) {
|
||||
// buildForLaunch was not called which means that the workspace pref is disabled. see if the user enabled the
|
||||
|
@ -461,9 +462,9 @@ public abstract class AbstractCLaunchDelegate2 extends LaunchConfigurationDelega
|
|||
if (ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_ENABLED == configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_BUILD_BEFORE_LAUNCH,
|
||||
ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING)) {
|
||||
|
||||
localMonitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.PerformingBuild")); //$NON-NLS-1$
|
||||
localMonitor.subTask(LaunchMessages.AbstractCLaunchDelegate_PerformingBuild);
|
||||
if (buildForLaunch(configuration, mode, localMonitor.newChild(7))) {
|
||||
localMonitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.PerformingIncrementalBuild")); //$NON-NLS-1$
|
||||
localMonitor.subTask(LaunchMessages.AbstractCLaunchDelegate_PerformingIncrementalBuild);
|
||||
ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, localMonitor.newChild(3));
|
||||
}
|
||||
}
|
||||
|
@ -527,33 +528,31 @@ public abstract class AbstractCLaunchDelegate2 extends LaunchConfigurationDelega
|
|||
// future additions to the platform's logic.
|
||||
|
||||
return continueLaunch;
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
workspaceBuildBeforeLaunch = false; // reset for future run
|
||||
if (monitor != null) {
|
||||
monitor.done();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
|
||||
String name = CDebugUtils.getProjectName(config);
|
||||
if (name == null && requireCProject) {
|
||||
abort(LaunchMessages.getString("AbstractCLaunchDelegate.C_Project_not_specified"), null, //$NON-NLS-1$
|
||||
abort(LaunchMessages.AbstractCLaunchDelegate_C_Project_not_specified, null,
|
||||
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
|
||||
}
|
||||
ICProject cproject = CDebugUtils.getCProject(config);
|
||||
if (cproject == null && requireCProject) {
|
||||
IProject proj = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
|
||||
if (!proj.exists()) {
|
||||
abort(
|
||||
LaunchMessages.getFormattedString("AbstractCLaunchDelegate.Project_NAME_does_not_exist", name), null, //$NON-NLS-1$
|
||||
abort(NLS.bind(LaunchMessages.AbstractCLaunchDelegate_Project_NAME_does_not_exist, name), null,
|
||||
ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
||||
} else if (!proj.isOpen()) {
|
||||
abort(LaunchMessages.getFormattedString("AbstractCLaunchDelegate.Project_NAME_is_closed", name), null, //$NON-NLS-1$
|
||||
abort(NLS.bind(LaunchMessages.AbstractCLaunchDelegate_Project_NAME_is_closed, name), null,
|
||||
ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
||||
}
|
||||
abort(LaunchMessages.getString("AbstractCLaunchDelegate.Not_a_C_CPP_project"), null, //$NON-NLS-1$
|
||||
abort(LaunchMessages.AbstractCLaunchDelegate_Not_a_C_CPP_project, null,
|
||||
ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
|
||||
}
|
||||
return cproject;
|
||||
|
|
|
@ -159,7 +159,7 @@ public class LaunchUtils {
|
|||
* @param projectDesc The description for the project in which to search for the configuration.
|
||||
* @param programPath The path to the program to search the build configurations for
|
||||
* @return The build configuration that builds programName; or null if none or more than one were found.
|
||||
* @since 6.2
|
||||
* @since 7.0
|
||||
*/
|
||||
public static ICConfigurationDescription getBuildConfigByProgramPath(IProject project, String programPath) {
|
||||
if (project == null || programPath == null)
|
||||
|
|
|
@ -46,7 +46,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
if (monitor == null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
monitor.beginTask(LaunchMessages.getString("CoreFileLaunchDelegate.Launching_postmortem_debugger"), 10); //$NON-NLS-1$
|
||||
monitor.beginTask(LaunchMessages.CoreFileLaunchDelegate_Launching_postmortem_debugger, 10);
|
||||
// check for cancellation
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
|
@ -65,12 +65,12 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
if (path == null) {
|
||||
IPath corefile = promptForCoreFilePath((IProject)cproject.getResource(), debugConfig);
|
||||
if (corefile == null) {
|
||||
cancel(LaunchMessages.getString("CoreFileLaunchDelegate.No_Corefile_selected"), //$NON-NLS-1$
|
||||
cancel(LaunchMessages.CoreFileLaunchDelegate_No_Corefile_selected,
|
||||
ICDTLaunchConfigurationConstants.ERR_NO_COREFILE);
|
||||
}
|
||||
File file = new File(corefile.toString());
|
||||
if (!file.exists() || !file.canRead()) {
|
||||
cancel(LaunchMessages.getString("CoreFileLaunchDelegate.Corefile_not_readable"), //$NON-NLS-1$
|
||||
cancel(LaunchMessages.CoreFileLaunchDelegate_Corefile_not_readable,
|
||||
ICDTLaunchConfigurationConstants.ERR_NO_COREFILE);
|
||||
}
|
||||
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
|
||||
|
@ -81,7 +81,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
} else {
|
||||
File file = new File(path);
|
||||
if (!file.exists() || !file.canRead()) {
|
||||
abort(LaunchMessages.getString("CoreFileLaunchDelegate.Corefile_not_readable"), null, //$NON-NLS-1$
|
||||
abort(LaunchMessages.CoreFileLaunchDelegate_Corefile_not_readable, null,
|
||||
ICDTLaunchConfigurationConstants.ERR_NO_COREFILE);
|
||||
}
|
||||
dsession = debugConfig.createDebugger().createDebuggerSession(launch, exeFile, new SubProgressMonitor(monitor, 8));
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
|
|||
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
||||
import org.eclipse.debug.core.ILaunchManager;
|
||||
import org.eclipse.debug.core.IStatusHandler;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
public class LocalAttachLaunchDelegate extends AbstractCLaunchDelegate {
|
||||
|
||||
|
@ -55,7 +56,7 @@ public class LocalAttachLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
|
||||
monitor.beginTask(LaunchMessages.getString("LocalAttachLaunchDelegate.Attaching_to_Local_C_Application"), 10); //$NON-NLS-1$
|
||||
monitor.beginTask(LaunchMessages.LocalAttachLaunchDelegate_Attaching_to_Local_C_Application, 10);
|
||||
// check for cancellation
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
|
@ -70,9 +71,10 @@ public class LocalAttachLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
exePath = wsProgramPath.getLocation();
|
||||
}
|
||||
if (!exePath.toFile().exists()) {
|
||||
abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_does_not_exist"), //$NON-NLS-1$
|
||||
new FileNotFoundException(LaunchMessages.getFormattedString(
|
||||
"AbstractCLaunchDelegate.PROGRAM_PATH_not_found", exePath.toOSString())), //$NON-NLS-1$
|
||||
abort(LaunchMessages.AbstractCLaunchDelegate_Program_file_does_not_exist,
|
||||
new FileNotFoundException(
|
||||
NLS.bind(LaunchMessages.AbstractCLaunchDelegate_PROGRAM_PATH_not_found,
|
||||
exePath.toOSString())),
|
||||
ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_EXIST);
|
||||
}
|
||||
exeFile = verifyBinary(cproject, exePath);
|
||||
|
@ -89,7 +91,7 @@ public class LocalAttachLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
if (config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, -1) == -1) {
|
||||
int pid = promptForProcessID(config);
|
||||
if (pid == -1) {
|
||||
cancel(LaunchMessages.getString("LocalAttachLaunchDelegate.No_Process_ID_selected"), //$NON-NLS-1$
|
||||
cancel(LaunchMessages.LocalAttachLaunchDelegate_No_Process_ID_selected,
|
||||
ICDTLaunchConfigurationConstants.ERR_NO_PROCESSID);
|
||||
}
|
||||
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
|
||||
|
|
|
@ -62,181 +62,173 @@ public class LocalCDILaunchDelegate extends AbstractCLaunchDelegate {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.launch.AbstractCLaunchDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
public void launch( ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor ) throws CoreException {
|
||||
if ( monitor == null ) {
|
||||
public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||
if (monitor == null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
if ( mode.equals( ILaunchManager.RUN_MODE ) ) {
|
||||
runLocalApplication( config, launch, monitor );
|
||||
if (mode.equals(ILaunchManager.RUN_MODE)) {
|
||||
runLocalApplication(config, launch, monitor);
|
||||
}
|
||||
if ( mode.equals( ILaunchManager.DEBUG_MODE ) ) {
|
||||
launchDebugger( config, launch, monitor );
|
||||
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
|
||||
launchDebugger(config, launch, monitor);
|
||||
}
|
||||
}
|
||||
|
||||
private void runLocalApplication( ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor ) throws CoreException {
|
||||
monitor.beginTask( LaunchMessages.getString( "LocalCDILaunchDelegate.0" ), 10 ); //$NON-NLS-1$
|
||||
if ( monitor.isCanceled() ) {
|
||||
private void runLocalApplication(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||
monitor.beginTask(LaunchMessages.LocalCDILaunchDelegate_0, 10);
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
monitor.worked( 1 );
|
||||
monitor.worked(1);
|
||||
try {
|
||||
IPath exePath = CDebugUtils.verifyProgramPath( config );
|
||||
File wd = getWorkingDirectory( config );
|
||||
if ( wd == null ) {
|
||||
wd = new File( System.getProperty( "user.home", "." ) ); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
IPath exePath = CDebugUtils.verifyProgramPath(config);
|
||||
File wd = getWorkingDirectory(config);
|
||||
if (wd == null) {
|
||||
wd = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
String arguments[] = getProgramArgumentsArray( config );
|
||||
ArrayList command = new ArrayList( 1 + arguments.length );
|
||||
command.add( exePath.toOSString() );
|
||||
command.addAll( Arrays.asList( arguments ) );
|
||||
String[] commandArray = (String[])command.toArray( new String[command.size()] );
|
||||
boolean usePty = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT );
|
||||
monitor.worked( 2 );
|
||||
Process process = exec( commandArray, getEnvironment( config ), wd, usePty );
|
||||
monitor.worked( 6 );
|
||||
DebugPlugin.newProcess( launch, process, renderProcessLabel( commandArray[0] ) );
|
||||
}
|
||||
finally {
|
||||
String arguments[] = getProgramArgumentsArray(config);
|
||||
ArrayList command = new ArrayList(1 + arguments.length);
|
||||
command.add(exePath.toOSString());
|
||||
command.addAll(Arrays.asList(arguments));
|
||||
String[] commandArray = (String[])command.toArray(new String[command.size()]);
|
||||
boolean usePty = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT);
|
||||
monitor.worked(2);
|
||||
Process process = exec(commandArray, getEnvironment(config), wd, usePty);
|
||||
monitor.worked(6);
|
||||
DebugPlugin.newProcess(launch, process, renderProcessLabel(commandArray[0]));
|
||||
} finally {
|
||||
monitor.done();
|
||||
}
|
||||
}
|
||||
|
||||
private void launchDebugger( ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor ) throws CoreException {
|
||||
monitor.beginTask( LaunchMessages.getString( "LocalCDILaunchDelegate.1" ), 10 ); //$NON-NLS-1$
|
||||
if ( monitor.isCanceled() ) {
|
||||
private void launchDebugger(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||
monitor.beginTask(LaunchMessages.LocalCDILaunchDelegate_1, 10);
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
String debugMode = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN );
|
||||
if ( debugMode.equals( ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN ) ) {
|
||||
launchLocalDebugSession( config, launch, monitor );
|
||||
String debugMode = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
|
||||
if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) {
|
||||
launchLocalDebugSession(config, launch, monitor);
|
||||
}
|
||||
if ( debugMode.equals( ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH ) ) {
|
||||
launchAttachDebugSession( config, launch, monitor );
|
||||
if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH)) {
|
||||
launchAttachDebugSession(config, launch, monitor);
|
||||
}
|
||||
if ( debugMode.equals( ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE ) ) {
|
||||
launchCoreDebugSession( config, launch, monitor );
|
||||
if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE)) {
|
||||
launchCoreDebugSession(config, launch, monitor);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
monitor.done();
|
||||
}
|
||||
}
|
||||
|
||||
private void launchLocalDebugSession( ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor ) throws CoreException {
|
||||
if ( monitor.isCanceled() ) {
|
||||
private void launchLocalDebugSession(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
monitor.subTask( LaunchMessages.getString( "LocalCDILaunchDelegate.2" ) ); //$NON-NLS-1$
|
||||
monitor.subTask(LaunchMessages.LocalCDILaunchDelegate_2);
|
||||
ICDISession dsession = null;
|
||||
try {
|
||||
IPath exePath = CDebugUtils.verifyProgramPath( config );
|
||||
ICProject project = CDebugUtils.verifyCProject( config );
|
||||
IPath exePath = CDebugUtils.verifyProgramPath(config);
|
||||
ICProject project = CDebugUtils.verifyCProject(config);
|
||||
IBinaryObject exeFile = null;
|
||||
if ( exePath != null ) {
|
||||
exeFile = verifyBinary( project, exePath );
|
||||
if (exePath != null) {
|
||||
exeFile = verifyBinary(project, exePath);
|
||||
}
|
||||
|
||||
ICDebugConfiguration debugConfig = getDebugConfig( config );
|
||||
ICDebugConfiguration debugConfig = getDebugConfig(config);
|
||||
|
||||
setDefaultSourceLocator( launch, config );
|
||||
setDefaultSourceLocator(launch, config);
|
||||
|
||||
|
||||
dsession = createCDISession( config, launch, debugConfig, monitor );
|
||||
monitor.worked( 6 );
|
||||
dsession = createCDISession(config, launch, debugConfig, monitor);
|
||||
monitor.worked(6);
|
||||
|
||||
setRuntimeOptions( config, dsession );
|
||||
monitor.worked( 1 );
|
||||
setRuntimeOptions(config, dsession);
|
||||
monitor.worked(1);
|
||||
|
||||
boolean stopInMain = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false );
|
||||
boolean stopInMain = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
|
||||
String stopSymbol = null;
|
||||
if ( stopInMain )
|
||||
stopSymbol = launch.getLaunchConfiguration().getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT );
|
||||
if (stopInMain)
|
||||
stopSymbol = launch.getLaunchConfiguration().getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
|
||||
ICDITarget[] targets = dsession.getTargets();
|
||||
for( int i = 0; i < targets.length; i++ ) {
|
||||
for(int i = 0; i < targets.length; i++) {
|
||||
Process process = targets[i].getProcess();
|
||||
IProcess iprocess = null;
|
||||
if ( process != null ) {
|
||||
iprocess = DebugPlugin.newProcess( launch, process, renderProcessLabel( exePath.toOSString() ), getDefaultProcessMap() );
|
||||
if (process != null) {
|
||||
iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(exePath.toOSString()), getDefaultProcessMap());
|
||||
}
|
||||
CDIDebugModel.newDebugTarget( launch, project.getProject(), targets[i], renderTargetLabel( debugConfig ), iprocess, exeFile, true, false, stopSymbol, true );
|
||||
CDIDebugModel.newDebugTarget(launch, project.getProject(), targets[i], renderTargetLabel(debugConfig), iprocess, exeFile, true, false, stopSymbol, true);
|
||||
}
|
||||
}
|
||||
catch( CoreException e ) {
|
||||
} catch(CoreException e) {
|
||||
try {
|
||||
if ( dsession != null )
|
||||
if (dsession != null)
|
||||
dsession.terminate();
|
||||
}
|
||||
catch( CDIException e1 ) {
|
||||
} catch(CDIException e1) {
|
||||
// ignore
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
monitor.done();
|
||||
}
|
||||
}
|
||||
|
||||
private void launchAttachDebugSession( ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor ) throws CoreException {
|
||||
if ( monitor.isCanceled() ) {
|
||||
private void launchAttachDebugSession(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
monitor.subTask( LaunchMessages.getString( "LocalCDILaunchDelegate.3" ) ); //$NON-NLS-1$
|
||||
monitor.subTask(LaunchMessages.LocalCDILaunchDelegate_3);
|
||||
ILaunchConfigurationWorkingCopy wc = null;
|
||||
int pid = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, -1 );
|
||||
if ( pid == -1 ) {
|
||||
pid = promptForProcessID( config );
|
||||
if ( pid == -1 ) {
|
||||
cancel( LaunchMessages.getString( "LocalCDILaunchDelegate.4" ), ICDTLaunchConfigurationConstants.ERR_NO_PROCESSID ); //$NON-NLS-1$
|
||||
int pid = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, -1);
|
||||
if (pid == -1) {
|
||||
pid = promptForProcessID(config);
|
||||
if (pid == -1) {
|
||||
cancel(LaunchMessages.LocalCDILaunchDelegate_4, ICDTLaunchConfigurationConstants.ERR_NO_PROCESSID);
|
||||
}
|
||||
wc = config.getWorkingCopy();
|
||||
wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, pid );
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, pid);
|
||||
try {
|
||||
wc.doSave().launch( ILaunchManager.DEBUG_MODE, new SubProgressMonitor( monitor, 9 ) );
|
||||
wc.doSave().launch(ILaunchManager.DEBUG_MODE, new SubProgressMonitor(monitor, 9));
|
||||
} finally {
|
||||
// We need to reset the process id because the working copy will be saved
|
||||
// when the target is terminated
|
||||
wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, (String)null );
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, (String)null);
|
||||
wc.doSave();
|
||||
}
|
||||
cancel( "", -1 ); //$NON-NLS-1$
|
||||
cancel("", -1); //$NON-NLS-1$
|
||||
}
|
||||
IPath exePath = CDebugUtils.verifyProgramPath( config );
|
||||
IPath exePath = CDebugUtils.verifyProgramPath(config);
|
||||
if (exePath == null) {
|
||||
exePath= getProgramPathForPid(pid);
|
||||
}
|
||||
ICProject project = CDebugUtils.verifyCProject( config );
|
||||
ICProject project = CDebugUtils.verifyCProject(config);
|
||||
IBinaryObject exeFile = null;
|
||||
if ( exePath != null ) {
|
||||
exeFile = verifyBinary( project, exePath );
|
||||
if (exePath != null) {
|
||||
exeFile = verifyBinary(project, exePath);
|
||||
}
|
||||
|
||||
ICDebugConfiguration debugConfig = getDebugConfig( config );
|
||||
ICDebugConfiguration debugConfig = getDebugConfig(config);
|
||||
|
||||
setDefaultSourceLocator( launch, config );
|
||||
setDefaultSourceLocator(launch, config);
|
||||
|
||||
ICDISession dsession = createCDISession( config, launch,debugConfig, monitor );
|
||||
monitor.worked( 7 );
|
||||
ICDISession dsession = createCDISession(config, launch,debugConfig, monitor);
|
||||
monitor.worked(7);
|
||||
|
||||
try {
|
||||
ICDITarget[] targets = dsession.getTargets();
|
||||
for( int i = 0; i < targets.length; i++ ) {
|
||||
CDIDebugModel.newDebugTarget( launch, project.getProject(), targets[i], renderTargetLabel( debugConfig ), null, exeFile, true, true, false );
|
||||
for(int i = 0; i < targets.length; i++) {
|
||||
CDIDebugModel.newDebugTarget(launch, project.getProject(), targets[i], renderTargetLabel(debugConfig), null, exeFile, true, true, false);
|
||||
}
|
||||
}
|
||||
catch( CoreException e ) {
|
||||
} catch(CoreException e) {
|
||||
try {
|
||||
dsession.terminate();
|
||||
}
|
||||
catch( CDIException e1 ) {
|
||||
} catch(CDIException e1) {
|
||||
// ignore
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
if ( wc != null )
|
||||
wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, (String)null );
|
||||
} finally {
|
||||
if (wc != null)
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, (String)null);
|
||||
monitor.done();
|
||||
}
|
||||
}
|
||||
|
@ -264,84 +256,81 @@ public class LocalCDILaunchDelegate extends AbstractCLaunchDelegate {
|
|||
return null;
|
||||
}
|
||||
|
||||
private void launchCoreDebugSession( ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor ) throws CoreException {
|
||||
if ( monitor.isCanceled() ) {
|
||||
private void launchCoreDebugSession(ILaunchConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
monitor.beginTask( LaunchMessages.getString( "LocalCDILaunchDelegate.5" ), 10 ); //$NON-NLS-1$
|
||||
monitor.beginTask(LaunchMessages.LocalCDILaunchDelegate_5, 10);
|
||||
ICDISession dsession = null;
|
||||
ILaunchConfigurationWorkingCopy wc = null;
|
||||
ICDebugConfiguration debugConfig = getDebugConfig( config );
|
||||
String path = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, (String)null );
|
||||
if ( path == null || path.length() == 0) {
|
||||
ICProject project = CDebugUtils.verifyCProject( config );
|
||||
IPath corefile = promptForCoreFilePath( (IProject)project.getResource(), debugConfig );
|
||||
if ( corefile == null ) {
|
||||
cancel( LaunchMessages.getString( "LocalCDILaunchDelegate.6" ), ICDTLaunchConfigurationConstants.ERR_NO_COREFILE ); //$NON-NLS-1$
|
||||
ICDebugConfiguration debugConfig = getDebugConfig(config);
|
||||
String path = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, (String)null);
|
||||
if (path == null || path.length() == 0) {
|
||||
ICProject project = CDebugUtils.verifyCProject(config);
|
||||
IPath corefile = promptForCoreFilePath((IProject)project.getResource(), debugConfig);
|
||||
if (corefile == null) {
|
||||
cancel(LaunchMessages.LocalCDILaunchDelegate_6, ICDTLaunchConfigurationConstants.ERR_NO_COREFILE);
|
||||
}
|
||||
File file = new File( corefile.toString() );
|
||||
if ( !file.exists() || !file.canRead() ) {
|
||||
cancel( LaunchMessages.getString( "LocalCDILaunchDelegate.7" ), ICDTLaunchConfigurationConstants.ERR_NO_COREFILE ); //$NON-NLS-1$
|
||||
File file = new File(corefile.toString());
|
||||
if (!file.exists() || !file.canRead()) {
|
||||
cancel(LaunchMessages.LocalCDILaunchDelegate_7, ICDTLaunchConfigurationConstants.ERR_NO_COREFILE);
|
||||
}
|
||||
wc = config.getWorkingCopy();
|
||||
wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, corefile.toString() );
|
||||
wc.launch( ILaunchManager.DEBUG_MODE, new SubProgressMonitor( monitor, 9 ) );
|
||||
wc.setAttribute( ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, (String)null );
|
||||
cancel( "", -1 ); //$NON-NLS-1$
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, corefile.toString());
|
||||
wc.launch(ILaunchManager.DEBUG_MODE, new SubProgressMonitor(monitor, 9));
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, (String)null);
|
||||
cancel("", -1); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
IPath exePath = CDebugUtils.verifyProgramPath( config );
|
||||
ICProject project = CDebugUtils.verifyCProject( config );
|
||||
IPath exePath = CDebugUtils.verifyProgramPath(config);
|
||||
ICProject project = CDebugUtils.verifyCProject(config);
|
||||
IBinaryObject exeFile = null;
|
||||
if ( exePath != null ) {
|
||||
exeFile = verifyBinary( project, exePath );
|
||||
if (exePath != null) {
|
||||
exeFile = verifyBinary(project, exePath);
|
||||
}
|
||||
|
||||
setDefaultSourceLocator( launch, config );
|
||||
setDefaultSourceLocator(launch, config);
|
||||
|
||||
dsession = createCDISession( config, launch, debugConfig, monitor );
|
||||
monitor.worked( 7 );
|
||||
dsession = createCDISession(config, launch, debugConfig, monitor);
|
||||
monitor.worked(7);
|
||||
|
||||
try {
|
||||
ICDITarget[] targets = dsession.getTargets();
|
||||
for( int i = 0; i < targets.length; i++ ) {
|
||||
for(int i = 0; i < targets.length; i++) {
|
||||
Process process = targets[i].getProcess();
|
||||
IProcess iprocess = null;
|
||||
if ( process != null ) {
|
||||
iprocess = DebugPlugin.newProcess( launch, process, renderProcessLabel( exePath.toOSString() ), getDefaultProcessMap() );
|
||||
if (process != null) {
|
||||
iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(exePath.toOSString()), getDefaultProcessMap());
|
||||
}
|
||||
CDIDebugModel.newDebugTarget( launch, project.getProject(), targets[i], renderTargetLabel( debugConfig ), iprocess, exeFile, true, false, false );
|
||||
CDIDebugModel.newDebugTarget(launch, project.getProject(), targets[i], renderTargetLabel(debugConfig), iprocess, exeFile, true, false, false);
|
||||
}
|
||||
}
|
||||
catch( CoreException e ) {
|
||||
} catch(CoreException e) {
|
||||
try {
|
||||
if ( dsession != null )
|
||||
if (dsession != null)
|
||||
dsession.terminate();
|
||||
}
|
||||
catch( CDIException e1 ) {
|
||||
} catch(CDIException e1) {
|
||||
// ignore
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
monitor.done();
|
||||
}
|
||||
}
|
||||
|
||||
private ICDISession launchOldDebugSession( ILaunchConfiguration config, ILaunch launch, ICDIDebugger debugger, IProgressMonitor monitor ) throws CoreException {
|
||||
private ICDISession launchOldDebugSession(ILaunchConfiguration config, ILaunch launch, ICDIDebugger debugger, IProgressMonitor monitor) throws CoreException {
|
||||
IBinaryObject exeFile = null;
|
||||
IPath exePath = CDebugUtils.verifyProgramPath( config );
|
||||
ICProject project = CDebugUtils.verifyCProject( config );
|
||||
if ( exePath != null ) {
|
||||
exeFile = verifyBinary( project, exePath );
|
||||
IPath exePath = CDebugUtils.verifyProgramPath(config);
|
||||
ICProject project = CDebugUtils.verifyCProject(config);
|
||||
if (exePath != null) {
|
||||
exeFile = verifyBinary(project, exePath);
|
||||
}
|
||||
return debugger.createDebuggerSession( launch, exeFile, monitor );
|
||||
return debugger.createDebuggerSession(launch, exeFile, monitor);
|
||||
}
|
||||
|
||||
private ICDISession launchDebugSession( ILaunchConfiguration config, ILaunch launch, ICDIDebugger2 debugger, IProgressMonitor monitor ) throws CoreException {
|
||||
IPath path = CDebugUtils.verifyProgramPath( config );
|
||||
private ICDISession launchDebugSession(ILaunchConfiguration config, ILaunch launch, ICDIDebugger2 debugger, IProgressMonitor monitor) throws CoreException {
|
||||
IPath path = CDebugUtils.verifyProgramPath(config);
|
||||
File exeFile = path != null ? path.toFile() : null;
|
||||
return debugger.createSession( launch, exeFile, monitor );
|
||||
return debugger.createSession(launch, exeFile, monitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -367,65 +356,65 @@ public class LocalCDILaunchDelegate extends AbstractCLaunchDelegate {
|
|||
* cancelled
|
||||
* @see Runtime
|
||||
*/
|
||||
protected Process exec( String[] cmdLine, String[] environ, File workingDirectory, boolean usePty ) throws CoreException {
|
||||
protected Process exec(String[] cmdLine, String[] environ, File workingDirectory, boolean usePty) throws CoreException {
|
||||
Process p = null;
|
||||
try {
|
||||
if ( workingDirectory == null ) {
|
||||
p = ProcessFactory.getFactory().exec( cmdLine, environ );
|
||||
if (workingDirectory == null) {
|
||||
p = ProcessFactory.getFactory().exec(cmdLine, environ);
|
||||
}
|
||||
else {
|
||||
if ( usePty && PTY.isSupported() ) {
|
||||
p = ProcessFactory.getFactory().exec( cmdLine, environ, workingDirectory, new PTY() );
|
||||
if (usePty && PTY.isSupported()) {
|
||||
p = ProcessFactory.getFactory().exec(cmdLine, environ, workingDirectory, new PTY());
|
||||
}
|
||||
else {
|
||||
p = ProcessFactory.getFactory().exec( cmdLine, environ, workingDirectory );
|
||||
p = ProcessFactory.getFactory().exec(cmdLine, environ, workingDirectory);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( IOException e ) {
|
||||
if ( p != null ) {
|
||||
catch(IOException e) {
|
||||
if (p != null) {
|
||||
p.destroy();
|
||||
}
|
||||
abort( LaunchMessages.getString( "LocalCDILaunchDelegate.8" ), e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR ); //$NON-NLS-1$
|
||||
abort(LaunchMessages.LocalCDILaunchDelegate_8, e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
|
||||
}
|
||||
catch( NoSuchMethodError e ) {
|
||||
catch(NoSuchMethodError e) {
|
||||
// attempting launches on 1.2.* - no ability to set working
|
||||
// directory
|
||||
IStatus status = new Status( IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(), ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_NOT_SUPPORTED, LaunchMessages.getString( "LocalCDILaunchDelegate.9" ), e ); //$NON-NLS-1$
|
||||
IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler( status );
|
||||
if ( handler != null ) {
|
||||
Object result = handler.handleStatus( status, this );
|
||||
if ( result instanceof Boolean && ((Boolean)result).booleanValue() ) {
|
||||
p = exec( cmdLine, environ, null, usePty );
|
||||
IStatus status = new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(), ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_NOT_SUPPORTED, LaunchMessages.LocalCDILaunchDelegate_9, e);
|
||||
IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
|
||||
if (handler != null) {
|
||||
Object result = handler.handleStatus(status, this);
|
||||
if (result instanceof Boolean && ((Boolean)result).booleanValue()) {
|
||||
p = exec(cmdLine, environ, null, usePty);
|
||||
}
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
protected int promptForProcessID( ILaunchConfiguration config ) throws CoreException {
|
||||
IStatus fPromptStatus = new Status( IStatus.INFO, "org.eclipse.debug.ui", 200, "", null ); //$NON-NLS-1$//$NON-NLS-2$
|
||||
IStatus processPrompt = new Status( IStatus.INFO, "org.eclipse.cdt.launch", 100, "", null ); //$NON-NLS-1$//$NON-NLS-2$
|
||||
protected int promptForProcessID(ILaunchConfiguration config) throws CoreException {
|
||||
IStatus fPromptStatus = new Status(IStatus.INFO, "org.eclipse.debug.ui", 200, "", null); //$NON-NLS-1$//$NON-NLS-2$
|
||||
IStatus processPrompt = new Status(IStatus.INFO, "org.eclipse.cdt.launch", 100, "", null); //$NON-NLS-1$//$NON-NLS-2$
|
||||
// consult a status handler
|
||||
IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler( fPromptStatus );
|
||||
if ( prompter != null ) {
|
||||
Object result = prompter.handleStatus( processPrompt, config );
|
||||
if ( result instanceof Integer ) {
|
||||
return ((Integer)result).intValue();
|
||||
IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(fPromptStatus);
|
||||
if (prompter != null) {
|
||||
Object result = prompter.handleStatus(processPrompt, config);
|
||||
if (result instanceof Integer) {
|
||||
return ((Integer) result).intValue();
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected IPath promptForCoreFilePath( final IProject project, final ICDebugConfiguration debugConfig ) throws CoreException {
|
||||
IStatus fPromptStatus = new Status( IStatus.INFO, "org.eclipse.debug.ui", 200, "", null ); //$NON-NLS-1$//$NON-NLS-2$
|
||||
IStatus processPrompt = new Status( IStatus.INFO, "org.eclipse.cdt.launch", 1001, "", null ); //$NON-NLS-1$//$NON-NLS-2$
|
||||
protected IPath promptForCoreFilePath(final IProject project, final ICDebugConfiguration debugConfig) throws CoreException {
|
||||
IStatus fPromptStatus = new Status(IStatus.INFO, "org.eclipse.debug.ui", 200, "", null); //$NON-NLS-1$//$NON-NLS-2$
|
||||
IStatus processPrompt = new Status(IStatus.INFO, "org.eclipse.cdt.launch", 1001, "", null); //$NON-NLS-1$//$NON-NLS-2$
|
||||
// consult a status handler
|
||||
IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler( fPromptStatus );
|
||||
if ( prompter != null ) {
|
||||
Object result = prompter.handleStatus( processPrompt, new Object[]{ project, debugConfig } );
|
||||
if ( result instanceof IPath ) {
|
||||
return (IPath)result;
|
||||
IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(fPromptStatus);
|
||||
if (prompter != null) {
|
||||
Object result = prompter.handleStatus(processPrompt, new Object[]{ project, debugConfig });
|
||||
if (result instanceof IPath) {
|
||||
return (IPath) result;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -434,50 +423,49 @@ public class LocalCDILaunchDelegate extends AbstractCLaunchDelegate {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.launch.AbstractCLaunchDelegate#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
public boolean preLaunchCheck( ILaunchConfiguration config, String mode, IProgressMonitor monitor ) throws CoreException {
|
||||
public boolean preLaunchCheck(ILaunchConfiguration config, String mode, IProgressMonitor monitor) throws CoreException {
|
||||
// no pre launch check for core file
|
||||
if ( mode.equals( ILaunchManager.DEBUG_MODE ) ) {
|
||||
if ( ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN ) ) )
|
||||
return true;
|
||||
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
|
||||
if (ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals(config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)))
|
||||
return true;
|
||||
}
|
||||
return super.preLaunchCheck( config, mode, monitor );
|
||||
return super.preLaunchCheck(config, mode, monitor);
|
||||
}
|
||||
|
||||
private void setRuntimeOptions( ILaunchConfiguration config, ICDISession session ) throws CoreException {
|
||||
String arguments[] = getProgramArgumentsArray( config );
|
||||
private void setRuntimeOptions(ILaunchConfiguration config, ICDISession session) throws CoreException {
|
||||
String arguments[] = getProgramArgumentsArray(config);
|
||||
try {
|
||||
ICDITarget[] dtargets = session.getTargets();
|
||||
for( int i = 0; i < dtargets.length; ++i ) {
|
||||
for(int i = 0; i < dtargets.length; ++i) {
|
||||
ICDIRuntimeOptions opt = dtargets[i].getRuntimeOptions();
|
||||
opt.setArguments( arguments );
|
||||
File wd = getWorkingDirectory( config );
|
||||
if ( wd != null ) {
|
||||
opt.setWorkingDirectory( wd.getAbsolutePath() );
|
||||
opt.setArguments(arguments);
|
||||
File wd = getWorkingDirectory(config);
|
||||
if (wd != null) {
|
||||
opt.setWorkingDirectory(wd.getAbsolutePath());
|
||||
}
|
||||
opt.setEnvironment( getEnvironmentAsProperty( config ) );
|
||||
opt.setEnvironment(getEnvironmentAsProperty(config));
|
||||
}
|
||||
}
|
||||
catch( CDIException e ) {
|
||||
abort( LaunchMessages.getString( "LocalCDILaunchDelegate.10" ), e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR ); //$NON-NLS-1$
|
||||
} catch (CDIException e) {
|
||||
abort(LaunchMessages.LocalCDILaunchDelegate_10, e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
private ICDISession createCDISession( ILaunchConfiguration config, ILaunch launch, ICDebugConfiguration debugConfig, IProgressMonitor monitor ) throws CoreException {
|
||||
private ICDISession createCDISession(ILaunchConfiguration config, ILaunch launch, ICDebugConfiguration debugConfig, IProgressMonitor monitor) throws CoreException {
|
||||
ICDISession session = null;
|
||||
ICDIDebugger debugger = debugConfig.createDebugger();
|
||||
if ( debugger instanceof ICDIDebugger2 )
|
||||
session = launchDebugSession( config, launch, (ICDIDebugger2)debugger, monitor );
|
||||
if (debugger instanceof ICDIDebugger2)
|
||||
session = launchDebugSession(config, launch, (ICDIDebugger2)debugger, monitor);
|
||||
else
|
||||
// support old debugger types
|
||||
session = launchOldDebugSession( config, launch, debugger, monitor );
|
||||
session = launchOldDebugSession(config, launch, debugger, monitor);
|
||||
return session;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
|
||||
// Never build for attach. Bug 188116
|
||||
String debugMode = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN );
|
||||
if (debugMode.equals( ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH ))
|
||||
String debugMode = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
|
||||
if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH))
|
||||
return false;
|
||||
|
||||
return super.buildForLaunch(configuration, mode, monitor);
|
||||
|
|
|
@ -51,7 +51,7 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
if (monitor == null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
monitor.beginTask(LaunchMessages.getString("LocalRunLaunchDelegate.Launching_Local_C_Application"), 10); //$NON-NLS-1$
|
||||
monitor.beginTask(LaunchMessages.LocalRunLaunchDelegate_Launching_Local_C_Application, 10);
|
||||
// check for cancellation
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
|
@ -89,17 +89,16 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
opt.setEnvironment(getEnvironmentAsProperty(config));
|
||||
}
|
||||
} catch (CDIException e) {
|
||||
abort(
|
||||
LaunchMessages
|
||||
.getString("LocalRunLaunchDelegate.Failed_setting_runtime_option_though_debugger"), e, //$NON-NLS-1$
|
||||
abort(LaunchMessages.LocalRunLaunchDelegate_Failed_setting_runtime_option_though_debugger, e,
|
||||
ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
|
||||
}
|
||||
monitor.worked(1);
|
||||
boolean stopInMain = config
|
||||
.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
|
||||
boolean stopInMain = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
|
||||
String stopSymbol = null;
|
||||
if ( stopInMain )
|
||||
stopSymbol = launch.getLaunchConfiguration().getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT );
|
||||
if (stopInMain)
|
||||
stopSymbol = launch.getLaunchConfiguration().getAttribute(
|
||||
ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
|
||||
ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
|
||||
|
||||
ICDITarget[] targets = dsession.getTargets();
|
||||
for (int i = 0; i < targets.length; i++) {
|
||||
|
@ -125,11 +124,12 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
if (wd == null) {
|
||||
wd = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
ArrayList command = new ArrayList(1 + arguments.length);
|
||||
ArrayList<String> command = new ArrayList<String>(1 + arguments.length);
|
||||
command.add(exePath.toOSString());
|
||||
command.addAll(Arrays.asList(arguments));
|
||||
String[] commandArray = (String[]) command.toArray(new String[command.size()]);
|
||||
boolean usePty = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT);
|
||||
String[] commandArray = command.toArray(new String[command.size()]);
|
||||
boolean usePty = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL,
|
||||
ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT);
|
||||
monitor.worked(5);
|
||||
Process process = exec(commandArray, getEnvironment(config), wd, usePty);
|
||||
monitor.worked(3);
|
||||
|
@ -172,15 +172,15 @@ public class LocalRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
if (p != null) {
|
||||
p.destroy();
|
||||
}
|
||||
abort(LaunchMessages.getString("LocalRunLaunchDelegate.Error_starting_process"), e, //$NON-NLS-1$
|
||||
abort(LaunchMessages.LocalRunLaunchDelegate_Error_starting_process, e,
|
||||
ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
|
||||
} catch (NoSuchMethodError e) {
|
||||
//attempting launches on 1.2.* - no ability to set working
|
||||
// directory
|
||||
|
||||
IStatus status = new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(),
|
||||
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_NOT_SUPPORTED, LaunchMessages
|
||||
.getString("LocalRunLaunchDelegate.Does_not_support_working_dir"), //$NON-NLS-1$
|
||||
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_NOT_SUPPORTED,
|
||||
LaunchMessages.LocalRunLaunchDelegate_Does_not_support_working_dir,
|
||||
e);
|
||||
IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
|
|||
import org.eclipse.debug.ui.IDebugUIConstants;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.activities.WorkbenchActivityHelper;
|
||||
|
||||
|
@ -71,27 +72,27 @@ public class MultiLaunchConfigurationDelegate extends LaunchConfigurationDelegat
|
|||
public static String actionEnumToStr(EPostLaunchAction action) {
|
||||
switch (action) {
|
||||
case NONE:
|
||||
return LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.None"); //$NON-NLS-1$
|
||||
return LaunchMessages.MultiLaunchConfigurationDelegate_Action_None;
|
||||
case WAIT_FOR_TERMINATION:
|
||||
return LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.WaitUntilTerminated"); //$NON-NLS-1$
|
||||
return LaunchMessages.MultiLaunchConfigurationDelegate_Action_WaitUntilTerminated;
|
||||
case DELAY:
|
||||
return LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.Delay"); //$NON-NLS-1$
|
||||
return LaunchMessages.MultiLaunchConfigurationDelegate_Action_Delay;
|
||||
default:
|
||||
assert false : "new post launch action type is missing logic"; //$NON-NLS-1$
|
||||
return LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.None"); //$NON-NLS-1$
|
||||
return LaunchMessages.MultiLaunchConfigurationDelegate_Action_None;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Allows us decouple the enum identifier in the code from its textual representation in the GUI
|
||||
*/
|
||||
public static EPostLaunchAction strToActionEnum(String str) {
|
||||
if (str.equals(LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.None"))) { //$NON-NLS-1$
|
||||
if (str.equals(LaunchMessages.MultiLaunchConfigurationDelegate_Action_None)) {
|
||||
return EPostLaunchAction.NONE;
|
||||
}
|
||||
else if (str.equals(LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.WaitUntilTerminated"))) { //$NON-NLS-1$
|
||||
else if (str.equals(LaunchMessages.MultiLaunchConfigurationDelegate_Action_WaitUntilTerminated)) {
|
||||
return EPostLaunchAction.WAIT_FOR_TERMINATION;
|
||||
}
|
||||
else if (str.equals(LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.Delay"))) { //$NON-NLS-1$
|
||||
else if (str.equals(LaunchMessages.MultiLaunchConfigurationDelegate_Action_Delay)) {
|
||||
return EPostLaunchAction.DELAY;
|
||||
}
|
||||
else {
|
||||
|
@ -348,7 +349,7 @@ public class MultiLaunchConfigurationDelegate extends LaunchConfigurationDelegat
|
|||
boolean dstore = prefStore.getBoolean(IDebugUIConstants.PREF_AUTO_REMOVE_OLD_LAUNCHES);
|
||||
|
||||
try {
|
||||
monitor.beginTask(LaunchMessages.getString("MultiLaunchConfigurationDelegate.0") + configuration.getName(), 1000); //$NON-NLS-1$
|
||||
monitor.beginTask(LaunchMessages.MultiLaunchConfigurationDelegate_0 + configuration.getName(), 1000);
|
||||
|
||||
prefStore.setValue(IDebugUIConstants.PREF_AUTO_REMOVE_OLD_LAUNCHES, false);
|
||||
|
||||
|
@ -371,9 +372,9 @@ public class MultiLaunchConfigurationDelegate extends LaunchConfigurationDelegat
|
|||
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
|
||||
LaunchMessages.getString("LaunchUIPlugin.Error"), //$NON-NLS-1$
|
||||
LaunchMessages.getFormattedString("MultiLaunchConfigurationDelegate.Cannot", //$NON-NLS-1$
|
||||
new String[] { conf.toString(), localMode }));
|
||||
LaunchMessages.LaunchUIPlugin_Error,
|
||||
NLS.bind(LaunchMessages.MultiLaunchConfigurationDelegate_Cannot,
|
||||
conf.toString(), localMode));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -398,8 +399,8 @@ public class MultiLaunchConfigurationDelegate extends LaunchConfigurationDelegat
|
|||
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
|
||||
LaunchMessages.getString("LaunchUIPlugin.Error"), //$NON-NLS-1$
|
||||
LaunchMessages.getFormattedString("MultiLaunchConfigurationDelegate.Loop", //$NON-NLS-1$
|
||||
LaunchMessages.LaunchUIPlugin_Error,
|
||||
NLS.bind(LaunchMessages.MultiLaunchConfigurationDelegate_Loop,
|
||||
conf.toString()));
|
||||
}
|
||||
});
|
||||
|
@ -419,8 +420,7 @@ public class MultiLaunchConfigurationDelegate extends LaunchConfigurationDelegat
|
|||
case NONE:
|
||||
return;
|
||||
case WAIT_FOR_TERMINATION:
|
||||
|
||||
monitor.subTask(LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.WaitingForTermination") + " " + subLaunch.getLaunchConfiguration().getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
monitor.subTask(LaunchMessages.MultiLaunchConfigurationDelegate_Action_WaitingForTermination + " " + subLaunch.getLaunchConfiguration().getName()); //$NON-NLS-1$
|
||||
while (!subLaunch.isTerminated() && !monitor.isCanceled()) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
|
@ -433,7 +433,7 @@ public class MultiLaunchConfigurationDelegate extends LaunchConfigurationDelegat
|
|||
case DELAY:
|
||||
Integer waitSecs = (Integer)actionParam;
|
||||
if (waitSecs != null) {
|
||||
monitor.subTask(LaunchMessages.getFormattedString("MultiLaunchConfigurationDelegate.Action.Delaying", //$NON-NLS-1$
|
||||
monitor.subTask(NLS.bind(LaunchMessages.MultiLaunchConfigurationDelegate_Action_Delaying,
|
||||
waitSecs.toString()));
|
||||
try {
|
||||
Thread.sleep(waitSecs * 1000); // param is milliseconds
|
||||
|
|
|
@ -88,7 +88,7 @@ public abstract class AbstractLaunchConfigChange extends Change {
|
|||
((CompositeChange) change).add(toAppend);
|
||||
return change;
|
||||
} else {
|
||||
return new CompositeChange(LaunchMessages.getString("AbstractChange.compositeName0"), //$NON-NLS-1$
|
||||
return new CompositeChange(LaunchMessages.AbstractChange_compositeName0,
|
||||
new Change[] { change, toAppend });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ class ProjectRenameChange extends AbstractLaunchConfigChange {
|
|||
@Override
|
||||
public String getName() {
|
||||
if (changeName == null) {
|
||||
changeName = NLS.bind(LaunchMessages.getString("ProjectRenameChange.name"), //$NON-NLS-1$
|
||||
changeName = NLS.bind(LaunchMessages.ProjectRenameChange_name,
|
||||
getLaunchConfiguration().getName());
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ class ProjectRenameChange extends AbstractLaunchConfigChange {
|
|||
} catch (CoreException e) {
|
||||
LaunchUIPlugin.log(new MultiStatus(LaunchUIPlugin.PLUGIN_ID, 0,
|
||||
new IStatus[] { e.getStatus() }, NLS.bind(
|
||||
LaunchMessages.getString("ProjectRenameChange.saveFailed"), //$NON-NLS-1$
|
||||
LaunchMessages.ProjectRenameChange_saveFailed,
|
||||
launchConfig.getName()), null));
|
||||
return null; // not undoable, as we didn't effect our change
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ import org.eclipse.swt.widgets.Group;
|
|||
import org.eclipse.swt.widgets.Label;
|
||||
|
||||
public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
||||
|
||||
protected ILaunchConfiguration fLaunchConfiguration;
|
||||
protected ILaunchConfigurationWorkingCopy fWorkingCopy;
|
||||
protected ICDebugConfiguration fCurrentDebugConfig;
|
||||
|
@ -135,7 +134,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
}
|
||||
if (wc != null) {
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map)null);
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map<String, String>) null);
|
||||
}
|
||||
} else {
|
||||
if (wc == null) {
|
||||
|
@ -179,7 +178,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
try {
|
||||
tab = CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID());
|
||||
} catch (CoreException e) {
|
||||
LaunchUIPlugin.errorDialog(LaunchMessages.getString("AbstractCDebuggerTab.ErrorLoadingDebuggerPage"), e.getStatus()); //$NON-NLS-1$
|
||||
LaunchUIPlugin.errorDialog(LaunchMessages.AbstractCDebuggerTab_ErrorLoadingDebuggerPage, e.getStatus());
|
||||
}
|
||||
setDynamicTab(tab);
|
||||
}
|
||||
|
@ -226,7 +225,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebugConfig().getID());
|
||||
ICDebuggerPage dynamicTab = getDynamicTab();
|
||||
if (dynamicTab == null) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map)null);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map<String, String>) null);
|
||||
} else {
|
||||
dynamicTab.performApply(config);
|
||||
}
|
||||
|
@ -246,7 +245,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
setErrorMessage(null);
|
||||
setMessage(null);
|
||||
if (getDebugConfig() == null) {
|
||||
setErrorMessage(LaunchMessages.getString("AbstractCDebuggerTab.No_debugger_available")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.AbstractCDebuggerTab_No_debugger_available);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -270,7 +269,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
|
||||
public String getName() {
|
||||
return LaunchMessages.getString("AbstractCDebuggerTab.Debugger"); //$NON-NLS-1$
|
||||
return LaunchMessages.AbstractCDebuggerTab_Debugger;
|
||||
}
|
||||
|
||||
protected void createDebuggerCombo(Composite parent, int colspan) {
|
||||
|
@ -281,7 +280,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
gd.horizontalSpan = colspan;
|
||||
comboComp.setLayoutData(gd);
|
||||
Label dlabel = new Label(comboComp, SWT.NONE);
|
||||
dlabel.setText(LaunchMessages.getString("Launch.common.DebuggerColon")); //$NON-NLS-1$
|
||||
dlabel.setText(LaunchMessages.Launch_common_DebuggerColon);
|
||||
fDCombo = new Combo(comboComp, SWT.READ_ONLY | SWT.DROP_DOWN);
|
||||
fDCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
fDCombo.addSelectionListener(new SelectionListener() {
|
||||
|
@ -325,7 +324,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
|
||||
protected void createDebuggerGroup(Composite parent, int colspan) {
|
||||
Group debuggerGroup = new Group(parent, SWT.SHADOW_ETCHED_IN);
|
||||
debuggerGroup.setText(LaunchMessages.getString("CDebuggerTab.Debugger_Options")); //$NON-NLS-1$
|
||||
debuggerGroup.setText(LaunchMessages.CDebuggerTab_Debugger_Options);
|
||||
setDynamicTabHolder(debuggerGroup);
|
||||
GridLayout tabHolderLayout = new GridLayout();
|
||||
tabHolderLayout.marginHeight = 0;
|
||||
|
@ -360,5 +359,4 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
int selectedIndex = fDCombo.getSelectionIndex();
|
||||
return (ICDebugConfiguration)fDCombo.getData(Integer.toString(selectedIndex));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -95,22 +95,22 @@ public class BuildErrPrompter implements IStatusHandler {
|
|||
if (status.getCode() == STATUS_CODE_ERR_IN_MAIN_PROJ) {
|
||||
if (buildConfigName.length() > 0) {
|
||||
message = MessageFormat.format(
|
||||
LaunchMessages.getString("BuildErrPrompter.error_in_specific_config"), projectName, buildConfigName); //$NON-NLS-1$
|
||||
LaunchMessages.BuildErrPrompter_error_in_specific_config, projectName, buildConfigName);
|
||||
}
|
||||
else {
|
||||
message = MessageFormat.format(
|
||||
LaunchMessages.getString("BuildErrPrompter.error_in_active_config"), projectName); //$NON-NLS-1$
|
||||
LaunchMessages.BuildErrPrompter_error_in_active_config, projectName);
|
||||
}
|
||||
}
|
||||
else if (status.getCode() == STATUS_CODE_ERR_IN_REFERENCED_PROJS) {
|
||||
if (buildConfigName.length() > 0) {
|
||||
message = MessageFormat.format(
|
||||
LaunchMessages.getString("BuildErrPrompter.error_in_referenced_project_specific"), //$NON-NLS-1$
|
||||
LaunchMessages.BuildErrPrompter_error_in_referenced_project_specific,
|
||||
projectName, buildConfigName);
|
||||
}
|
||||
else {
|
||||
message = MessageFormat.format(
|
||||
LaunchMessages.getString("BuildErrPrompter.error_in_referenced_project_active"), //$NON-NLS-1$
|
||||
LaunchMessages.BuildErrPrompter_error_in_referenced_project_active,
|
||||
projectName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,11 +39,11 @@ public class CoreFilePrompter implements IStatusHandler {
|
|||
if (shell == null) {
|
||||
IStatus error = new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(),
|
||||
ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR,
|
||||
LaunchMessages.getString("CoreFileLaunchDelegate.No_Shell_available_in_Launch"), null); //$NON-NLS-1$
|
||||
LaunchMessages.CoreFileLaunchDelegate_No_Shell_available_in_Launch, null);
|
||||
throw new CoreException(error);
|
||||
}
|
||||
FileDialog dialog = new FileDialog(shell);
|
||||
dialog.setText(LaunchMessages.getString("CoreFileLaunchDelegate.Select_Corefile")); //$NON-NLS-1$
|
||||
dialog.setText(LaunchMessages.CoreFileLaunchDelegate_Select_Corefile);
|
||||
Object[] args = (Object[])source;
|
||||
IProject project = (IProject)args[0];
|
||||
ICDebugConfiguration debugConfig = (ICDebugConfiguration)args[1];
|
||||
|
@ -61,11 +61,11 @@ public class CoreFilePrompter implements IStatusHandler {
|
|||
if (res != null) {
|
||||
File file = new File(res);
|
||||
if (!file.exists() || !file.canRead()) {
|
||||
ErrorDialog.openError(shell, LaunchMessages.getString("CoreFileLaunchDelegate.postmortem_debugging_failed"), //$NON-NLS-1$
|
||||
LaunchMessages.getString("CoreFileLaunchDelegate.Corefile_not_accessible"), //$NON-NLS-1$
|
||||
ErrorDialog.openError(shell, LaunchMessages.CoreFileLaunchDelegate_postmortem_debugging_failed,
|
||||
LaunchMessages.CoreFileLaunchDelegate_Corefile_not_accessible,
|
||||
new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(),
|
||||
ICDTLaunchConfigurationConstants.ERR_NO_COREFILE,
|
||||
LaunchMessages.getString("CoreFileLaunchDelegate.Corefile_not_readable"), null)); //$NON-NLS-1$
|
||||
LaunchMessages.CoreFileLaunchDelegate_Corefile_not_readable, null));
|
||||
}
|
||||
return new Path(res);
|
||||
}
|
||||
|
|
|
@ -7,35 +7,198 @@
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.launch.internal.ui;
|
||||
|
||||
import com.ibm.icu.text.MessageFormat;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
public class LaunchMessages {
|
||||
|
||||
private static final String BUNDLE_NAME = "org.eclipse.cdt.launch.internal.ui.LaunchMessages";//$NON-NLS-1$
|
||||
|
||||
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
|
||||
public class LaunchMessages extends NLS {
|
||||
public static String AbstractCLaunchDelegate_Debugger_not_installed;
|
||||
public static String AbstractCLaunchDelegate_C_Project_not_specified;
|
||||
public static String AbstractCLaunchDelegate_Not_a_C_CPP_project;
|
||||
public static String AbstractCLaunchDelegate_Program_file_not_specified;
|
||||
public static String AbstractCLaunchDelegate_Program_file_does_not_exist;
|
||||
public static String AbstractCLaunchDelegate_PROGRAM_PATH_not_found;
|
||||
public static String AbstractCLaunchDelegate_Working_directory_does_not_exist;
|
||||
public static String AbstractCLaunchDelegate_WORKINGDIRECTORY_PATH_not_found;
|
||||
public static String AbstractCLaunchDelegate_Project_NAME_does_not_exist;
|
||||
public static String AbstractCLaunchDelegate_Project_NAME_is_closed;
|
||||
public static String AbstractCLaunchDelegate_Debugger_Process;
|
||||
public static String AbstractCLaunchDelegate_building_projects;
|
||||
public static String AbstractCLaunchDelegate_building;
|
||||
public static String AbstractCLaunchDelegate_searching_for_errors;
|
||||
public static String AbstractCLaunchDelegate_searching_for_errors_in;
|
||||
public static String AbstractCLaunchDelegate_20;
|
||||
public static String AbstractCLaunchDelegate_Program_is_not_a_recongnized_executable;
|
||||
public static String AbstractCLaunchDelegate_BuildBeforeLaunch;
|
||||
public static String AbstractCLaunchDelegate_PerformingBuild;
|
||||
public static String AbstractCLaunchDelegate_PerformingIncrementalBuild;
|
||||
public static String AbstractCLaunchDelegate_Refresh;
|
||||
public static String LocalRunLaunchDelegate_Launching_Local_C_Application;
|
||||
public static String LocalRunLaunchDelegate_Failed_setting_runtime_option_though_debugger;
|
||||
public static String LocalRunLaunchDelegate_Error_starting_process;
|
||||
public static String LocalRunLaunchDelegate_Does_not_support_working_dir;
|
||||
public static String LocalAttachLaunchDelegate_Attaching_to_Local_C_Application;
|
||||
public static String LocalAttachLaunchDelegate_No_Process_ID_selected;
|
||||
public static String LocalAttachLaunchDelegate_Select_Process;
|
||||
public static String LocalAttachLaunchDelegate_Platform_cannot_list_processes;
|
||||
public static String LocalAttachLaunchDelegate_Select_Process_to_attach_debugger_to;
|
||||
public static String LocalAttachLaunchDelegate_CDT_Launch_Error;
|
||||
public static String CoreFileLaunchDelegate_Launching_postmortem_debugger;
|
||||
public static String CoreFileLaunchDelegate_No_Corefile_selected;
|
||||
public static String CoreFileLaunchDelegate_No_Shell_available_in_Launch;
|
||||
public static String CoreFileLaunchDelegate_Select_Corefile;
|
||||
public static String CoreFileLaunchDelegate_Corefile_not_accessible;
|
||||
public static String CoreFileLaunchDelegate_Corefile_not_readable;
|
||||
public static String CoreFileLaunchDelegate_postmortem_debugging_failed;
|
||||
public static String AbstractCDebuggerTab_No_debugger_available;
|
||||
public static String AbstractCDebuggerTab_Debugger;
|
||||
public static String AbstractCDebuggerTab_ErrorLoadingDebuggerPage;
|
||||
public static String AbstractChange_compositeName0;
|
||||
public static String LaunchUIPlugin_Error;
|
||||
public static String CMainTab_Project_required;
|
||||
public static String CMainTab_Enter_project_before_searching_for_program;
|
||||
public static String CMainTab_Program_Selection;
|
||||
public static String CMainTab_Enter_project_before_browsing_for_program;
|
||||
public static String CMainTab_Program_selection;
|
||||
public static String CMainTab_Selection_must_be_file;
|
||||
public static String CMainTab_Selection_must_be_binary_file;
|
||||
public static String CMainTab_Project_Selection;
|
||||
public static String CMainTab_Choose_project_to_constrain_search_for_program;
|
||||
public static String CMainTab_Project_not_specified;
|
||||
public static String CMainTab_Program_not_specified;
|
||||
public static String CMainTab_Project_must_be_opened;
|
||||
public static String CMainTab_Program_does_not_exist;
|
||||
public static String CMainTab_Core_does_not_exist;
|
||||
public static String CMainTab_Main;
|
||||
public static String CMainTab_ProjectColon;
|
||||
public static String CMainTab_C_Application;
|
||||
public static String CMainTab_CoreFile_path;
|
||||
public static String CMainTab_Search;
|
||||
public static String CMainTab_Choose_program_to_run;
|
||||
public static String CMainTab_Choose_program_to_run_from_NAME;
|
||||
public static String CMainTab_UseTerminal;
|
||||
public static String CMainTab_Program_is_not_a_recongnized_executable;
|
||||
public static String CMainTab_Program_invalid_proj_path;
|
||||
public static String CMainTab_Build_Config;
|
||||
public static String CMainTab_Use_Active;
|
||||
public static String CMainTab_Build_Config_Auto;
|
||||
public static String CMainTab_Configuration_name;
|
||||
public static String CMainTab_Build_options;
|
||||
public static String CMainTab_Disable_build_button_label;
|
||||
public static String CMainTab_Disable_build_button_tooltip;
|
||||
public static String CMainTab_Enable_build_button_label;
|
||||
public static String CMainTab_Enable_build_button_tooltip;
|
||||
public static String CMainTab_Workspace_settings_button_label;
|
||||
public static String CMainTab_Workspace_settings_button_tooltip;
|
||||
public static String CMainTab_Workspace_settings_link_label;
|
||||
public static String CMainTab_Workspace_settings_page_id;
|
||||
public static String CDebuggerTab_Advanced_Options_Dialog_Title;
|
||||
public static String CDebuggerTab_Stop_at_main_on_startup;
|
||||
public static String CDebuggerTab_Automatically_track_values_of;
|
||||
public static String CDebuggerTab_Stop_on_startup_at_can_not_be_empty;
|
||||
public static String CDebuggerTab_Debugger_Options;
|
||||
public static String CDebuggerTab_Mode_not_supported;
|
||||
public static String CDebuggerTab_Advanced;
|
||||
public static String CDebuggerTab_Variables;
|
||||
public static String CDebuggerTab_Registers;
|
||||
public static String CDebuggerTab_No_debugger_available;
|
||||
public static String CDebuggerTab_CPU_is_not_supported;
|
||||
public static String CDebuggerTab_Platform_is_not_supported;
|
||||
public static String CoreFileDebuggerTab_No_debugger_available;
|
||||
public static String CoreFileDebuggerTab_platform_is_not_supported;
|
||||
public static String CEnvironmentTab_Edit_Variable;
|
||||
public static String CEnvironmentTab_New_Variable;
|
||||
public static String CEnvironmentTab_NameColon;
|
||||
public static String CEnvironmentTab_ValueColon;
|
||||
public static String CEnvironmentTab_Name;
|
||||
public static String CEnvironmentTab_Value;
|
||||
public static String CEnvironmentTab_New;
|
||||
public static String CEnvironmentTab_Import;
|
||||
public static String CEnvironmentTab_Edit;
|
||||
public static String CEnvironmentTab_Remove;
|
||||
public static String CEnvironmentTab_Environment;
|
||||
public static String CEnvironmentTab_Existing_Environment_Variable;
|
||||
public static String CEnvironmentTab_Environment_variable_NAME_exists;
|
||||
public static String CArgumentsTab_C_Program_Arguments;
|
||||
public static String CArgumentsTab_Arguments;
|
||||
public static String CArgumentsTab_Variables;
|
||||
public static String WorkingDirectoryBlock_4;
|
||||
public static String WorkingDirectoryBlock_7;
|
||||
public static String WorkingDirectoryBlock_0;
|
||||
public static String WorkingDirectoryBlock_Working_Directory_8;
|
||||
public static String WorkingDirectoryBlock_Working_directory;
|
||||
public static String WorkingDirectoryBlock_10;
|
||||
public static String WorkingDirectoryBlock_Use_default;
|
||||
public static String WorkingDirectoryBlock_17;
|
||||
public static String WorkingDirectoryBlock_1;
|
||||
public static String WorkingDirectoryBlock_Exception_occurred_reading_configuration_15;
|
||||
public static String Launch_common_Exception_occurred_reading_configuration_EXCEPTION;
|
||||
public static String Launch_common_DebuggerColon;
|
||||
public static String Launch_common_BinariesColon;
|
||||
public static String Launch_common_QualifierColon;
|
||||
public static String Launch_common_Browse_1;
|
||||
public static String Launch_common_Browse_2;
|
||||
public static String Launch_common_Browse_3;
|
||||
public static String Launch_common_Project_does_not_exist;
|
||||
public static String LocalCDILaunchDelegate_0;
|
||||
public static String LocalCDILaunchDelegate_1;
|
||||
public static String LocalCDILaunchDelegate_2;
|
||||
public static String LocalCDILaunchDelegate_3;
|
||||
public static String LocalCDILaunchDelegate_4;
|
||||
public static String LocalCDILaunchDelegate_5;
|
||||
public static String LocalCDILaunchDelegate_6;
|
||||
public static String LocalCDILaunchDelegate_7;
|
||||
public static String LocalCDILaunchDelegate_8;
|
||||
public static String LocalCDILaunchDelegate_9;
|
||||
public static String LocalCDILaunchDelegate_10;
|
||||
public static String MultiLaunchConfigurationDelegate_0;
|
||||
public static String MultiLaunchConfigurationDelegate_Cannot;
|
||||
public static String MultiLaunchConfigurationDelegate_Loop;
|
||||
public static String MultiLaunchConfigurationDelegate_Action_None;
|
||||
public static String MultiLaunchConfigurationDelegate_Action_WaitUntilTerminated;
|
||||
public static String MultiLaunchConfigurationDelegate_Action_Delay;
|
||||
public static String MultiLaunchConfigurationDelegate_Action_WaitingForTermination;
|
||||
public static String MultiLaunchConfigurationDelegate_Action_Delaying;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_0;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_4;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_5;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_7;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_8;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_9;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_10;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_11;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_12;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_13;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_14;
|
||||
public static String MultiLaunchConfigurationSelectionDialog_15;
|
||||
public static String MultiLaunchConfigurationTabGroup_1;
|
||||
public static String MultiLaunchConfigurationTabGroup_2;
|
||||
public static String MultiLaunchConfigurationTabGroup_3;
|
||||
public static String MultiLaunchConfigurationTabGroup_4;
|
||||
public static String MultiLaunchConfigurationTabGroup_5;
|
||||
public static String MultiLaunchConfigurationTabGroup_6;
|
||||
public static String MultiLaunchConfigurationTabGroup_7;
|
||||
public static String MultiLaunchConfigurationTabGroup_10;
|
||||
public static String MultiLaunchConfigurationTabGroup_11;
|
||||
public static String MultiLaunchConfigurationTabGroup_12;
|
||||
public static String MultiLaunchConfigurationTabGroup_13;
|
||||
public static String MultiLaunchConfigurationTabGroup_14;
|
||||
public static String MultiLaunchConfigurationTabGroup_15;
|
||||
public static String MultiLaunchConfigurationTabGroup_16;
|
||||
public static String ProjectRenameChange_name;
|
||||
public static String ProjectRenameChange_saveFailed;
|
||||
public static String BuildErrPrompter_error_in_specific_config;
|
||||
public static String BuildErrPrompter_error_in_active_config;
|
||||
public static String BuildErrPrompter_error_in_referenced_project_specific;
|
||||
public static String BuildErrPrompter_error_in_referenced_project_active;
|
||||
|
||||
private LaunchMessages() {
|
||||
}
|
||||
|
||||
public static String getFormattedString(String key, String arg) {
|
||||
return MessageFormat.format(getString(key), new String[]{arg});
|
||||
}
|
||||
|
||||
public static String getFormattedString(String key, String[] args) {
|
||||
return MessageFormat.format(getString(key), args);
|
||||
}
|
||||
|
||||
public static String getString(String key) {
|
||||
try {
|
||||
return RESOURCE_BUNDLE.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return '!' + key + '!';
|
||||
}
|
||||
}
|
||||
static {
|
||||
// Load message values from bundle file
|
||||
NLS.initializeMessages(LaunchMessages.class.getCanonicalName(), LaunchMessages.class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,197 +11,199 @@
|
|||
# Nokia - Ken Ryall - Bug 118894
|
||||
# Carlos O'Donnel (CodeSourcery) - Bug 218366
|
||||
# IBM Corporation
|
||||
# Sergey Prigogin (Google)
|
||||
###############################################################################
|
||||
|
||||
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.PROGRAM_PATH_not_found={0} not found
|
||||
AbstractCLaunchDelegate.Working_directory_does_not_exist=Working directory does not exist
|
||||
AbstractCLaunchDelegate.WORKINGDIRECTORY_PATH_not_found=The working directory {0} does not exist.
|
||||
AbstractCLaunchDelegate.Project_NAME_does_not_exist=Project {0} does not exist. Please check that your launch configuration specifies a valid project in your workspace.
|
||||
AbstractCLaunchDelegate.Project_NAME_is_closed=Project {0} is closed
|
||||
AbstractCLaunchDelegate.Debugger_Process=Debugger Process
|
||||
AbstractCLaunchDelegate.building_projects=Building prerequisite project list
|
||||
AbstractCLaunchDelegate.building=Building
|
||||
AbstractCLaunchDelegate.searching_for_errors=Searching for compile errors
|
||||
AbstractCLaunchDelegate.searching_for_errors_in=Searching for compile errors in
|
||||
AbstractCLaunchDelegate.20=Building prerequisite project list
|
||||
AbstractCLaunchDelegate.Program_is_not_a_recongnized_executable=Program is not a recognized executable.
|
||||
AbstractCLaunchDelegate.BuildBeforeLaunch=Build before launch -
|
||||
AbstractCLaunchDelegate.PerformingBuild=Performing required build...
|
||||
AbstractCLaunchDelegate.PerformingIncrementalBuild=Performing incremental workspace build...
|
||||
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_PROGRAM_PATH_not_found={0} not found
|
||||
AbstractCLaunchDelegate_Working_directory_does_not_exist=Working directory does not exist
|
||||
AbstractCLaunchDelegate_WORKINGDIRECTORY_PATH_not_found=The working directory {0} does not exist.
|
||||
AbstractCLaunchDelegate_Project_NAME_does_not_exist=Project {0} does not exist. Please check that your launch configuration specifies a valid project in your workspace.
|
||||
AbstractCLaunchDelegate_Project_NAME_is_closed=Project {0} is closed
|
||||
AbstractCLaunchDelegate_Debugger_Process=Debugger Process
|
||||
AbstractCLaunchDelegate_building_projects=Building prerequisite project list
|
||||
AbstractCLaunchDelegate_building=Building
|
||||
AbstractCLaunchDelegate_searching_for_errors=Searching for compile errors
|
||||
AbstractCLaunchDelegate_searching_for_errors_in=Searching for compile errors in
|
||||
AbstractCLaunchDelegate_20=Building prerequisite project list
|
||||
AbstractCLaunchDelegate_Program_is_not_a_recongnized_executable=Program is not a recognized executable.
|
||||
AbstractCLaunchDelegate_BuildBeforeLaunch=Build before launch -
|
||||
AbstractCLaunchDelegate_PerformingBuild=Performing required build...
|
||||
AbstractCLaunchDelegate_PerformingIncrementalBuild=Performing incremental workspace build...
|
||||
AbstractCLaunchDelegate_Refresh=Refresh
|
||||
|
||||
LocalRunLaunchDelegate.Launching_Local_C_Application=Launching Local C/C++ Application
|
||||
LocalRunLaunchDelegate.Failed_setting_runtime_option_though_debugger=Failed to set program arguments, environment or working directory.
|
||||
LocalRunLaunchDelegate.Error_starting_process=Error starting process
|
||||
LocalRunLaunchDelegate.Does_not_support_working_dir=Eclipse runtime does not support working directory
|
||||
LocalRunLaunchDelegate_Launching_Local_C_Application=Launching Local C/C++ Application
|
||||
LocalRunLaunchDelegate_Failed_setting_runtime_option_though_debugger=Failed to set program arguments, environment or working directory.
|
||||
LocalRunLaunchDelegate_Error_starting_process=Error starting process
|
||||
LocalRunLaunchDelegate_Does_not_support_working_dir=Eclipse runtime does not support working directory
|
||||
|
||||
LocalAttachLaunchDelegate.Attaching_to_Local_C_Application=Attaching to Local C/C++ Application
|
||||
LocalAttachLaunchDelegate.No_Process_ID_selected=No Process ID selected
|
||||
LocalAttachLaunchDelegate.Select_Process=Select Process
|
||||
LocalAttachLaunchDelegate.Platform_cannot_list_processes=Current platform does not support listing processes
|
||||
LocalAttachLaunchDelegate.Select_Process_to_attach_debugger_to=Select a Process to attach debugger to:
|
||||
LocalAttachLaunchDelegate.CDT_Launch_Error=CDT Launch Error
|
||||
LocalAttachLaunchDelegate_Attaching_to_Local_C_Application=Attaching to Local C/C++ Application
|
||||
LocalAttachLaunchDelegate_No_Process_ID_selected=No Process ID selected
|
||||
LocalAttachLaunchDelegate_Select_Process=Select Process
|
||||
LocalAttachLaunchDelegate_Platform_cannot_list_processes=Current platform does not support listing processes
|
||||
LocalAttachLaunchDelegate_Select_Process_to_attach_debugger_to=Select a Process to attach debugger to:
|
||||
LocalAttachLaunchDelegate_CDT_Launch_Error=CDT Launch Error
|
||||
|
||||
CoreFileLaunchDelegate.Launching_postmortem_debugger=Launching postmortem debugger
|
||||
CoreFileLaunchDelegate.No_Corefile_selected=No Corefile selected
|
||||
CoreFileLaunchDelegate.No_Shell_available_in_Launch=No Shell available in Launch
|
||||
CoreFileLaunchDelegate.Select_Corefile=Select Corefile
|
||||
CoreFileLaunchDelegate.Corefile_not_accessible=Core file is not accessible.
|
||||
CoreFileLaunchDelegate.Corefile_not_readable=Core file does not exist or is not readable.
|
||||
CoreFileLaunchDelegate.postmortem_debugging_failed=Post-mortem debugging failed
|
||||
CoreFileLaunchDelegate_Launching_postmortem_debugger=Launching postmortem debugger
|
||||
CoreFileLaunchDelegate_No_Corefile_selected=No Corefile selected
|
||||
CoreFileLaunchDelegate_No_Shell_available_in_Launch=No Shell available in Launch
|
||||
CoreFileLaunchDelegate_Select_Corefile=Select Corefile
|
||||
CoreFileLaunchDelegate_Corefile_not_accessible=Core file is not accessible.
|
||||
CoreFileLaunchDelegate_Corefile_not_readable=Core file does not exist or is not readable.
|
||||
CoreFileLaunchDelegate_postmortem_debugging_failed=Post-mortem debugging failed
|
||||
|
||||
AbstractCDebuggerTab.No_debugger_available=No debugger available
|
||||
AbstractCDebuggerTab.Debugger=Debugger
|
||||
AbstractCDebuggerTab.ErrorLoadingDebuggerPage=Error Loading Debugger UI Component.
|
||||
AbstractChange.compositeName0=Update C/C++ launch configurations
|
||||
AbstractCDebuggerTab_No_debugger_available=No debugger available
|
||||
AbstractCDebuggerTab_Debugger=Debugger
|
||||
AbstractCDebuggerTab_ErrorLoadingDebuggerPage=Error Loading Debugger UI Component.
|
||||
AbstractChange_compositeName0=Update C/C++ launch configurations
|
||||
|
||||
LaunchUIPlugin.Error=Error
|
||||
LaunchUIPlugin_Error=Error
|
||||
|
||||
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.Core_does_not_exist=Core file does not exist
|
||||
CMainTab.Main=Main
|
||||
CMainTab.&ProjectColon=&Project:
|
||||
CMainTab.C/C++_Application=C/C++ Application:
|
||||
CMainTab.CoreFile_path=Core file (leave blank to trigger prompt):
|
||||
CMainTab.Search...=Searc&h Project...
|
||||
CMainTab.Choose_program_to_run=Choose a &program to run:
|
||||
CMainTab.Choose_program_to_run_from_NAME=Choose a program to run from {0}:
|
||||
CMainTab.UseTerminal=Connect process input && output to a terminal.
|
||||
CMainTab.Program_is_not_a_recongnized_executable=Program is not a recognized executable.
|
||||
CMainTab.Program_invalid_proj_path=Program specification is not a valid project-relative path.
|
||||
CMainTab.Build_Config=Build configuration:
|
||||
CMainTab.Use_Active=Use Active
|
||||
CMainTab.Build_Config_Auto=Select configuration using 'C/C++ Application'
|
||||
#For CMainTab.Configuration_name: {0} - project name; {1} - configuration name
|
||||
CMainTab.Configuration_name={0} {1}
|
||||
CMainTab.Build_options=Build (if required) before launching
|
||||
CMainTab.Disable_build_button_label=Disable auto build
|
||||
CMainTab.Disable_build_button_tooltip=Requires manually building project before launching (this may improve launch performance)
|
||||
CMainTab.Enable_build_button_label=Enable auto build
|
||||
CMainTab.Enable_build_button_tooltip=Always build project before launching (this may impact launch performance)
|
||||
CMainTab.Workspace_settings_button_label=Use workspace settings
|
||||
CMainTab.Workspace_settings_button_tooltip=Use workspace settings
|
||||
CMainTab.Workspace_settings_link_label=<a>Configure Workspace Settings...</a>
|
||||
CMainTab.Workspace_settings_page_id=org.eclipse.debug.ui.LaunchingPreferencePage
|
||||
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_Core_does_not_exist=Core file does not exist
|
||||
CMainTab_Main=Main
|
||||
CMainTab_ProjectColon=&Project:
|
||||
CMainTab_C_Application=C/C++ Application:
|
||||
CMainTab_CoreFile_path=Core file (leave blank to trigger prompt):
|
||||
CMainTab_Search=Searc&h Project...
|
||||
CMainTab_Choose_program_to_run=Choose a &program to run:
|
||||
CMainTab_Choose_program_to_run_from_NAME=Choose a program to run from {0}:
|
||||
CMainTab_UseTerminal=Connect process input && output to a terminal.
|
||||
CMainTab_Program_is_not_a_recongnized_executable=Program is not a recognized executable.
|
||||
CMainTab_Program_invalid_proj_path=Program specification is not a valid project-relative path.
|
||||
CMainTab_Build_Config=Build configuration:
|
||||
CMainTab_Use_Active=Use Active
|
||||
CMainTab_Build_Config_Auto=Select configuration using 'C/C++ Application'
|
||||
#For CMainTab_Configuration_name: {0} - project name; {1} - configuration name
|
||||
CMainTab_Configuration_name={0} {1}
|
||||
CMainTab_Build_options=Build (if required) before launching
|
||||
CMainTab_Disable_build_button_label=Disable auto build
|
||||
CMainTab_Disable_build_button_tooltip=Requires manually building project before launching (this may improve launch performance)
|
||||
CMainTab_Enable_build_button_label=Enable auto build
|
||||
CMainTab_Enable_build_button_tooltip=Always build project before launching (this may impact launch performance)
|
||||
CMainTab_Workspace_settings_button_label=Use workspace settings
|
||||
CMainTab_Workspace_settings_button_tooltip=Use workspace settings
|
||||
CMainTab_Workspace_settings_link_label=<a>Configure Workspace Settings...</a>
|
||||
CMainTab_Workspace_settings_page_id=org.eclipse.debug.ui.LaunchingPreferencePage
|
||||
|
||||
CDebuggerTab.Advanced_Options_Dialog_Title=Advanced Options
|
||||
CDebuggerTab.Stop_at_main_on_startup=Stop on startup at:
|
||||
CDebuggerTab.Automatically_track_values_of=Automatically track the values of
|
||||
CDebuggerTab.Stop_on_startup_at_can_not_be_empty=The "Stop on startup at" field can not be empty.
|
||||
CDebuggerTab.Debugger_Options=Debugger Options
|
||||
CDebuggerTab.Mode_not_supported=Mode ''{0}'' is not supported by the selected debugger
|
||||
CDebuggerTab.Advanced=Advanced...
|
||||
CDebuggerTab.Variables=Variables
|
||||
CDebuggerTab.Registers=Registers
|
||||
CDebuggerTab.No_debugger_available=No debugger available
|
||||
CDebuggerTab.CPU_is_not_supported=The CPU is not supported by the selected debugger.
|
||||
CDebuggerTab.Platform_is_not_supported=The project platform is not supported by the selected debugger.
|
||||
CDebuggerTab_Advanced_Options_Dialog_Title=Advanced Options
|
||||
CDebuggerTab_Stop_at_main_on_startup=Stop on startup at:
|
||||
CDebuggerTab_Automatically_track_values_of=Automatically track the values of
|
||||
CDebuggerTab_Stop_on_startup_at_can_not_be_empty=The "Stop on startup at" field can not be empty.
|
||||
CDebuggerTab_Debugger_Options=Debugger Options
|
||||
CDebuggerTab_Mode_not_supported=Mode ''{0}'' is not supported by the selected debugger
|
||||
CDebuggerTab_Advanced=Advanced...
|
||||
CDebuggerTab_Variables=Variables
|
||||
CDebuggerTab_Registers=Registers
|
||||
CDebuggerTab_No_debugger_available=No debugger available
|
||||
CDebuggerTab_CPU_is_not_supported=The CPU is not supported by the selected debugger.
|
||||
CDebuggerTab_Platform_is_not_supported=The project platform is not supported by the selected debugger.
|
||||
|
||||
CoreFileDebuggerTab.No_debugger_available=No debugger available
|
||||
CoreFileDebuggerTab.platform_is_not_supported=The project platform is not supported by the selected debugger.
|
||||
CoreFileDebuggerTab_No_debugger_available=No debugger available
|
||||
CoreFileDebuggerTab_platform_is_not_supported=The project platform is not supported by the selected debugger.
|
||||
|
||||
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?
|
||||
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=Program arguments:
|
||||
CArgumentsTab.Arguments=Arguments
|
||||
CArgumentsTab.Variables=Variables...
|
||||
CArgumentsTab_C_Program_Arguments=Program arguments:
|
||||
CArgumentsTab_Arguments=Arguments
|
||||
CArgumentsTab_Variables=Variables...
|
||||
|
||||
WorkingDirectoryBlock.4=Select a &workspace relative working directory:
|
||||
WorkingDirectoryBlock.7=Select a working directory for the launch configuration:
|
||||
WorkingDirectoryBlock.0=W&orkspace...
|
||||
WorkingDirectoryBlock.Working_Directory_8=Working Directory
|
||||
WorkingDirectoryBlock.Working_directory=Working directory:
|
||||
WorkingDirectoryBlock.10=Working directory does not exist
|
||||
WorkingDirectoryBlock.Use_default=Use de&fault
|
||||
WorkingDirectoryBlock.17=Variabl&es...
|
||||
WorkingDirectoryBlock.1=File S&ystem...
|
||||
WorkingDirectoryBlock.Exception_occurred_reading_configuration___15=Exception occurred reading configuration:
|
||||
WorkingDirectoryBlock_4=Select a &workspace relative working directory:
|
||||
WorkingDirectoryBlock_7=Select a working directory for the launch configuration:
|
||||
WorkingDirectoryBlock_0=W&orkspace...
|
||||
WorkingDirectoryBlock_Working_Directory_8=Working Directory
|
||||
WorkingDirectoryBlock_Working_directory=Working directory:
|
||||
WorkingDirectoryBlock_10=Working directory does not exist
|
||||
WorkingDirectoryBlock_Use_default=Use de&fault
|
||||
WorkingDirectoryBlock_17=Variabl&es...
|
||||
WorkingDirectoryBlock_1=File S&ystem...
|
||||
WorkingDirectoryBlock_Exception_occurred_reading_configuration_15=Exception occurred reading configuration:
|
||||
|
||||
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.Browse_1=&Browse...
|
||||
Launch.common.Browse_2=B&rowse...
|
||||
Launch.common.Browse_3=Bro&wse...
|
||||
Launch.common.Project_does_not_exist=Project does not exist
|
||||
LocalCDILaunchDelegate.0=Launching Local C/C++ Application
|
||||
LocalCDILaunchDelegate.1=Launching debugger session
|
||||
LocalCDILaunchDelegate.2=Debugging local C/C++ application
|
||||
LocalCDILaunchDelegate.3=Attaching to Local C/C++ Application
|
||||
LocalCDILaunchDelegate.4=No Process ID selected.
|
||||
LocalCDILaunchDelegate.5=Launching postmortem debugger session
|
||||
LocalCDILaunchDelegate.6=No core file selected
|
||||
LocalCDILaunchDelegate.7=Core file does not exist or is not readable.
|
||||
LocalCDILaunchDelegate.8=Error starting process.
|
||||
LocalCDILaunchDelegate.9=Eclipse runtime does not support working directory.
|
||||
LocalCDILaunchDelegate.10=Failed to set program arguments, environment or working directory.
|
||||
MultiLaunchConfigurationDelegate.0=Launching
|
||||
MultiLaunchConfigurationDelegate.Cannot=Cannot launch ''{0}'' in the ''{1}'' mode
|
||||
MultiLaunchConfigurationDelegate.Loop=Infinite loop detected for ''{0}'' configuration
|
||||
MultiLaunchConfigurationDelegate.Action.None=None
|
||||
MultiLaunchConfigurationDelegate.Action.WaitUntilTerminated=Wait until terminated
|
||||
MultiLaunchConfigurationDelegate.Action.Delay=Delay
|
||||
MultiLaunchConfigurationDelegate.Action.WaitingForTermination=Waiting for termination of
|
||||
MultiLaunchConfigurationDelegate.Action.Delaying=Delaying next launch by {0} seconds
|
||||
MultiLaunchConfigurationSelectionDialog.0=Launch Configuration Selector
|
||||
MultiLaunchConfigurationSelectionDialog.4=Launch Mode:
|
||||
MultiLaunchConfigurationSelectionDialog.5=Use default mode when launching
|
||||
MultiLaunchConfigurationSelectionDialog.7=Select a launch configuration
|
||||
MultiLaunchConfigurationSelectionDialog.8=Post launch action:
|
||||
MultiLaunchConfigurationSelectionDialog.9=Seconds:
|
||||
MultiLaunchConfigurationSelectionDialog.10=Enter valid number of seconds
|
||||
MultiLaunchConfigurationSelectionDialog.11=Select only one launch configuration
|
||||
MultiLaunchConfigurationSelectionDialog.12=Add Launch Configuration
|
||||
MultiLaunchConfigurationSelectionDialog.13=Edit Launch Configuration
|
||||
MultiLaunchConfigurationSelectionDialog.14=Add one or more launch configurations to the launch group
|
||||
MultiLaunchConfigurationSelectionDialog.15=Edit an existing entry in the launch group
|
||||
MultiLaunchConfigurationTabGroup.1=Up
|
||||
MultiLaunchConfigurationTabGroup.2=Down
|
||||
MultiLaunchConfigurationTabGroup.3=Edit...
|
||||
MultiLaunchConfigurationTabGroup.4=Add...
|
||||
MultiLaunchConfigurationTabGroup.5=Remove
|
||||
MultiLaunchConfigurationTabGroup.6=Name
|
||||
MultiLaunchConfigurationTabGroup.7=Mode
|
||||
MultiLaunchConfigurationTabGroup.10=Launches
|
||||
MultiLaunchConfigurationTabGroup.11=seconds
|
||||
MultiLaunchConfigurationTabGroup.12=Action
|
||||
MultiLaunchConfigurationTabGroup.13=Delay {0} seconds
|
||||
MultiLaunchConfigurationTabGroup.14=Launch {0} does not exist.
|
||||
MultiLaunchConfigurationTabGroup.15=Launch {0} is filtered.
|
||||
MultiLaunchConfigurationTabGroup.16=Must have at least one valid enabled launch.
|
||||
ProjectRenameChange.name=Update launch configuration "{0}"
|
||||
ProjectRenameChange.saveFailed=Failed to save updated launch configuration "{0}"
|
||||
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_Browse_1=&Browse...
|
||||
Launch_common_Browse_2=B&rowse...
|
||||
Launch_common_Browse_3=Bro&wse...
|
||||
Launch_common_Project_does_not_exist=Project does not exist
|
||||
LocalCDILaunchDelegate_0=Launching Local C/C++ Application
|
||||
LocalCDILaunchDelegate_1=Launching debugger session
|
||||
LocalCDILaunchDelegate_2=Debugging local C/C++ application
|
||||
LocalCDILaunchDelegate_3=Attaching to Local C/C++ Application
|
||||
LocalCDILaunchDelegate_4=No Process ID selected.
|
||||
LocalCDILaunchDelegate_5=Launching postmortem debugger session
|
||||
LocalCDILaunchDelegate_6=No core file selected
|
||||
LocalCDILaunchDelegate_7=Core file does not exist or is not readable.
|
||||
LocalCDILaunchDelegate_8=Error starting process.
|
||||
LocalCDILaunchDelegate_9=Eclipse runtime does not support working directory.
|
||||
LocalCDILaunchDelegate_10=Failed to set program arguments, environment or working directory.
|
||||
MultiLaunchConfigurationDelegate_0=Launching
|
||||
MultiLaunchConfigurationDelegate_Cannot=Cannot launch ''{0}'' in the ''{1}'' mode
|
||||
MultiLaunchConfigurationDelegate_Loop=Infinite loop detected for ''{0}'' configuration
|
||||
MultiLaunchConfigurationDelegate_Action_None=None
|
||||
MultiLaunchConfigurationDelegate_Action_WaitUntilTerminated=Wait until terminated
|
||||
MultiLaunchConfigurationDelegate_Action_Delay=Delay
|
||||
MultiLaunchConfigurationDelegate_Action_WaitingForTermination=Waiting for termination of
|
||||
MultiLaunchConfigurationDelegate_Action_Delaying=Delaying next launch by {0} seconds
|
||||
MultiLaunchConfigurationSelectionDialog_0=Launch Configuration Selector
|
||||
MultiLaunchConfigurationSelectionDialog_4=Launch Mode:
|
||||
MultiLaunchConfigurationSelectionDialog_5=Use default mode when launching
|
||||
MultiLaunchConfigurationSelectionDialog_7=Select a launch configuration
|
||||
MultiLaunchConfigurationSelectionDialog_8=Post launch action:
|
||||
MultiLaunchConfigurationSelectionDialog_9=Seconds:
|
||||
MultiLaunchConfigurationSelectionDialog_10=Enter valid number of seconds
|
||||
MultiLaunchConfigurationSelectionDialog_11=Select only one launch configuration
|
||||
MultiLaunchConfigurationSelectionDialog_12=Add Launch Configuration
|
||||
MultiLaunchConfigurationSelectionDialog_13=Edit Launch Configuration
|
||||
MultiLaunchConfigurationSelectionDialog_14=Add one or more launch configurations to the launch group
|
||||
MultiLaunchConfigurationSelectionDialog_15=Edit an existing entry in the launch group
|
||||
MultiLaunchConfigurationTabGroup_1=Up
|
||||
MultiLaunchConfigurationTabGroup_2=Down
|
||||
MultiLaunchConfigurationTabGroup_3=Edit...
|
||||
MultiLaunchConfigurationTabGroup_4=Add...
|
||||
MultiLaunchConfigurationTabGroup_5=Remove
|
||||
MultiLaunchConfigurationTabGroup_6=Name
|
||||
MultiLaunchConfigurationTabGroup_7=Mode
|
||||
MultiLaunchConfigurationTabGroup_10=Launches
|
||||
MultiLaunchConfigurationTabGroup_11=seconds
|
||||
MultiLaunchConfigurationTabGroup_12=Action
|
||||
MultiLaunchConfigurationTabGroup_13=Delay {0} seconds
|
||||
MultiLaunchConfigurationTabGroup_14=Launch {0} does not exist.
|
||||
MultiLaunchConfigurationTabGroup_15=Launch {0} is filtered.
|
||||
MultiLaunchConfigurationTabGroup_16=Must have at least one valid enabled launch.
|
||||
ProjectRenameChange_name=Update launch configuration "{0}"
|
||||
ProjectRenameChange_saveFailed=Failed to save updated launch configuration "{0}"
|
||||
|
||||
BuildErrPrompter.error_in_specific_config=Errors exist in project \"{0}\" having built not-active build configuration \"{1}\". Proceed with launch?
|
||||
BuildErrPrompter.error_in_active_config=Errors exist in the active configuration of project \"{0}\". Proceed with launch?
|
||||
BuildErrPrompter.error_in_referenced_project_specific=One or more projects referenced by project \"{0}\", build configuration \"{1}\" has build errors. See Problems view for details. Keep in mind that the errors may be in build configurations that are not the active ones. Continue anyway?
|
||||
BuildErrPrompter.error_in_referenced_project_active=One or more projects referenced by the active configuration of project \"{0}\" has build errors. See Problems view for details. Keep in mind that the errors may be in build configurations that are not the active ones. Continue anyway?
|
||||
BuildErrPrompter_error_in_specific_config=Errors exist in project \"{0}\" having built not-active build configuration \"{1}\". Proceed with launch?
|
||||
BuildErrPrompter_error_in_active_config=Errors exist in the active configuration of project \"{0}\". Proceed with launch?
|
||||
BuildErrPrompter_error_in_referenced_project_specific=One or more projects referenced by project \"{0}\", build configuration \"{1}\" has build errors. See Problems view for details. Keep in mind that the errors may be in build configurations that are not the active ones. Continue anyway?
|
||||
BuildErrPrompter_error_in_referenced_project_active=One or more projects referenced by the active configuration of project \"{0}\" has build errors. See Problems view for details. Keep in mind that the errors may be in build configurations that are not the active ones. Continue anyway?
|
|
@ -158,7 +158,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements ILaunchesListene
|
|||
log(status);
|
||||
Shell shell = getActiveWorkbenchShell();
|
||||
if (shell != null) {
|
||||
ErrorDialog.openError(shell, LaunchMessages.getString("LaunchUIPlugin.Error"), message, status); //$NON-NLS-1$
|
||||
ErrorDialog.openError(shell, LaunchMessages.LaunchUIPlugin_Error, message, status);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements ILaunchesListene
|
|||
Shell shell = getActiveWorkbenchShell();
|
||||
if (shell != null) {
|
||||
IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), 1, t.getMessage(), null);
|
||||
ErrorDialog.openError(shell, LaunchMessages.getString("LaunchUIPlugin.Error"), message, status); //$NON-NLS-1$
|
||||
ErrorDialog.openError(shell, LaunchMessages.LaunchUIPlugin_Error, message, status);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,8 +179,8 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements ILaunchesListene
|
|||
@Override
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
LaunchUIPlugin.getDefault().getPluginPreferences().getString( ICDebugConstants.PREF_FILTERED_DEBUGGERS );
|
||||
DebugPlugin.getDefault().getLaunchManager().addLaunchListener( this );
|
||||
LaunchUIPlugin.getDefault().getPluginPreferences().getString(ICDebugConstants.PREF_FILTERED_DEBUGGERS);
|
||||
DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -190,34 +190,34 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements ILaunchesListene
|
|||
*/
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
DebugPlugin.getDefault().getLaunchManager().removeLaunchListener( this );
|
||||
DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch[])
|
||||
*/
|
||||
public void launchesAdded( ILaunch[] launches ) {
|
||||
public void launchesAdded(ILaunch[] launches) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch[])
|
||||
*/
|
||||
public void launchesChanged( ILaunch[] launches ) {
|
||||
public void launchesChanged(ILaunch[] launches) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch[])
|
||||
*/
|
||||
public void launchesRemoved( ILaunch[] launches ) {
|
||||
public void launchesRemoved(ILaunch[] launches) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.core.ILaunchesListener2#launchesTerminated(org.eclipse.debug.core.ILaunch[])
|
||||
*/
|
||||
public void launchesTerminated( ILaunch[] launches ) {
|
||||
for ( ILaunch l : launches ) {
|
||||
if ( l instanceof CLaunch ) {
|
||||
public void launchesTerminated(ILaunch[] launches) {
|
||||
for (ILaunch l : launches) {
|
||||
if (l instanceof CLaunch) {
|
||||
((CLaunch)l).refresh();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,10 +120,14 @@ public class MultiLaunchConfigurationSelectionDialog extends TitleAreaDialog imp
|
|||
Composite comp = (Composite) super.createDialogArea(parent2);
|
||||
|
||||
// title bar
|
||||
getShell().setText(fForEditing ? LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.13") : LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.12")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
getShell().setText(fForEditing ?
|
||||
LaunchMessages.MultiLaunchConfigurationSelectionDialog_13 :
|
||||
LaunchMessages.MultiLaunchConfigurationSelectionDialog_12);
|
||||
|
||||
// dialog message area (not title bar)
|
||||
setTitle(fForEditing ? LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.15") : LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.14")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
setTitle(fForEditing ?
|
||||
LaunchMessages.MultiLaunchConfigurationSelectionDialog_15 :
|
||||
LaunchMessages.MultiLaunchConfigurationSelectionDialog_14);
|
||||
|
||||
fStackComposite = new ComboControlledStackComposite(comp, SWT.NONE);
|
||||
HashMap<String, ILaunchGroup> modes = new HashMap<String, ILaunchGroup>();
|
||||
|
@ -173,7 +177,7 @@ public class MultiLaunchConfigurationSelectionDialog extends TitleAreaDialog imp
|
|||
fTree.getViewer().setSelection(fInitialSelection, true);
|
||||
}
|
||||
}
|
||||
fStackComposite.setLabelText(LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.4")); //$NON-NLS-1$
|
||||
fStackComposite.setLabelText(LaunchMessages.MultiLaunchConfigurationSelectionDialog_4);
|
||||
fStackComposite.pack();
|
||||
Rectangle bounds = fStackComposite.getBounds();
|
||||
// adjust size
|
||||
|
@ -194,7 +198,7 @@ public class MultiLaunchConfigurationSelectionDialog extends TitleAreaDialog imp
|
|||
checkboxComp.setLayout(new GridLayout(1, false));
|
||||
checkboxComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
Button checkBox = new Button(checkboxComp, SWT.CHECK);
|
||||
checkBox.setText(LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.5")); //$NON-NLS-1$
|
||||
checkBox.setText(LaunchMessages.MultiLaunchConfigurationSelectionDialog_5);
|
||||
checkBox.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
isDefaultMode = ((Button) e.widget).getSelection();
|
||||
|
@ -211,7 +215,7 @@ public class MultiLaunchConfigurationSelectionDialog extends TitleAreaDialog imp
|
|||
comp.setLayout(new GridLayout(4, false));
|
||||
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
Label label = new Label(comp, SWT.NONE);
|
||||
label.setText(LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.8")); //$NON-NLS-1$
|
||||
label.setText(LaunchMessages.MultiLaunchConfigurationSelectionDialog_8);
|
||||
Combo combo = new Combo(comp, SWT.READ_ONLY);
|
||||
combo.add(LaunchElement.actionEnumToStr(EPostLaunchAction.NONE));
|
||||
combo.add(LaunchElement.actionEnumToStr(EPostLaunchAction.WAIT_FOR_TERMINATION));
|
||||
|
@ -227,7 +231,7 @@ public class MultiLaunchConfigurationSelectionDialog extends TitleAreaDialog imp
|
|||
combo.setText(MultiLaunchConfigurationDelegate.LaunchElement.actionEnumToStr(action));
|
||||
|
||||
fDelayAmountLabel = new Label(comp, SWT.NONE);
|
||||
fDelayAmountLabel.setText(LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.9")); //$NON-NLS-1$
|
||||
fDelayAmountLabel.setText(LaunchMessages.MultiLaunchConfigurationSelectionDialog_9);
|
||||
|
||||
fDelayAmountWidget = new Text(comp, SWT.SINGLE | SWT.BORDER);
|
||||
GridData gridData = new GridData();
|
||||
|
@ -333,7 +337,7 @@ public class MultiLaunchConfigurationSelectionDialog extends TitleAreaDialog imp
|
|||
Button ok_button = getButton(IDialogConstants.OK_ID);
|
||||
boolean isValid = true;
|
||||
if (getSelectedLaunchConfigurations().length < 1) {
|
||||
setErrorMessage(LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.7")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.MultiLaunchConfigurationSelectionDialog_7);
|
||||
isValid = false;
|
||||
} else {
|
||||
setErrorMessage(null);
|
||||
|
@ -343,7 +347,7 @@ public class MultiLaunchConfigurationSelectionDialog extends TitleAreaDialog imp
|
|||
if (fForEditing) {
|
||||
// must have only one selection
|
||||
if (getSelectedLaunchConfigurations().length > 1) {
|
||||
setErrorMessage(LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.11")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.MultiLaunchConfigurationSelectionDialog_11);
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
|
@ -352,7 +356,7 @@ public class MultiLaunchConfigurationSelectionDialog extends TitleAreaDialog imp
|
|||
if (isValid) {
|
||||
if (action == EPostLaunchAction.DELAY) {
|
||||
isValid = (actionParam instanceof Integer) && ((Integer)actionParam > 0);
|
||||
setErrorMessage(isValid ? null : LaunchMessages.getString("MultiLaunchConfigurationSelectionDialog.10")); //$NON-NLS-1$
|
||||
setErrorMessage(isValid ? null : LaunchMessages.MultiLaunchConfigurationSelectionDialog_10);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
|
|||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||
import org.eclipse.jface.viewers.StructuredSelection;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
|
@ -136,11 +137,11 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
|
|||
case NONE:
|
||||
return ""; //$NON-NLS-1$
|
||||
case WAIT_FOR_TERMINATION:
|
||||
return LaunchMessages.getString("MultiLaunchConfigurationDelegate.Action.WaitUntilTerminated"); //$NON-NLS-1$
|
||||
return LaunchMessages.MultiLaunchConfigurationDelegate_Action_WaitUntilTerminated;
|
||||
case DELAY:
|
||||
final Object actionParam = el.actionParam;
|
||||
return LaunchMessages.getFormattedString("MultiLaunchConfigurationTabGroup.13", //$NON-NLS-1$
|
||||
actionParam instanceof Integer ? Integer.toString((Integer)actionParam) : "?"); //$NON-NLS-1$
|
||||
return NLS.bind(LaunchMessages.MultiLaunchConfigurationTabGroup_13,
|
||||
actionParam instanceof Integer ? Integer.toString((Integer) actionParam) : "?"); //$NON-NLS-1$
|
||||
default:
|
||||
assert false : "new post launch action missing logic here"; //$NON-NLS-1$
|
||||
return ""; //$NON-NLS-1$
|
||||
|
@ -179,11 +180,11 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
|
|||
public ButtonComposite(Composite parent, int style) {
|
||||
super(parent, style);
|
||||
setLayout(new GridLayout());
|
||||
upButton = createPushButton(this, LaunchMessages.getString("MultiLaunchConfigurationTabGroup.1")); //$NON-NLS-1$
|
||||
downButton = createPushButton(this, LaunchMessages.getString("MultiLaunchConfigurationTabGroup.2")); //$NON-NLS-1$
|
||||
editButton = createPushButton(this, LaunchMessages.getString("MultiLaunchConfigurationTabGroup.3")); //$NON-NLS-1$
|
||||
addButton = createPushButton(this, LaunchMessages.getString("MultiLaunchConfigurationTabGroup.4")); //$NON-NLS-1$
|
||||
deleteButton = createPushButton(this, LaunchMessages.getString("MultiLaunchConfigurationTabGroup.5")); //$NON-NLS-1$
|
||||
upButton = createPushButton(this, LaunchMessages.MultiLaunchConfigurationTabGroup_1);
|
||||
downButton = createPushButton(this, LaunchMessages.MultiLaunchConfigurationTabGroup_2);
|
||||
editButton = createPushButton(this, LaunchMessages.MultiLaunchConfigurationTabGroup_3);
|
||||
addButton = createPushButton(this, LaunchMessages.MultiLaunchConfigurationTabGroup_4);
|
||||
deleteButton = createPushButton(this, LaunchMessages.MultiLaunchConfigurationTabGroup_5);
|
||||
|
||||
}
|
||||
|
||||
|
@ -261,13 +262,13 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
|
|||
table.setHeaderVisible(true);
|
||||
table.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
TreeColumn col1 = new TreeColumn(table, SWT.NONE);
|
||||
col1.setText(LaunchMessages.getString("MultiLaunchConfigurationTabGroup.6")); //$NON-NLS-1$
|
||||
col1.setText(LaunchMessages.MultiLaunchConfigurationTabGroup_6);
|
||||
col1.setWidth(300);
|
||||
TreeColumn col2 = new TreeColumn(table, SWT.NONE);
|
||||
col2.setText(LaunchMessages.getString("MultiLaunchConfigurationTabGroup.7")); //$NON-NLS-1$
|
||||
col2.setText(LaunchMessages.MultiLaunchConfigurationTabGroup_7);
|
||||
col2.setWidth(100);
|
||||
TreeColumn col3 = new TreeColumn(table, SWT.NONE);
|
||||
col3.setText(LaunchMessages.getString("MultiLaunchConfigurationTabGroup.12")); //$NON-NLS-1$
|
||||
col3.setText(LaunchMessages.MultiLaunchConfigurationTabGroup_12);
|
||||
col3.setWidth(100);
|
||||
|
||||
treeViewer.setInput(input);
|
||||
|
@ -443,7 +444,7 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
|
|||
}
|
||||
|
||||
public String getName() {
|
||||
return LaunchMessages.getString("MultiLaunchConfigurationTabGroup.10"); //$NON-NLS-1$
|
||||
return LaunchMessages.MultiLaunchConfigurationTabGroup_10;
|
||||
}
|
||||
|
||||
public void initializeFrom(ILaunchConfiguration configuration) {
|
||||
|
@ -474,12 +475,12 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
|
|||
if (element.enabled) {
|
||||
if ( element.data == null) {
|
||||
// error referencing invalid launch
|
||||
setErrorMessage(MessageFormat.format(LaunchMessages.getString("MultiLaunchConfigurationTabGroup.14"), //$NON-NLS-1$
|
||||
setErrorMessage(MessageFormat.format(LaunchMessages.MultiLaunchConfigurationTabGroup_14,
|
||||
element.name));
|
||||
return false;
|
||||
} else if (!MultiLaunchConfigurationDelegate.isValidLaunchReference(element.data)) {
|
||||
// error referencing invalid launch
|
||||
setErrorMessage(MessageFormat.format(LaunchMessages.getString("MultiLaunchConfigurationTabGroup.15"), //$NON-NLS-1$
|
||||
setErrorMessage(MessageFormat.format(LaunchMessages.MultiLaunchConfigurationTabGroup_15,
|
||||
element.name));
|
||||
return false;
|
||||
}
|
||||
|
@ -488,7 +489,7 @@ public class MultiLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
|
|||
}
|
||||
if (validLaunches < 1) {
|
||||
// must have at least one valid and enabled launch
|
||||
setErrorMessage(LaunchMessages.getString("MultiLaunchConfigurationTabGroup.16")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.MultiLaunchConfigurationTabGroup_16);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ProcessPrompter implements IStatusHandler {
|
|||
if (shell == null) {
|
||||
IStatus error = new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(),
|
||||
ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR,
|
||||
LaunchMessages.getString("CoreFileLaunchDelegate.No_Shell_available_in_Launch"), null); //$NON-NLS-1$
|
||||
LaunchMessages.CoreFileLaunchDelegate_No_Shell_available_in_Launch, null);
|
||||
throw new CoreException(error);
|
||||
}
|
||||
|
||||
|
@ -82,18 +82,18 @@ public class ProcessPrompter implements IStatusHandler {
|
|||
}
|
||||
};
|
||||
TwoPaneElementSelector dialog = new TwoPaneElementSelector(shell, provider, qprovider);
|
||||
dialog.setTitle(LaunchMessages.getString("LocalAttachLaunchDelegate.Select_Process")); //$NON-NLS-1$
|
||||
dialog.setMessage(LaunchMessages.getString("LocalAttachLaunchDelegate.Select_Process_to_attach_debugger_to")); //$NON-NLS-1$
|
||||
dialog.setTitle(LaunchMessages.LocalAttachLaunchDelegate_Select_Process);
|
||||
dialog.setMessage(LaunchMessages.LocalAttachLaunchDelegate_Select_Process_to_attach_debugger_to);
|
||||
IProcessList plist = null;
|
||||
try {
|
||||
plist = CCorePlugin.getDefault().getProcessList();
|
||||
} catch (CoreException e) {
|
||||
LaunchUIPlugin.errorDialog(LaunchMessages.getString("LocalAttachLaunchDelegate.CDT_Launch_Error"), e.getStatus()); //$NON-NLS-1$
|
||||
LaunchUIPlugin.errorDialog(LaunchMessages.LocalAttachLaunchDelegate_CDT_Launch_Error, e.getStatus());
|
||||
}
|
||||
if (plist == null) {
|
||||
MessageDialog.openError(
|
||||
shell,
|
||||
LaunchMessages.getString("LocalAttachLaunchDelegate.CDT_Launch_Error"), LaunchMessages.getString("LocalAttachLaunchDelegate.Platform_cannot_list_processes")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
MessageDialog.openError(shell,
|
||||
LaunchMessages.LocalAttachLaunchDelegate_CDT_Launch_Error,
|
||||
LaunchMessages.LocalAttachLaunchDelegate_Platform_cannot_list_processes);
|
||||
return null;
|
||||
}
|
||||
dialog.setElements(plist.getProcessList());
|
||||
|
|
|
@ -108,13 +108,13 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
group.setFont(font);
|
||||
setControl(group);
|
||||
|
||||
group.setText(LaunchMessages.getString("WorkingDirectoryBlock.Working_directory")); //$NON-NLS-1$
|
||||
group.setText(LaunchMessages.WorkingDirectoryBlock_Working_directory);
|
||||
|
||||
fWorkingDirText = new Text(group, SWT.SINGLE | SWT.BORDER);
|
||||
fWorkingDirText.getAccessible().addAccessibleListener(
|
||||
new AccessibleAdapter() {
|
||||
public void getName(AccessibleEvent e) {
|
||||
e.result = LaunchMessages.getString("WorkingDirectoryBlock.Working_directory"); //$NON-NLS-1$
|
||||
e.result = LaunchMessages.WorkingDirectoryBlock_Working_directory;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -124,7 +124,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
fWorkingDirText.addModifyListener(fListener);
|
||||
|
||||
fUseDefaultWorkingDirButton = new Button(group, SWT.CHECK);
|
||||
fUseDefaultWorkingDirButton.setText(LaunchMessages.getString("WorkingDirectoryBlock.Use_default")); //$NON-NLS-1$
|
||||
fUseDefaultWorkingDirButton.setText(LaunchMessages.WorkingDirectoryBlock_Use_default);
|
||||
gd = new GridData(GridData.FILL, GridData.BEGINNING, true, false);
|
||||
fUseDefaultWorkingDirButton.setLayoutData(gd);
|
||||
fUseDefaultWorkingDirButton.setFont(font);
|
||||
|
@ -138,13 +138,13 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
|
||||
buttonComp.setLayoutData(gd);
|
||||
buttonComp.setFont(font);
|
||||
fWorkspaceButton = createPushButton(buttonComp, LaunchMessages.getString("WorkingDirectoryBlock.0"), null); //$NON-NLS-1$
|
||||
fWorkspaceButton = createPushButton(buttonComp, LaunchMessages.WorkingDirectoryBlock_0, null);
|
||||
fWorkspaceButton.addSelectionListener(fListener);
|
||||
|
||||
fFileSystemButton = createPushButton(buttonComp, LaunchMessages.getString("WorkingDirectoryBlock.1"), null); //$NON-NLS-1$
|
||||
fFileSystemButton = createPushButton(buttonComp, LaunchMessages.WorkingDirectoryBlock_1, null);
|
||||
fFileSystemButton.addSelectionListener(fListener);
|
||||
|
||||
fVariablesButton = createPushButton(buttonComp, LaunchMessages.getString("WorkingDirectoryBlock.17"), null); //$NON-NLS-1$
|
||||
fVariablesButton = createPushButton(buttonComp, LaunchMessages.WorkingDirectoryBlock_17, null);
|
||||
fVariablesButton.addSelectionListener(fListener);
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
*/
|
||||
protected void handleWorkingDirBrowseButtonSelected() {
|
||||
DirectoryDialog dialog = new DirectoryDialog(getShell());
|
||||
dialog.setMessage(LaunchMessages.getString("WorkingDirectoryBlock.7")); //$NON-NLS-1$
|
||||
dialog.setMessage(LaunchMessages.WorkingDirectoryBlock_7);
|
||||
String currentWorkingDir = fWorkingDirText.getText();
|
||||
if (!currentWorkingDir.trim().equals("")) { //$NON-NLS-1$
|
||||
File path = new File(currentWorkingDir);
|
||||
|
@ -182,7 +182,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
*/
|
||||
protected void handleWorkspaceDirBrowseButtonSelected() {
|
||||
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
|
||||
LaunchMessages.getString("WorkingDirectoryBlock.4")); //$NON-NLS-1$
|
||||
LaunchMessages.WorkingDirectoryBlock_4);
|
||||
|
||||
IContainer currentContainer = getContainer();
|
||||
if (currentContainer != null) {
|
||||
|
@ -287,7 +287,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
if (dir.isDirectory()) {
|
||||
return true;
|
||||
}
|
||||
setErrorMessage(LaunchMessages.getString("WorkingDirectoryBlock.10")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.WorkingDirectoryBlock_10);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
public void initializeFrom(ILaunchConfiguration configuration) {
|
||||
setLaunchConfiguration(configuration);
|
||||
try {
|
||||
String wd = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null); //$NON-NLS-1$
|
||||
String wd = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null);
|
||||
fWorkingDirText.setText(""); //$NON-NLS-1$
|
||||
if (wd == null) {
|
||||
fUseDefaultWorkingDirButton.setSelection(true);
|
||||
|
@ -322,7 +322,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
}
|
||||
handleUseDefaultWorkingDirButtonSelected();
|
||||
} catch (CoreException e) {
|
||||
setErrorMessage(LaunchMessages.getString("WorkingDirectoryBlock.Exception_occurred_reading_configuration___15") + e.getStatus().getMessage()); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.WorkingDirectoryBlock_Exception_occurred_reading_configuration_15 + e.getStatus().getMessage());
|
||||
LaunchUIPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
|
|||
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
|
||||
*/
|
||||
public String getName() {
|
||||
return LaunchMessages.getString("WorkingDirectoryBlock.Working_Directory_8"); //$NON-NLS-1$
|
||||
return LaunchMessages.WorkingDirectoryBlock_Working_Directory_8;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,21 +63,18 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
|
|||
* @since 6.1
|
||||
*/
|
||||
public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
||||
|
||||
|
||||
protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||
|
||||
protected String filterPlatform = EMPTY_STRING;
|
||||
|
||||
/**
|
||||
* @since 6.0
|
||||
*/
|
||||
protected Combo fBuildConfigCombo;
|
||||
/** @since 6.2 */
|
||||
/** @since 7.0*/
|
||||
protected Button fBuildConfigAuto;
|
||||
/** Indicates whether the user has clicked on the build config auto button
|
||||
* Prevents causing a delta to the underlying launch configuration if the user hasn't touched this setting.
|
||||
* @since 6.2 */
|
||||
* @since 7.0*/
|
||||
protected boolean fBuildConfigAutoChanged;
|
||||
/** @since 6.1 */
|
||||
protected Button fDisableBuildButton;
|
||||
|
@ -141,7 +138,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
projComp.setLayoutData(gd);
|
||||
|
||||
fProjLabel = new Label(projComp, SWT.NONE);
|
||||
fProjLabel.setText(LaunchMessages.getString("CMainTab.&ProjectColon")); //$NON-NLS-1$
|
||||
fProjLabel.setText(LaunchMessages.CMainTab_ProjectColon);
|
||||
gd = new GridData();
|
||||
gd.horizontalSpan = 2;
|
||||
fProjLabel.setLayoutData(gd);
|
||||
|
@ -150,7 +147,6 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
fProjText.setLayoutData(gd);
|
||||
fProjText.addModifyListener(new ModifyListener() {
|
||||
|
||||
public void modifyText(ModifyEvent evt) {
|
||||
// if project changes, invalidate program name cache
|
||||
fPreviouslyCheckedProgram = null;
|
||||
|
@ -160,9 +156,8 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
});
|
||||
|
||||
fProjButton = createPushButton(projComp, LaunchMessages.getString("Launch.common.Browse_1"), null); //$NON-NLS-1$
|
||||
fProjButton = createPushButton(projComp, LaunchMessages.Launch_common_Browse_1, null);
|
||||
fProjButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
handleProjectButtonSelected();
|
||||
|
@ -218,7 +213,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
for (int i = 0; i < cproject.length; i++) {
|
||||
ICDescriptor cdesciptor = null;
|
||||
try {
|
||||
cdesciptor = CCorePlugin.getDefault().getCProjectDescription((IProject)cproject[i].getResource(), false);
|
||||
cdesciptor = CCorePlugin.getDefault().getCProjectDescription((IProject) cproject[i].getResource(), false);
|
||||
if (cdesciptor != null) {
|
||||
String projectPlatform = cdesciptor.getPlatform();
|
||||
if (filterPlatform.equals("*") //$NON-NLS-1$
|
||||
|
@ -246,8 +241,8 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
|
||||
ILabelProvider labelProvider = new CElementLabelProvider();
|
||||
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
|
||||
dialog.setTitle(LaunchMessages.getString("CMainTab.Project_Selection")); //$NON-NLS-1$
|
||||
dialog.setMessage(LaunchMessages.getString("CMainTab.Choose_project_to_constrain_search_for_program")); //$NON-NLS-1$
|
||||
dialog.setTitle(LaunchMessages.CMainTab_Project_Selection);
|
||||
dialog.setMessage(LaunchMessages.CMainTab_Choose_project_to_constrain_search_for_program);
|
||||
dialog.setElements(projects);
|
||||
|
||||
ICProject cProject = getCProject();
|
||||
|
@ -271,15 +266,13 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
{
|
||||
fBuildConfigCombo.setEnabled(!fBuildConfigAuto.getSelection());
|
||||
fBuildConfigCombo.removeAll();
|
||||
fBuildConfigCombo.add(LaunchMessages.getString("CMainTab.Use_Active")); //$NON-NLS-1$
|
||||
fBuildConfigCombo.add(LaunchMessages.CMainTab_Use_Active);
|
||||
fBuildConfigCombo.setData("0", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
fBuildConfigCombo.select(0);
|
||||
ICProject cproject = getCProject();
|
||||
if (cproject != null){
|
||||
|
||||
if (cproject != null) {
|
||||
ICProjectDescription projDes = CDTPropertyManager.getProjectDescription(cproject.getProject());
|
||||
if (projDes != null)
|
||||
{
|
||||
if (projDes != null) {
|
||||
// Find the config that should be automatically selected
|
||||
String autoConfigId = null;
|
||||
if (fBuildConfigAuto.getSelection()) {
|
||||
|
@ -302,9 +295,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
fBuildConfigCombo.select(selIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,7 +310,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
gd.horizontalSpan = colspan;
|
||||
comboComp.setLayoutData(gd);
|
||||
Label dlabel = new Label(comboComp, SWT.NONE);
|
||||
dlabel.setText(LaunchMessages.getString("CMainTab.Build_Config")); //$NON-NLS-1$
|
||||
dlabel.setText(LaunchMessages.CMainTab_Build_Config);
|
||||
fBuildConfigCombo = new Combo(comboComp, SWT.READ_ONLY | SWT.DROP_DOWN);
|
||||
fBuildConfigCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
fBuildConfigCombo.addSelectionListener(new SelectionListener() {
|
||||
|
@ -336,7 +327,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
|
||||
fBuildConfigAuto = new Button(comboComp, SWT.CHECK);
|
||||
fBuildConfigAuto.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
fBuildConfigAuto.setText(LaunchMessages.getString("CMainTab.Build_Config_Auto")); //$NON-NLS-1$
|
||||
fBuildConfigAuto.setText(LaunchMessages.CMainTab_Build_Config_Auto);
|
||||
fBuildConfigAuto.addSelectionListener(new SelectionListener() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
fBuildConfigAutoChanged = true;
|
||||
|
@ -365,13 +356,13 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
gridLayout.makeColumnsEqualWidth= true;
|
||||
buildGroup.setLayoutData(gridData);
|
||||
buildGroup.setLayout(gridLayout);
|
||||
buildGroup.setText(LaunchMessages.getString("CMainTab.Build_options")); //$NON-NLS-1$
|
||||
buildGroup.setText(LaunchMessages.CMainTab_Build_options);
|
||||
|
||||
createBuildConfigCombo(buildGroup, 2);
|
||||
|
||||
fEnableBuildButton = new Button(buildGroup, SWT.RADIO);
|
||||
fEnableBuildButton.setText(LaunchMessages.getString("CMainTab.Enable_build_button_label")); //$NON-NLS-1$
|
||||
fEnableBuildButton.setToolTipText(LaunchMessages.getString("CMainTab.Enable_build_button_tooltip")); //$NON-NLS-1$
|
||||
fEnableBuildButton.setText(LaunchMessages.CMainTab_Enable_build_button_label);
|
||||
fEnableBuildButton.setToolTipText(LaunchMessages.CMainTab_Enable_build_button_tooltip);
|
||||
fEnableBuildButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
|
@ -380,8 +371,8 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
});
|
||||
|
||||
fDisableBuildButton = new Button(buildGroup, SWT.RADIO);
|
||||
fDisableBuildButton.setText(LaunchMessages.getString("CMainTab.Disable_build_button_label")); //$NON-NLS-1$
|
||||
fDisableBuildButton.setToolTipText(LaunchMessages.getString("CMainTab.Disable_build_button_tooltip")); //$NON-NLS-1$
|
||||
fDisableBuildButton.setText(LaunchMessages.CMainTab_Disable_build_button_label);
|
||||
fDisableBuildButton.setToolTipText(LaunchMessages.CMainTab_Disable_build_button_tooltip);
|
||||
fDisableBuildButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
|
@ -390,8 +381,8 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
});
|
||||
|
||||
fWorkspaceSettingsButton = new Button(buildGroup, SWT.RADIO);
|
||||
fWorkspaceSettingsButton.setText(LaunchMessages.getString("CMainTab.Workspace_settings_button_label")); //$NON-NLS-1$
|
||||
fWorkspaceSettingsButton.setToolTipText(LaunchMessages.getString("CMainTab.Workspace_settings_button_tooltip")); //$NON-NLS-1$
|
||||
fWorkspaceSettingsButton.setText(LaunchMessages.CMainTab_Workspace_settings_button_label);
|
||||
fWorkspaceSettingsButton.setToolTipText(LaunchMessages.CMainTab_Workspace_settings_button_tooltip);
|
||||
fWorkspaceSettingsButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
|
@ -399,18 +390,17 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
});
|
||||
|
||||
fWorkpsaceSettingsLink = new Link(buildGroup, SWT.NONE); //$NON-NLS-1$
|
||||
fWorkpsaceSettingsLink.setText(LaunchMessages.getString("CMainTab.Workspace_settings_link_label")); //$NON-NLS-1$
|
||||
fWorkpsaceSettingsLink = new Link(buildGroup, SWT.NONE);
|
||||
fWorkpsaceSettingsLink.setText(LaunchMessages.CMainTab_Workspace_settings_link_label);
|
||||
fWorkpsaceSettingsLink.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
PreferencesUtil.createPreferenceDialogOn(
|
||||
parent.getShell(),
|
||||
LaunchMessages.getString("CMainTab.Workspace_settings_page_id"), //$NON-NLS-1$
|
||||
LaunchMessages.CMainTab_Workspace_settings_page_id,
|
||||
null,
|
||||
null).open();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/** @since 6.1 */
|
||||
|
@ -460,7 +450,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
gd.horizontalSpan = colSpan;
|
||||
coreComp.setLayoutData(gd);
|
||||
fCoreLabel = new Label(coreComp, SWT.NONE);
|
||||
fCoreLabel.setText(LaunchMessages.getString("CMainTab.CoreFile_path")); //$NON-NLS-1$
|
||||
fCoreLabel.setText(LaunchMessages.CMainTab_CoreFile_path);
|
||||
gd = new GridData();
|
||||
gd.horizontalSpan = 3;
|
||||
fCoreLabel.setLayoutData(gd);
|
||||
|
@ -474,7 +464,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
});
|
||||
|
||||
Button browseForCoreButton;
|
||||
browseForCoreButton = createPushButton(coreComp, LaunchMessages.getString("Launch.common.Browse_3"), null); //$NON-NLS-1$
|
||||
browseForCoreButton = createPushButton(coreComp, LaunchMessages.Launch_common_Browse_3, null);
|
||||
browseForCoreButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
|
@ -496,8 +486,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
protected boolean isBinary(IProject project, IPath exePath) throws CoreException {
|
||||
try {
|
||||
Boolean binValue = fBinaryExeCache.get(exePath);
|
||||
if (binValue == null)
|
||||
{
|
||||
if (binValue == null) {
|
||||
IBinaryObject exe = LaunchUtils.getBinary(project, exePath);
|
||||
binValue = exe != null;
|
||||
fBinaryExeCache.put(exePath, binValue);
|
||||
|
@ -521,9 +510,8 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
} else {
|
||||
display = getShell().getDisplay();
|
||||
}
|
||||
final Object[] ret = new Object[1];
|
||||
final IBinary[][] ret = new IBinary[1][];
|
||||
BusyIndicator.showWhile(display, new Runnable() {
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
ret[0] = cproject.getBinaryContainer().getBinaries();
|
||||
|
@ -533,7 +521,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
});
|
||||
|
||||
return (IBinary[])ret[0];
|
||||
return ret[0];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -575,8 +563,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
|
||||
protected void updateProgramFromConfig(ILaunchConfiguration config) {
|
||||
if (fProgText != null)
|
||||
{
|
||||
if (fProgText != null) {
|
||||
String programName = EMPTY_STRING;
|
||||
try {
|
||||
programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EMPTY_STRING);
|
||||
|
@ -598,5 +585,4 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
updateBuildConfigCombo(""); //$NON-NLS-1$
|
||||
super.updateLaunchConfigurationDialog();
|
||||
}
|
||||
|
||||
}
|
|
@ -21,6 +21,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
|
|||
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
||||
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
|
||||
import org.eclipse.debug.ui.StringVariableSelectionDialog;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.accessibility.AccessibleAdapter;
|
||||
import org.eclipse.swt.accessibility.AccessibleEvent;
|
||||
|
@ -46,23 +47,23 @@ import org.eclipse.swt.widgets.Text;
|
|||
* <p>
|
||||
* This class may be instantiated. This class is not intended to be subclassed.
|
||||
* </p>
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
*/
|
||||
public class CArgumentsTab extends CLaunchConfigurationTab {
|
||||
/**
|
||||
* Tab identifier used for ordering of tabs added using the
|
||||
* <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
|
||||
* extension point.
|
||||
*
|
||||
* @since 6.0
|
||||
*/
|
||||
public static final String TAB_ID = "org.eclipse.cdt.cdi.launch.argumentsTab"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Tab identifier used for ordering of tabs added using the
|
||||
* <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
|
||||
* extension point.
|
||||
*
|
||||
* @since 6.0
|
||||
*/
|
||||
public static final String TAB_ID = "org.eclipse.cdt.cdi.launch.argumentsTab";
|
||||
|
||||
// Program arguments UI widgets
|
||||
// Program arguments UI widgets
|
||||
protected Label fPrgmArgumentsLabel;
|
||||
protected Text fPrgmArgumentsText;
|
||||
protected Button fArgumentVariablesButton;
|
||||
|
||||
|
||||
// Working directory
|
||||
protected WorkingDirectoryBlock fWorkingDirectoryBlock = new WorkingDirectoryBlock();
|
||||
|
||||
|
@ -70,63 +71,62 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
|
||||
*/
|
||||
public void createControl(Composite parent) {
|
||||
Font font = parent.getFont();
|
||||
Composite comp = new Composite(parent, SWT.NONE);
|
||||
GridLayout layout = new GridLayout(1, true);
|
||||
comp.setLayout(layout);
|
||||
comp.setFont(font);
|
||||
Font font = parent.getFont();
|
||||
Composite comp = new Composite(parent, SWT.NONE);
|
||||
GridLayout layout = new GridLayout(1, true);
|
||||
comp.setLayout(layout);
|
||||
comp.setFont(font);
|
||||
|
||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||
comp.setLayoutData(gd);
|
||||
setControl(comp);
|
||||
|
||||
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB);
|
||||
|
||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||
comp.setLayoutData(gd);
|
||||
setControl(comp);
|
||||
|
||||
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB);
|
||||
|
||||
createArgumentComponent(comp, 1);
|
||||
|
||||
fWorkingDirectoryBlock.createControl(comp);
|
||||
}
|
||||
|
||||
protected void createArgumentComponent(Composite comp, int horizontalSpan) {
|
||||
Font font = comp.getFont();
|
||||
Group group = new Group(comp, SWT.NONE);
|
||||
group.setFont(font);
|
||||
group.setLayout(new GridLayout());
|
||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||
gd.horizontalSpan = horizontalSpan;
|
||||
group.setLayoutData(gd);
|
||||
|
||||
group.setText(LaunchMessages.getString("CArgumentsTab.C/C++_Program_Arguments")); //$NON-NLS-1$
|
||||
Font font = comp.getFont();
|
||||
Group group = new Group(comp, SWT.NONE);
|
||||
group.setFont(font);
|
||||
group.setLayout(new GridLayout());
|
||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||
gd.horizontalSpan = horizontalSpan;
|
||||
group.setLayoutData(gd);
|
||||
|
||||
group.setText(LaunchMessages.CArgumentsTab_C_Program_Arguments);
|
||||
fPrgmArgumentsText = new Text(group, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
|
||||
fPrgmArgumentsText.getAccessible().addAccessibleListener(
|
||||
new AccessibleAdapter() {
|
||||
public void getName(AccessibleEvent e) {
|
||||
e.result = LaunchMessages.getString("CArgumentsTab.C/C++_Program_Arguments"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
new AccessibleAdapter() {
|
||||
public void getName(AccessibleEvent e) {
|
||||
e.result = LaunchMessages.CArgumentsTab_C_Program_Arguments;
|
||||
}
|
||||
}
|
||||
);
|
||||
gd = new GridData(GridData.FILL_BOTH);
|
||||
gd = new GridData(GridData.FILL_BOTH);
|
||||
gd.heightHint = 40;
|
||||
gd.widthHint = 100;
|
||||
gd.widthHint = 100;
|
||||
fPrgmArgumentsText.setLayoutData(gd);
|
||||
fPrgmArgumentsText.setFont(font);
|
||||
fPrgmArgumentsText.setFont(font);
|
||||
fPrgmArgumentsText.addModifyListener(new ModifyListener() {
|
||||
public void modifyText(ModifyEvent evt) {
|
||||
updateLaunchConfigurationDialog();
|
||||
}
|
||||
});
|
||||
fArgumentVariablesButton= createPushButton(group, LaunchMessages.getString("CArgumentsTab.Variables"), null); //$NON-NLS-1$
|
||||
fArgumentVariablesButton= createPushButton(group, LaunchMessages.CArgumentsTab_Variables, null);
|
||||
gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
|
||||
fArgumentVariablesButton.setLayoutData(gd);
|
||||
fArgumentVariablesButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
|
||||
*/
|
||||
public void widgetSelected(SelectionEvent arg0) {
|
||||
handleVariablesButtonSelected(fPrgmArgumentsText);
|
||||
}
|
||||
|
||||
});
|
||||
addControlAccessibleListener(fArgumentVariablesButton, fArgumentVariablesButton.getText()); // need to strip the mnemonic from buttons
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
dialog.open();
|
||||
return dialog.getVariableExpression();
|
||||
}
|
||||
|
||||
|
||||
public void addControlAccessibleListener(Control control, String controlName) {
|
||||
//strip mnemonic (&)
|
||||
String[] strs = controlName.split("&"); //$NON-NLS-1$
|
||||
|
@ -162,7 +162,7 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
control.getAccessible().addAccessibleListener(new ControlAccessibleListener(stripped.toString()));
|
||||
}
|
||||
|
||||
|
||||
private class ControlAccessibleListener extends AccessibleAdapter {
|
||||
private String controlName;
|
||||
ControlAccessibleListener(String name) {
|
||||
|
@ -171,9 +171,8 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
public void getName(AccessibleEvent e) {
|
||||
e.result = controlName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
|
||||
*/
|
||||
|
@ -196,9 +195,9 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
try {
|
||||
fPrgmArgumentsText.setText(configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "")); //$NON-NLS-1$
|
||||
fWorkingDirectoryBlock.initializeFrom(configuration);
|
||||
}
|
||||
catch (CoreException e) {
|
||||
setErrorMessage(LaunchMessages.getFormattedString("Launch.common.Exception_occurred_reading_configuration_EXCEPTION", e.getStatus().getMessage())); //$NON-NLS-1$
|
||||
} catch (CoreException e) {
|
||||
setErrorMessage(NLS.bind(LaunchMessages.Launch_common_Exception_occurred_reading_configuration_EXCEPTION,
|
||||
e.getStatus().getMessage()));
|
||||
LaunchUIPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
@ -208,19 +207,20 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
*/
|
||||
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
|
||||
configuration.setAttribute(
|
||||
ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
|
||||
getAttributeValueFrom(fPrgmArgumentsText));
|
||||
ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
|
||||
getAttributeValueFrom(fPrgmArgumentsText));
|
||||
fWorkingDirectoryBlock.performApply(configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retuns the string in the text widget, or <code>null</code> if empty.
|
||||
* Returns the string in the text widget, or <code>null</code> if empty.
|
||||
*
|
||||
* @return text or <code>null</code>
|
||||
*/
|
||||
protected String getAttributeValueFrom(Text text) {
|
||||
String content = text.getText().trim();
|
||||
content = content.replaceAll("\r\n", "\n"); // bug #131513 - eliminate Windows \r line delimiter
|
||||
// Bug #131513 - eliminate Windows \r line delimiter
|
||||
content = content.replaceAll("\r\n", "\n"); //$NON-NLS-1$//$NON-NLS-2$
|
||||
if (content.length() > 0) {
|
||||
return content;
|
||||
}
|
||||
|
@ -228,16 +228,16 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return TAB_ID;
|
||||
}
|
||||
@Override
|
||||
public String getId() {
|
||||
return TAB_ID;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
|
||||
*/
|
||||
public String getName() {
|
||||
return LaunchMessages.getString("CArgumentsTab.Arguments"); //$NON-NLS-1$
|
||||
return LaunchMessages.CArgumentsTab_Arguments;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -68,7 +68,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
*
|
||||
* @since 6.0
|
||||
*/
|
||||
public static final String TAB_ID = "org.eclipse.cdt.cdi.launch.debuggerTab";
|
||||
public static final String TAB_ID = "org.eclipse.cdt.cdi.launch.debuggerTab"; //$NON-NLS-1$
|
||||
|
||||
public class AdvancedDebuggerOptionsDialog extends Dialog {
|
||||
|
||||
|
@ -91,14 +91,14 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
protected Control createDialogArea(Composite parent) {
|
||||
Composite composite = (Composite)super.createDialogArea(parent);
|
||||
Group group = new Group(composite, SWT.NONE);
|
||||
group.setText(LaunchMessages.getString("CDebuggerTab.Automatically_track_values_of")); //$NON-NLS-1$
|
||||
group.setText(LaunchMessages.CDebuggerTab_Automatically_track_values_of);
|
||||
GridLayout layout = new GridLayout();
|
||||
group.setLayout(layout);
|
||||
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
fVarBookKeeping = new Button(group, SWT.CHECK);
|
||||
fVarBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Variables")); //$NON-NLS-1$
|
||||
fVarBookKeeping.setText(LaunchMessages.CDebuggerTab_Variables);
|
||||
fRegBookKeeping = new Button(group, SWT.CHECK);
|
||||
fRegBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Registers")); //$NON-NLS-1$
|
||||
fRegBookKeeping.setText(LaunchMessages.CDebuggerTab_Registers);
|
||||
initialize();
|
||||
return composite;
|
||||
}
|
||||
|
@ -111,16 +111,16 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
private void initialize() {
|
||||
Map attr = getAdvancedAttributes();
|
||||
Object varBookkeeping = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING);
|
||||
fVarBookKeeping.setSelection( (varBookkeeping instanceof Boolean) ? !((Boolean)varBookkeeping).booleanValue() : true);
|
||||
fVarBookKeeping.setSelection((varBookkeeping instanceof Boolean) ? !((Boolean)varBookkeeping).booleanValue() : true);
|
||||
Object regBookkeeping = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING);
|
||||
fRegBookKeeping.setSelection( (regBookkeeping instanceof Boolean) ? !((Boolean)regBookkeeping).booleanValue() : true);
|
||||
fRegBookKeeping.setSelection((regBookkeeping instanceof Boolean) ? !((Boolean)regBookkeeping).booleanValue() : true);
|
||||
}
|
||||
|
||||
private void saveValues() {
|
||||
Map attr = getAdvancedAttributes();
|
||||
Boolean varBookkeeping = Boolean.valueOf( !fVarBookKeeping.getSelection() );
|
||||
Boolean varBookkeeping = Boolean.valueOf(!fVarBookKeeping.getSelection());
|
||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, varBookkeeping);
|
||||
Boolean regBookkeeping = Boolean.valueOf( !fRegBookKeeping.getSelection() );
|
||||
Boolean regBookkeeping = Boolean.valueOf(!fRegBookKeeping.getSelection());
|
||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
|
||||
update();
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
*/
|
||||
protected void configureShell(Shell newShell) {
|
||||
super.configureShell(newShell);
|
||||
newShell.setText(LaunchMessages.getString("CDebuggerTab.Advanced_Options_Dialog_Title")); //$NON-NLS-1$
|
||||
newShell.setText(LaunchMessages.CDebuggerTab_Advanced_Options_Dialog_Title);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,27 +165,27 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
}
|
||||
|
||||
public void createControl(Composite parent) {
|
||||
fContainer = new ScrolledComposite( parent, SWT.V_SCROLL | SWT.H_SCROLL );
|
||||
fContainer = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
|
||||
fContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
fContainer.setLayout( new FillLayout() );
|
||||
fContainer.setLayout(new FillLayout());
|
||||
fContainer.setExpandHorizontal(true);
|
||||
fContainer.setExpandVertical(true);
|
||||
|
||||
fContents = new Composite( fContainer, SWT.NONE );
|
||||
fContents = new Composite(fContainer, SWT.NONE);
|
||||
setControl(fContainer);
|
||||
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB);
|
||||
int numberOfColumns = ( fAttachMode ) ? 2 : 1;
|
||||
int numberOfColumns = (fAttachMode) ? 2 : 1;
|
||||
GridLayout layout = new GridLayout(numberOfColumns, false);
|
||||
fContents.setLayout(layout);
|
||||
GridData gd = new GridData( GridData.BEGINNING, GridData.CENTER, true, false );
|
||||
GridData gd = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
|
||||
fContents.setLayoutData(gd);
|
||||
|
||||
createDebuggerCombo(fContents, ( fAttachMode ) ? 1 : 2 );
|
||||
createDebuggerCombo(fContents, (fAttachMode) ? 1 : 2);
|
||||
createOptionsComposite(fContents);
|
||||
createDebuggerGroup(fContents, 2);
|
||||
|
||||
fContainer.setContent( fContents );
|
||||
fContainer.setContent(fContents);
|
||||
}
|
||||
|
||||
protected void loadDebuggerComboBox(ILaunchConfiguration config, String selection) {
|
||||
|
@ -221,7 +221,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
list.add(debugConfigs[i]);
|
||||
// select first exact matching debugger for platform or
|
||||
// requested selection
|
||||
if ( (defaultSelection.equals("") && debuggerPlatform.equalsIgnoreCase(configPlatform))) { //$NON-NLS-1$
|
||||
if ((defaultSelection.equals("") && debuggerPlatform.equalsIgnoreCase(configPlatform))) { //$NON-NLS-1$
|
||||
defaultSelection = debugConfigs[i].getID();
|
||||
}
|
||||
}
|
||||
|
@ -322,14 +322,14 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
? ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH
|
||||
: ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN;
|
||||
if (!debugConfig.supportsMode(mode)) {
|
||||
setErrorMessage(MessageFormat.format(LaunchMessages.getString("CDebuggerTab.Mode_not_supported"), new String[]{mode})); //$NON-NLS-1$
|
||||
setErrorMessage(MessageFormat.format(LaunchMessages.CDebuggerTab_Mode_not_supported, new String[]{mode}));
|
||||
return false;
|
||||
}
|
||||
if ( fStopInMain != null && fStopInMainSymbol != null ) {
|
||||
if (fStopInMain != null && fStopInMainSymbol != null) {
|
||||
// The "Stop on startup at" field must not be empty
|
||||
String mainSymbol = fStopInMainSymbol.getText().trim();
|
||||
if (fStopInMain.getSelection() && mainSymbol.length() == 0) {
|
||||
setErrorMessage( LaunchMessages.getString("CDebuggerTab.Stop_on_startup_at_can_not_be_empty")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CDebuggerTab_Stop_on_startup_at_can_not_be_empty);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String)null);
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
if (programName != null ) {
|
||||
if (programName != null) {
|
||||
return LaunchUtils.getBinary(programName, projectName);
|
||||
}
|
||||
return null;
|
||||
|
@ -376,7 +376,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
protected boolean validateDebuggerConfig(ILaunchConfiguration config) {
|
||||
ICDebugConfiguration debugConfig = getDebugConfig();
|
||||
if (debugConfig == null) {
|
||||
setErrorMessage(LaunchMessages.getString("CDebuggerTab.No_debugger_available")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CDebuggerTab_No_debugger_available);
|
||||
return false;
|
||||
}
|
||||
// We do not validate platform and CPU compatibility to avoid accidentally disabling
|
||||
|
@ -397,13 +397,12 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
protected void createOptionsComposite(Composite parent) {
|
||||
Composite optionsComp = new Composite(parent, SWT.NONE);
|
||||
int numberOfColumns = (fAttachMode) ? 1 : 3;
|
||||
GridLayout layout = new GridLayout( numberOfColumns, false );
|
||||
optionsComp.setLayout( layout );
|
||||
optionsComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.CENTER, true, false, 1, 1 ) );
|
||||
GridLayout layout = new GridLayout(numberOfColumns, false);
|
||||
optionsComp.setLayout(layout);
|
||||
optionsComp.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false, 1, 1));
|
||||
if (fAttachMode == false) {
|
||||
fStopInMain = createCheckButton( optionsComp, LaunchMessages.getString( "CDebuggerTab.Stop_at_main_on_startup" ) ); //$NON-NLS-1$
|
||||
fStopInMain = createCheckButton(optionsComp, LaunchMessages.CDebuggerTab_Stop_at_main_on_startup);
|
||||
fStopInMain.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
fStopInMainSymbol.setEnabled(fStopInMain.getSelection());
|
||||
update();
|
||||
|
@ -421,15 +420,14 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
fStopInMainSymbol.getAccessible().addAccessibleListener(
|
||||
new AccessibleAdapter() {
|
||||
public void getName(AccessibleEvent e) {
|
||||
e.result = LaunchMessages.getString( "CDebuggerTab.Stop_at_main_on_startup"); //$NON-NLS-1$
|
||||
e.result = LaunchMessages.CDebuggerTab_Stop_at_main_on_startup;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
fAdvancedButton = createPushButton(optionsComp, LaunchMessages.getString("CDebuggerTab.Advanced"), null); //$NON-NLS-1$
|
||||
fAdvancedButton = createPushButton(optionsComp, LaunchMessages.CDebuggerTab_Advanced, null);
|
||||
((GridData)fAdvancedButton.getLayoutData()).horizontalAlignment = GridData.END;
|
||||
fAdvancedButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
Dialog dialog = new AdvancedDebuggerOptionsDialog(getShell());
|
||||
dialog.open();
|
||||
|
@ -485,7 +483,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
public void dispose() {
|
||||
getAdvancedAttributes().clear();
|
||||
ICDebuggerPage debuggerPage = getDynamicTab();
|
||||
if ( debuggerPage != null )
|
||||
if (debuggerPage != null)
|
||||
debuggerPage.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.eclipse.jface.viewers.TableViewer;
|
|||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.jface.viewers.ViewerSorter;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.ModifyEvent;
|
||||
import org.eclipse.swt.events.ModifyListener;
|
||||
|
@ -67,9 +68,7 @@ import org.eclipse.swt.widgets.Text;
|
|||
* @deprecated
|
||||
*/
|
||||
public class CEnvironmentTab extends CLaunchConfigurationTab {
|
||||
|
||||
protected Properties fElements;
|
||||
|
||||
protected TableViewer fVariableList;
|
||||
protected Button fBtnNew;
|
||||
protected Button fBtnEdit;
|
||||
|
@ -134,7 +133,8 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
|
||||
protected void configureShell(Shell shell) {
|
||||
super.configureShell(shell);
|
||||
String title = (fEdit) ? LaunchMessages.getString("CEnvironmentTab.Edit_Variable") : LaunchMessages.getString("CEnvironmentTab.New_Variable"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
String title = (fEdit) ?
|
||||
LaunchMessages.CEnvironmentTab_Edit_Variable : LaunchMessages.CEnvironmentTab_New_Variable;
|
||||
shell.setText(title);
|
||||
}
|
||||
|
||||
|
@ -152,14 +152,14 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
int fieldWidthHint = convertWidthInCharsToPixels(metrics, 50);
|
||||
|
||||
Label label = new Label(composite, SWT.NONE);
|
||||
label.setText(LaunchMessages.getString("CEnvironmentTab.NameColon")); //$NON-NLS-1$
|
||||
label.setText(LaunchMessages.CEnvironmentTab_NameColon);
|
||||
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(LaunchMessages.getString("CEnvironmentTab.ValueColon")); //$NON-NLS-1$
|
||||
label.setText(LaunchMessages.CEnvironmentTab_ValueColon);
|
||||
fTextValue = new Text(composite, SWT.SINGLE | SWT.BORDER);
|
||||
gd = new GridData(GridData.FILL_BOTH);
|
||||
gd.grabExcessHorizontalSpace = true;
|
||||
|
@ -212,7 +212,8 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
Composite control = new Composite(parent, SWT.NONE);
|
||||
setControl(control);
|
||||
|
||||
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB);
|
||||
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB);
|
||||
|
||||
GridLayout gl = new GridLayout(2, false);
|
||||
|
||||
|
@ -275,11 +276,11 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
table.setLinesVisible(true);
|
||||
|
||||
TableColumn column1 = new TableColumn(table, SWT.NULL);
|
||||
column1.setText(LaunchMessages.getString("CEnvironmentTab.Name")); //$NON-NLS-1$
|
||||
column1.setText(LaunchMessages.CEnvironmentTab_Name);
|
||||
tableLayout.addColumnData(new ColumnWeightData(30));
|
||||
|
||||
TableColumn column2 = new TableColumn(table, SWT.NULL);
|
||||
column2.setText(LaunchMessages.getString("CEnvironmentTab.Value")); //$NON-NLS-1$
|
||||
column2.setText(LaunchMessages.CEnvironmentTab_Value);
|
||||
tableLayout.addColumnData(new ColumnWeightData(30));
|
||||
|
||||
fVariableList.addDoubleClickListener(new IDoubleClickListener() {
|
||||
|
@ -299,7 +300,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(LaunchMessages.getString("CEnvironmentTab.New...")); //$NON-NLS-1$
|
||||
fBtnNew.setText(LaunchMessages.CEnvironmentTab_New);
|
||||
fBtnNew.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
fBtnNew.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
@ -307,7 +308,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
});
|
||||
fBtnImport = new Button(composite, SWT.NONE);
|
||||
fBtnImport.setText(LaunchMessages.getString("CEnvironmentTab.Import...")); //$NON-NLS-1$
|
||||
fBtnImport.setText(LaunchMessages.CEnvironmentTab_Import);
|
||||
fBtnImport.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
fBtnImport.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
@ -315,7 +316,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
});
|
||||
fBtnEdit = new Button(composite, SWT.NONE);
|
||||
fBtnEdit.setText(LaunchMessages.getString("CEnvironmentTab.Edit...")); //$NON-NLS-1$
|
||||
fBtnEdit.setText(LaunchMessages.CEnvironmentTab_Edit);
|
||||
fBtnEdit.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
fBtnEdit.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
@ -323,7 +324,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
});
|
||||
fBtnRemove = new Button(composite, SWT.NONE);
|
||||
fBtnRemove.setText(LaunchMessages.getString("CEnvironmentTab.Remove")); //$NON-NLS-1$
|
||||
fBtnRemove.setText(LaunchMessages.CEnvironmentTab_Remove);
|
||||
fBtnRemove.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
fBtnRemove.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
@ -357,7 +358,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
protected void importEntries() {
|
||||
FileDialog fileDialog = new FileDialog(getShell(), SWT.OPEN);
|
||||
final String filename = fileDialog.open();
|
||||
if(filename == null) {
|
||||
if (filename == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -369,7 +370,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
|
||||
protected void parseImportFile(String filename) {
|
||||
File file = new File(filename);
|
||||
if(!file.exists()) {
|
||||
if (!file.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -380,12 +381,12 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
String line, key, value;
|
||||
while((line = reader.readLine()) != null) {
|
||||
line = line.trim();
|
||||
if(line.length() == 0) {
|
||||
if (line.length() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int demarcation = line.indexOf("="); //$NON-NLS-1$
|
||||
if(demarcation == -1) {
|
||||
if (demarcation == -1) {
|
||||
key = line;
|
||||
value = ""; //$NON-NLS-1$
|
||||
} else {
|
||||
|
@ -393,10 +394,12 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
value = line.substring(demarcation + 1, line.length());
|
||||
}
|
||||
|
||||
if(fElements.getProperty(key) != null) {
|
||||
if (fElements.getProperty(key) != null) {
|
||||
boolean overwrite;
|
||||
overwrite = MessageDialog.openQuestion(getShell(), LaunchMessages.getString("CEnvironmentTab.Existing_Environment_Variable"), LaunchMessages.getFormattedString("CEnvironmentTab.Environment_variable_NAME_exists", key)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
if(!overwrite) {
|
||||
overwrite = MessageDialog.openQuestion(getShell(),
|
||||
LaunchMessages.CEnvironmentTab_Existing_Environment_Variable,
|
||||
NLS.bind(LaunchMessages.CEnvironmentTab_Environment_variable_NAME_exists, key));
|
||||
if (!overwrite) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -464,7 +467,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
|
||||
*/
|
||||
public String getName() {
|
||||
return LaunchMessages.getString("CEnvironmentTab.Environment"); //$NON-NLS-1$
|
||||
return LaunchMessages.CEnvironmentTab_Environment;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -473,5 +476,4 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
|
|||
public Image getImage() {
|
||||
return LaunchImages.get(LaunchImages.IMG_VIEW_ENVIRONMENT_TAB);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
|
|||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.jface.viewers.ILabelProvider;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.ModifyEvent;
|
||||
import org.eclipse.swt.events.ModifyListener;
|
||||
|
@ -141,7 +142,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
gd.horizontalSpan = colSpan;
|
||||
mainComp.setLayoutData(gd);
|
||||
|
||||
fTerminalButton = createCheckButton(mainComp, LaunchMessages.getString("CMainTab.UseTerminal")); //$NON-NLS-1$
|
||||
fTerminalButton = createCheckButton(mainComp, LaunchMessages.CMainTab_UseTerminal);
|
||||
fTerminalButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
|
@ -199,12 +200,9 @@ public class CMainTab extends CAbstractMainTab {
|
|||
public void performApply(ILaunchConfigurationWorkingCopy config) {
|
||||
super.performApply(config);
|
||||
ICProject cProject = this.getCProject();
|
||||
if (cProject != null && cProject.exists())
|
||||
{
|
||||
if (cProject != null && cProject.exists()) {
|
||||
config.setMappedResources(new IResource[] { cProject.getProject() });
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// the user typed in a non-existent project name. Ensure that
|
||||
// won't be suppressed from the dialog. This matches JDT behaviour
|
||||
config.setMappedResources(null);
|
||||
|
@ -219,17 +217,15 @@ public class CMainTab extends CAbstractMainTab {
|
|||
if (fTerminalButton != null) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, fTerminalButton.getSelection());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a dialog that lists all main types
|
||||
*/
|
||||
protected void handleSearchButtonSelected() {
|
||||
|
||||
if (getCProject() == null) {
|
||||
MessageDialog.openInformation(getShell(), LaunchMessages.getString("CMainTab.Project_required"), //$NON-NLS-1$
|
||||
LaunchMessages.getString("CMainTab.Enter_project_before_searching_for_program")); //$NON-NLS-1$
|
||||
MessageDialog.openInformation(getShell(), LaunchMessages.CMainTab_Project_required,
|
||||
LaunchMessages.CMainTab_Enter_project_before_searching_for_program);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -282,17 +278,16 @@ public class CMainTab extends CAbstractMainTab {
|
|||
|
||||
TwoPaneElementSelector dialog = new TwoPaneElementSelector(getShell(), programLabelProvider, qualifierLabelProvider);
|
||||
dialog.setElements(getBinaryFiles(getCProject()));
|
||||
dialog.setMessage(LaunchMessages.getString("CMainTab.Choose_program_to_run")); //$NON-NLS-1$
|
||||
dialog.setTitle(LaunchMessages.getString("CMainTab.Program_Selection")); //$NON-NLS-1$
|
||||
dialog.setUpperListLabel(LaunchMessages.getString("Launch.common.BinariesColon")); //$NON-NLS-1$
|
||||
dialog.setLowerListLabel(LaunchMessages.getString("Launch.common.QualifierColon")); //$NON-NLS-1$
|
||||
dialog.setMessage(LaunchMessages.CMainTab_Choose_program_to_run);
|
||||
dialog.setTitle(LaunchMessages.CMainTab_Program_Selection);
|
||||
dialog.setUpperListLabel(LaunchMessages.Launch_common_BinariesColon);
|
||||
dialog.setLowerListLabel(LaunchMessages.Launch_common_QualifierColon);
|
||||
dialog.setMultipleSelection(false);
|
||||
// dialog.set
|
||||
if (dialog.open() == Window.OK) {
|
||||
IBinary binary = (IBinary)dialog.getFirstResult();
|
||||
fProgText.setText(binary.getResource().getProjectRelativePath().toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -310,7 +305,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
projComp.setLayoutData(gd);
|
||||
|
||||
fProjLabel = new Label(projComp, SWT.NONE);
|
||||
fProjLabel.setText(LaunchMessages.getString("CMainTab.&ProjectColon")); //$NON-NLS-1$
|
||||
fProjLabel.setText(LaunchMessages.CMainTab_ProjectColon);
|
||||
gd = new GridData();
|
||||
gd.horizontalSpan = 2;
|
||||
fProjLabel.setLayoutData(gd);
|
||||
|
@ -329,7 +324,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
}
|
||||
});
|
||||
|
||||
fProjButton = createPushButton(projComp, LaunchMessages.getString("Launch.common.Browse_1"), null); //$NON-NLS-1$
|
||||
fProjButton = createPushButton(projComp, LaunchMessages.Launch_common_Browse_1, null);
|
||||
fProjButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
|
@ -351,7 +346,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
gd.horizontalSpan = colSpan;
|
||||
mainComp.setLayoutData(gd);
|
||||
fProgLabel = new Label(mainComp, SWT.NONE);
|
||||
fProgLabel.setText(LaunchMessages.getString("CMainTab.C/C++_Application")); //$NON-NLS-1$
|
||||
fProgLabel.setText(LaunchMessages.CMainTab_C_Application);
|
||||
gd = new GridData();
|
||||
gd.horizontalSpan = 3;
|
||||
fProgLabel.setLayoutData(gd);
|
||||
|
@ -364,7 +359,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
}
|
||||
});
|
||||
|
||||
fSearchButton = createPushButton(mainComp, LaunchMessages.getString("CMainTab.Search..."), null); //$NON-NLS-1$
|
||||
fSearchButton = createPushButton(mainComp, LaunchMessages.CMainTab_Search, null);
|
||||
fSearchButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
|
@ -374,7 +369,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
});
|
||||
|
||||
Button fBrowseForBinaryButton;
|
||||
fBrowseForBinaryButton = createPushButton(mainComp, LaunchMessages.getString("Launch.common.Browse_2"), null); //$NON-NLS-1$
|
||||
fBrowseForBinaryButton = createPushButton(mainComp, LaunchMessages.Launch_common_Browse_2, null);
|
||||
fBrowseForBinaryButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
|
@ -392,8 +387,8 @@ public class CMainTab extends CAbstractMainTab {
|
|||
protected void handleBinaryBrowseButtonSelected() {
|
||||
final ICProject cproject = getCProject();
|
||||
if (cproject == null) {
|
||||
MessageDialog.openInformation(getShell(), LaunchMessages.getString("CMainTab.Project_required"), //$NON-NLS-1$
|
||||
LaunchMessages.getString("CMainTab.Enter_project_before_browsing_for_program")); //$NON-NLS-1$
|
||||
MessageDialog.openInformation(getShell(), LaunchMessages.CMainTab_Project_required,
|
||||
LaunchMessages.CMainTab_Enter_project_before_browsing_for_program);
|
||||
return;
|
||||
}
|
||||
FileDialog fileDialog = new FileDialog(getShell(), SWT.NONE);
|
||||
|
@ -411,34 +406,32 @@ public class CMainTab extends CAbstractMainTab {
|
|||
*/
|
||||
@Override
|
||||
public boolean isValid(ILaunchConfiguration config) {
|
||||
|
||||
setErrorMessage(null);
|
||||
setMessage(null);
|
||||
|
||||
if (!dontCheckProgram) {
|
||||
|
||||
String name = fProjText.getText().trim();
|
||||
if (name.length() == 0) {
|
||||
setErrorMessage(LaunchMessages.getString("CMainTab.Project_not_specified")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CMainTab_Project_not_specified);
|
||||
return false;
|
||||
}
|
||||
if (!ResourcesPlugin.getWorkspace().getRoot().getProject(name).exists()) {
|
||||
setErrorMessage(LaunchMessages.getString("Launch.common.Project_does_not_exist")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.Launch_common_Project_does_not_exist);
|
||||
return false;
|
||||
}
|
||||
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
|
||||
if (!project.isOpen()) {
|
||||
setErrorMessage(LaunchMessages.getString("CMainTab.Project_must_be_opened")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CMainTab_Project_must_be_opened);
|
||||
return false;
|
||||
}
|
||||
|
||||
name = fProgText.getText().trim();
|
||||
if (name.length() == 0) {
|
||||
setErrorMessage(LaunchMessages.getString("CMainTab.Program_not_specified")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CMainTab_Program_not_specified);
|
||||
return false;
|
||||
}
|
||||
if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CMainTab_Program_does_not_exist);
|
||||
return false;
|
||||
}
|
||||
// Avoid constantly checking the binary if nothing relevant has
|
||||
|
@ -448,8 +441,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg);
|
||||
}
|
||||
return fPreviouslyCheckedProgramIsValid;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
fPreviouslyCheckedProgram = name;
|
||||
fPreviouslyCheckedProgramIsValid = true; // we'll flip this below if not true
|
||||
fPreviouslyCheckedProgramErrorMsg = null; // we'll set this below if there's an error
|
||||
|
@ -457,8 +449,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
if (!exePath.isAbsolute()) {
|
||||
IPath location = project.getLocation();
|
||||
if (location == null) {
|
||||
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_does_not_exist);
|
||||
return (fPreviouslyCheckedProgramIsValid = false);
|
||||
}
|
||||
|
||||
|
@ -468,24 +459,24 @@ public class CMainTab extends CAbstractMainTab {
|
|||
IFile projFile = null;
|
||||
try {
|
||||
projFile = project.getFile(name);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// thrown if relative path that resolves to a root file ("..\somefile")
|
||||
}
|
||||
catch (IllegalArgumentException exc) {} // thrown if relative path that resolves to a root file ("..\somefile")
|
||||
if (projFile == null || !projFile.exists()) {
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_does_not_exist);
|
||||
return (fPreviouslyCheckedProgramIsValid = false);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
exePath = projFile.getLocation();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!exePath.toFile().exists()) {
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_does_not_exist);
|
||||
return (fPreviouslyCheckedProgramIsValid = false);
|
||||
}
|
||||
try {
|
||||
if (!isBinary(project, exePath)) {
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.getString("CMainTab.Program_is_not_a_recongnized_executable")); //$NON-NLS-1$
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_is_not_a_recongnized_executable);
|
||||
return (fPreviouslyCheckedProgramIsValid = false);
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
|
@ -502,12 +493,12 @@ public class CMainTab extends CAbstractMainTab {
|
|||
// This allows to re-use the launch, with a different core file.
|
||||
if (!coreName.equals(EMPTY_STRING)) {
|
||||
if (coreName.equals(".") || coreName.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
setErrorMessage(LaunchMessages.getString("CMainTab.Core_does_not_exist")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CMainTab_Core_does_not_exist);
|
||||
return false;
|
||||
}
|
||||
IPath corePath = new Path(coreName);
|
||||
if (!corePath.toFile().exists()) {
|
||||
setErrorMessage(LaunchMessages.getString("CMainTab.Core_does_not_exist")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CMainTab_Core_does_not_exist);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -557,23 +548,20 @@ public class CMainTab extends CAbstractMainTab {
|
|||
* Set the program name attributes on the working copy based on the ICElement
|
||||
*/
|
||||
protected void initializeProgramName(ICElement cElement, ILaunchConfigurationWorkingCopy config) {
|
||||
|
||||
boolean renamed = false;
|
||||
|
||||
if (!(cElement instanceof IBinary))
|
||||
{
|
||||
if (!(cElement instanceof IBinary)) {
|
||||
cElement = cElement.getCProject();
|
||||
}
|
||||
|
||||
if (cElement instanceof ICProject) {
|
||||
|
||||
IProject project = cElement.getCProject().getProject();
|
||||
String name = project.getName();
|
||||
ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(project);
|
||||
if (projDes != null) {
|
||||
String buildConfigName = projDes.getActiveConfiguration().getName();
|
||||
//bug 234951
|
||||
name = LaunchMessages.getFormattedString("CMainTab.Configuration_name", new String[]{name, buildConfigName}); //$NON-NLS-1$
|
||||
// Bug 234951
|
||||
name = NLS.bind(LaunchMessages.CMainTab_Configuration_name, name, buildConfigName);
|
||||
}
|
||||
name = getLaunchConfigurationDialog().generateName(name);
|
||||
config.rename(name);
|
||||
|
@ -594,8 +582,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
String path;
|
||||
path = binary.getResource().getProjectRelativePath().toOSString();
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, path);
|
||||
if (!renamed)
|
||||
{
|
||||
if (!renamed) {
|
||||
String name = binary.getElementName();
|
||||
int index = name.lastIndexOf('.');
|
||||
if (index > 0) {
|
||||
|
@ -607,8 +594,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
}
|
||||
}
|
||||
|
||||
if (!renamed)
|
||||
{
|
||||
if (!renamed) {
|
||||
String name = getLaunchConfigurationDialog().generateName(cElement.getCProject().getElementName());
|
||||
config.rename(name);
|
||||
}
|
||||
|
@ -625,7 +611,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
|
||||
*/
|
||||
public String getName() {
|
||||
return LaunchMessages.getString("CMainTab.Main"); //$NON-NLS-1$
|
||||
return LaunchMessages.CMainTab_Main;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -637,5 +623,4 @@ public class CMainTab extends CAbstractMainTab {
|
|||
public Image getImage() {
|
||||
return LaunchImages.get(LaunchImages.IMG_VIEW_MAIN_TAB);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class CoreFileDebuggerTab extends AbstractCDebuggerTab {
|
|||
ICDebuggerPage tab = CDebugUIPlugin.getDefault().getDebuggerPage(id);
|
||||
tab.setDefaults(config);
|
||||
} catch (CoreException e) {
|
||||
LaunchUIPlugin.errorDialog(LaunchMessages.getString("AbstractCDebuggerTab.ErrorLoadingDebuggerPage"), e.getStatus()); //$NON-NLS-1$
|
||||
LaunchUIPlugin.errorDialog(LaunchMessages.AbstractCDebuggerTab_ErrorLoadingDebuggerPage, e.getStatus());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,11 +146,11 @@ public class CoreFileDebuggerTab extends AbstractCDebuggerTab {
|
|||
protected boolean validateDebuggerConfig(ILaunchConfiguration config) {
|
||||
ICDebugConfiguration debugConfig = getDebugConfig();
|
||||
if (debugConfig == null) {
|
||||
setErrorMessage(LaunchMessages.getString("CoreFileDebuggerTab.No_debugger_available")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CoreFileDebuggerTab_No_debugger_available);
|
||||
return false;
|
||||
}
|
||||
if (!validatePlatform(config, debugConfig)) {
|
||||
setErrorMessage(LaunchMessages.getString("CoreFileDebuggerTab.platform_is_not_supported")); //$NON-NLS-1$
|
||||
setErrorMessage(LaunchMessages.CoreFileDebuggerTab_platform_is_not_supported);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue