mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 00:35:49 +02:00
Bug 286359. Executable not auto-selected
This commit is contained in:
parent
1bfc07f36c
commit
c0121fbe5f
2 changed files with 20 additions and 0 deletions
|
@ -458,6 +458,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
* the specified project.
|
* the specified project.
|
||||||
*/
|
*/
|
||||||
protected void handleProjectButtonSelected() {
|
protected void handleProjectButtonSelected() {
|
||||||
|
String currentProjectName = fProjText.getText();
|
||||||
ICProject project = chooseCProject();
|
ICProject project = chooseCProject();
|
||||||
if (project == null) {
|
if (project == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -465,6 +466,15 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
String projectName = project.getElementName();
|
String projectName = project.getElementName();
|
||||||
fProjText.setText(projectName);
|
fProjText.setText(projectName);
|
||||||
|
if (currentProjectName.length() == 0)
|
||||||
|
{
|
||||||
|
// New project selected for the first time, set the program name default too.
|
||||||
|
IBinary[] bins = getBinaryFiles(project);
|
||||||
|
if (bins != null && bins.length == 1) {
|
||||||
|
fProgText.setText(bins[0].getResource().getProjectRelativePath().toOSString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -718,6 +718,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
* the specified project.
|
* the specified project.
|
||||||
*/
|
*/
|
||||||
protected void handleProjectButtonSelected() {
|
protected void handleProjectButtonSelected() {
|
||||||
|
String currentProjectName = fProjText.getText();
|
||||||
ICProject project = chooseCProject();
|
ICProject project = chooseCProject();
|
||||||
if (project == null) {
|
if (project == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -725,6 +726,15 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
String projectName = project.getElementName();
|
String projectName = project.getElementName();
|
||||||
fProjText.setText(projectName);
|
fProjText.setText(projectName);
|
||||||
|
if (currentProjectName.length() == 0)
|
||||||
|
{
|
||||||
|
// New project selected for the first time, set the program name default too.
|
||||||
|
IBinary[] bins = getBinaryFiles(project);
|
||||||
|
if (bins != null && bins.length == 1) {
|
||||||
|
fProgText.setText(bins[0].getResource().getProjectRelativePath().toOSString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue