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