mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Code formatting.
This commit is contained in:
parent
0f4e9a3759
commit
677a3e2eaf
1 changed files with 18 additions and 22 deletions
|
@ -533,9 +533,10 @@ public class CoreModelUtil {
|
||||||
* if start is lower than 0
|
* if start is lower than 0
|
||||||
*/
|
*/
|
||||||
public static final int indexOf(char toBeFound, char[] array, int start) {
|
public static final int indexOf(char toBeFound, char[] array, int start) {
|
||||||
for (int i = start; i < array.length; i++)
|
for (int i = start; i < array.length; i++) {
|
||||||
if (toBeFound == array[i])
|
if (toBeFound == array[i])
|
||||||
return i;
|
return i;
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,8 +554,7 @@ public class CoreModelUtil {
|
||||||
return tu;
|
return tu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
CoreModel coreModel = CoreModel.getDefault();
|
CoreModel coreModel = CoreModel.getDefault();
|
||||||
ITranslationUnit tu= null;
|
ITranslationUnit tu= null;
|
||||||
if (preferredProject != null) {
|
if (preferredProject != null) {
|
||||||
|
@ -574,7 +574,6 @@ public class CoreModelUtil {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches for a translation unit within the cprojects. For external files the ones
|
* Searches for a translation unit within the cprojects. For external files the ones
|
||||||
* from the given project are preferred.
|
* from the given project are preferred.
|
||||||
|
@ -589,8 +588,7 @@ public class CoreModelUtil {
|
||||||
return tu;
|
return tu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
CoreModel coreModel = CoreModel.getDefault();
|
CoreModel coreModel = CoreModel.getDefault();
|
||||||
ITranslationUnit tu= null;
|
ITranslationUnit tu= null;
|
||||||
if (preferredProject != null) {
|
if (preferredProject != null) {
|
||||||
|
@ -668,7 +666,6 @@ public class CoreModelUtil {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the configuration descriptions referenced directly by the specified
|
* Returns the configuration descriptions referenced directly by the specified
|
||||||
* configuration description. The result will not contain duplicates. Returns
|
* configuration description. The result will not contain duplicates. Returns
|
||||||
|
@ -735,14 +732,13 @@ public class CoreModelUtil {
|
||||||
|
|
||||||
for (IProject cproject : projects) {
|
for (IProject cproject : projects) {
|
||||||
ICProjectDescription prjDes= core.getProjectDescription(cproject, writable);
|
ICProjectDescription prjDes= core.getProjectDescription(cproject, writable);
|
||||||
//in case this is not a CDT project the description will be null, so check for null
|
// In case this is not a CDT project the description will be null, so check for null
|
||||||
if (prjDes != null) {
|
if (prjDes != null) {
|
||||||
ICConfigurationDescription[] cfgDscs= prjDes.getConfigurations();
|
ICConfigurationDescription[] cfgDscs= prjDes.getConfigurations();
|
||||||
for (ICConfigurationDescription cfgDsc : cfgDscs) {
|
for (ICConfigurationDescription cfgDsc : cfgDscs) {
|
||||||
ICConfigurationDescription[] references = getReferencedConfigurationDescriptions(cfgDsc, false);
|
ICConfigurationDescription[] references = getReferencedConfigurationDescriptions(cfgDsc, false);
|
||||||
for (ICConfigurationDescription reference : references) {
|
for (ICConfigurationDescription reference : references) {
|
||||||
if(reference!=null
|
if (reference != null && reference.getId().equals(cfgDes.getId())) {
|
||||||
&& reference.getId().equals(cfgDes.getId())) {
|
|
||||||
result.add(cfgDsc);
|
result.add(cfgDsc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue