1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Do not try to create the ".cdtproject" file if it does not

exist.
This commit is contained in:
Alain Magloire 2004-06-21 15:55:57 +00:00
parent f132e86cc0
commit dad66224a2
2 changed files with 19 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2004-06-21 Alain Magloire
IndexManager, call CCorePlugin.getCDescriptor(.., false).
The boolean says to the DescriptorManager to not create the file
if it does not exists.
2004-06-18 Alain Magloire
- The call CCorePlugin.getCDescriptor(..) seems to return null.
This should be fix but meanwhile give the indexer a break by catching it.

View file

@ -755,8 +755,9 @@ public class IndexManager extends JobManager implements IIndexConstants {
}
private Boolean loadIndexerEnabledFromCDescriptor(IProject project) throws CoreException {
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(project, true );
// FIXME: descriptor should not be null ... but ... lets catch here for now.
// Check if we have the property in the descriptor
// We pass false since we do not want to create the descriptor if it does not exists.
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(project, false);
Boolean strBool = null;
if (descriptor != null) {
Node child = descriptor.getProjectData(CDT_INDEXER).getFirstChild();
@ -773,15 +774,17 @@ public class IndexManager extends JobManager implements IIndexConstants {
return strBool;
}
private Boolean loadIndexerProblemsEnabledFromCDescriptor(IProject project) throws CoreException {
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(project, true);
Node child = descriptor.getProjectData(CDT_INDEXER).getFirstChild();
// we are only checking for the settings do not create the descriptor.
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(project, false);
Boolean strBool = null;
while (child != null) {
if (child.getNodeName().equals(INDEXER_PROBLEMS_ENABLED))
strBool = Boolean.valueOf(((Element)child).getAttribute(INDEXER_PROBLEMS_VALUE));
child = child.getNextSibling();
if (descriptor != null) {
Node child = descriptor.getProjectData(CDT_INDEXER).getFirstChild();
while (child != null) {
if (child.getNodeName().equals(INDEXER_PROBLEMS_ENABLED))
strBool = Boolean.valueOf(((Element)child).getAttribute(INDEXER_PROBLEMS_VALUE));
child = child.getNextSibling();
}
}
return strBool;