mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
2005-03-18 Alain Magloire
Move more code in the try/finally as a precaution. Bad things where happening (i.e. NPE) but the monitor was not decremented * index/org/eclipse/cdt/internal/core/indexing/IndexManager.java
This commit is contained in:
parent
6f3bf0d981
commit
1575e7878e
2 changed files with 30 additions and 24 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-03-18 Alain Magloire
|
||||
Move more code in the try/finally as a precaution. Bad things
|
||||
where happening (i.e. NPE) but the monitor was not decremented
|
||||
* index/org/eclipse/cdt/internal/core/indexing/IndexManager.java
|
||||
|
||||
2005-03-15 Bogdan Gheorghe
|
||||
Added a check for closed projects to update code
|
||||
|
||||
|
|
|
@ -415,31 +415,32 @@ public class IndexManager extends JobManager{
|
|||
//this point
|
||||
ICDTIndexer indexer = null;
|
||||
indexer = (ICDTIndexer) indexerMap.get(project);
|
||||
try {
|
||||
if (indexer == null){
|
||||
String indexerID = null;
|
||||
try {
|
||||
//Indexer has not been created yet for this session
|
||||
//Check to see if the indexer has been set in a session property
|
||||
indexerID = (String) project.getSessionProperty(indexerIDKey);
|
||||
} catch (CoreException e) {}
|
||||
|
||||
if (indexer == null){
|
||||
String indexerID = null;
|
||||
try {
|
||||
//Indexer has not been created yet for this session
|
||||
//Check to see if the indexer has been set in a session property
|
||||
indexerID = (String) project.getSessionProperty(indexerIDKey);
|
||||
} catch (CoreException e) {}
|
||||
//Project was either closed at startup or imported
|
||||
if (indexerID == null &&
|
||||
project.isAccessible()){
|
||||
try {
|
||||
indexer=initializeIndexer(project);
|
||||
} catch (CoreException e1) {}
|
||||
}
|
||||
else{
|
||||
//Create the indexer and store it
|
||||
indexer = getIndexer(indexerID);
|
||||
}
|
||||
|
||||
//Project was either closed at startup or imported
|
||||
if (indexerID == null &&
|
||||
project.isAccessible()){
|
||||
try {
|
||||
indexer=initializeIndexer(project);
|
||||
} catch (CoreException e1) {}
|
||||
//Make sure we're not putting null in map
|
||||
if (indexer != null)
|
||||
indexerMap.put(project,indexer);
|
||||
}
|
||||
else{
|
||||
//Create the indexer and store it
|
||||
indexer = getIndexer(indexerID);
|
||||
}
|
||||
|
||||
//Make sure we're not putting null in map
|
||||
if (indexer != null)
|
||||
indexerMap.put(project,indexer);
|
||||
|
||||
} finally {
|
||||
monitor.exitRead();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue