mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Fix problem in configuration selection when MBS project cannot be loaded
This commit is contained in:
parent
70f115ea4d
commit
c63f679228
2 changed files with 279 additions and 274 deletions
|
@ -46,16 +46,18 @@ public class BuildConfigAction extends Action {
|
||||||
Iterator iter = fProjects.iterator();
|
Iterator iter = fProjects.iterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo((IProject)iter.next());
|
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo((IProject)iter.next());
|
||||||
IConfiguration[] configs = info.getManagedProject().getConfigurations();
|
if (info != null && info.isValid()) {
|
||||||
int i = 0;
|
IConfiguration[] configs = info.getManagedProject().getConfigurations();
|
||||||
for (; i < configs.length; i++) {
|
int i = 0;
|
||||||
if (configs[i].getName().equals(fConfigName)) {
|
for (; i < configs.length; i++) {
|
||||||
break;
|
if (configs[i].getName().equals(fConfigName)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i != configs.length) {
|
||||||
|
info.setDefaultConfiguration(configs[i]);
|
||||||
|
info.setSelectedConfiguration(configs[i]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (i != configs.length) {
|
|
||||||
info.setDefaultConfiguration(configs[i]);
|
|
||||||
info.setSelectedConfiguration(configs[i]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,18 +51,18 @@ public class ChangeBuildConfigActionBase {
|
||||||
boolean bCurrentConfig = true;
|
boolean bCurrentConfig = true;
|
||||||
while (projIter.hasNext()) {
|
while (projIter.hasNext()) {
|
||||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo((IProject)projIter.next());
|
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo((IProject)projIter.next());
|
||||||
if (bCurrentConfig) {
|
if (info != null && info.isValid()) {
|
||||||
String sNewConfig = info.getDefaultConfiguration().getName();
|
if (bCurrentConfig) {
|
||||||
if (sCurrentConfig == null) {
|
String sNewConfig = info.getDefaultConfiguration().getName();
|
||||||
sCurrentConfig = sNewConfig;
|
if (sCurrentConfig == null) {
|
||||||
}
|
sCurrentConfig = sNewConfig;
|
||||||
else {
|
}
|
||||||
if (!sCurrentConfig.equals(sNewConfig)) {
|
else {
|
||||||
bCurrentConfig = false;
|
if (!sCurrentConfig.equals(sNewConfig)) {
|
||||||
|
bCurrentConfig = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (info != null) {
|
|
||||||
IConfiguration[] configs = info.getManagedProject().getConfigurations();
|
IConfiguration[] configs = info.getManagedProject().getConfigurations();
|
||||||
for (int i = 0; i < configs.length; i++) {
|
for (int i = 0; i < configs.length; i++) {
|
||||||
configNames.add(configs[i].getName());
|
configNames.add(configs[i].getName());
|
||||||
|
@ -81,7 +81,7 @@ public class ChangeBuildConfigActionBase {
|
||||||
boolean firstProj = true;
|
boolean firstProj = true;
|
||||||
while (projIter.hasNext()) {
|
while (projIter.hasNext()) {
|
||||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo((IProject)projIter.next());
|
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo((IProject)projIter.next());
|
||||||
if (info != null) {
|
if (info != null && info.isValid()) {
|
||||||
IConfiguration[] configs = info.getManagedProject().getConfigurations();
|
IConfiguration[] configs = info.getManagedProject().getConfigurations();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (; i < configs.length; i++) {
|
for (; i < configs.length; i++) {
|
||||||
|
@ -170,7 +170,10 @@ public class ChangeBuildConfigActionBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (project != null) {
|
if (project != null) {
|
||||||
fProjects.add(project);
|
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
|
||||||
|
if (info != null && info.isValid()) {
|
||||||
|
fProjects.add(project);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue