mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 12:45:41 +02:00
Cosmetics.
This commit is contained in:
parent
6b6920a6d4
commit
15ef53b2b7
1 changed files with 16 additions and 23 deletions
|
@ -167,7 +167,6 @@ public class PDOMManager implements IWritableIndexManager, IListener {
|
||||||
private IndexFactory fIndexFactory= new IndexFactory(this);
|
private IndexFactory fIndexFactory= new IndexFactory(this);
|
||||||
private IndexProviderManager fIndexProviderManager = new IndexProviderManager();
|
private IndexProviderManager fIndexProviderManager = new IndexProviderManager();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serializes creation of new indexer, when acquiring the lock you are
|
* Serializes creation of new indexer, when acquiring the lock you are
|
||||||
* not allowed to hold a lock on fPDOMs.
|
* not allowed to hold a lock on fPDOMs.
|
||||||
|
@ -341,8 +340,7 @@ public class PDOMManager implements IWritableIndexManager, IListener {
|
||||||
if (!dbFile.exists()) {
|
if (!dbFile.exists()) {
|
||||||
dbFile= null;
|
dbFile= null;
|
||||||
dbName= null;
|
dbName= null;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
ICProject currentCOwner= fFileToProject.get(dbFile);
|
ICProject currentCOwner= fFileToProject.get(dbFile);
|
||||||
if (currentCOwner != null) {
|
if (currentCOwner != null) {
|
||||||
IProject currentOwner= currentCOwner.getProject();
|
IProject currentOwner= currentCOwner.getProject();
|
||||||
|
@ -373,8 +371,7 @@ public class PDOMManager implements IWritableIndexManager, IListener {
|
||||||
}
|
}
|
||||||
if (fromScratch) {
|
if (fromScratch) {
|
||||||
pdom.setCreatedFromScratch(true);
|
pdom.setCreatedFromScratch(true);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
pdom.clear();
|
pdom.clear();
|
||||||
pdom.setClearedBecauseOfVersionMismatch(true);
|
pdom.setClearedBecauseOfVersionMismatch(true);
|
||||||
}
|
}
|
||||||
|
@ -444,14 +441,12 @@ public class PDOMManager implements IWritableIndexManager, IListener {
|
||||||
protected void onPreferenceChange(ICProject cproject, PreferenceChangeEvent event) {
|
protected void onPreferenceChange(ICProject cproject, PreferenceChangeEvent event) {
|
||||||
if (IndexerPreferences.KEY_UPDATE_POLICY.equals(event.getKey())) {
|
if (IndexerPreferences.KEY_UPDATE_POLICY.equals(event.getKey())) {
|
||||||
changeUpdatePolicy(cproject);
|
changeUpdatePolicy(cproject);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
IProject project= cproject.getProject();
|
IProject project= cproject.getProject();
|
||||||
if (project.exists() && project.isOpen()) {
|
if (project.exists() && project.isOpen()) {
|
||||||
try {
|
try {
|
||||||
changeIndexer(cproject);
|
changeIndexer(cproject);
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e) {
|
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1093,8 +1088,7 @@ public class PDOMManager implements IWritableIndexManager, IListener {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(waitMaxMillis);
|
Thread.sleep(waitMaxMillis);
|
||||||
monitor.setCanceled(true);
|
monitor.setCanceled(true);
|
||||||
}
|
} catch (InterruptedException e) {
|
||||||
catch (InterruptedException e) {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1347,8 +1341,7 @@ public class PDOMManager implements IWritableIndexManager, IListener {
|
||||||
ICElement other= set.get(j);
|
ICElement other= set.get(j);
|
||||||
if (contains(other, element)) {
|
if (contains(other, element)) {
|
||||||
continue allElements;
|
continue allElements;
|
||||||
}
|
} else if (contains(element, other)) {
|
||||||
else if (contains(element, other)) {
|
|
||||||
set.set(j, element);
|
set.set(j, element);
|
||||||
continue allElements;
|
continue allElements;
|
||||||
}
|
}
|
||||||
|
@ -1491,8 +1484,8 @@ public class PDOMManager implements IWritableIndexManager, IListener {
|
||||||
} finally {
|
} finally {
|
||||||
index.releaseReadLock();
|
index.releaseReadLock();
|
||||||
}
|
}
|
||||||
} catch(InterruptedException ie) {
|
} catch (InterruptedException e) {
|
||||||
CCorePlugin.log(ie);
|
CCorePlugin.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue