mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Cosmetics.
This commit is contained in:
parent
53fe2a1451
commit
6b3cb99622
1 changed files with 8 additions and 14 deletions
|
@ -437,7 +437,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
file= pdomFile;
|
file= pdomFile;
|
||||||
fEvent.setHasNewFiles();
|
fEvent.setHasNewFiles();
|
||||||
}
|
}
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void clearFileIndex() throws CoreException {
|
protected void clearFileIndex() throws CoreException {
|
||||||
|
@ -765,15 +765,13 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
private long lastReadAccess= 0;
|
private long lastReadAccess= 0;
|
||||||
private long timeWriteLockAcquired;
|
private long timeWriteLockAcquired;
|
||||||
|
|
||||||
|
|
||||||
public void acquireReadLock() throws InterruptedException {
|
public void acquireReadLock() throws InterruptedException {
|
||||||
synchronized (mutex) {
|
synchronized (mutex) {
|
||||||
++waitingReaders;
|
++waitingReaders;
|
||||||
try {
|
try {
|
||||||
while (lockCount < 0)
|
while (lockCount < 0)
|
||||||
mutex.wait();
|
mutex.wait();
|
||||||
}
|
} finally {
|
||||||
finally {
|
|
||||||
--waitingReaders;
|
--waitingReaders;
|
||||||
}
|
}
|
||||||
++lockCount;
|
++lockCount;
|
||||||
|
@ -834,8 +832,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
if (lockCount < giveupReadLocks) {
|
if (lockCount < giveupReadLocks) {
|
||||||
giveupReadLocks= lockCount;
|
giveupReadLocks= lockCount;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
giveupReadLocks= 0;
|
giveupReadLocks= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -942,8 +939,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
findNamesForMyBinding(xlangBinding, options, names);
|
findNamesForMyBinding(xlangBinding, options, names);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (myBinding instanceof PDOMMacroContainer) {
|
||||||
else if (myBinding instanceof PDOMMacroContainer) {
|
|
||||||
final PDOMMacroContainer macroContainer = (PDOMMacroContainer) myBinding;
|
final PDOMMacroContainer macroContainer = (PDOMMacroContainer) myBinding;
|
||||||
findNamesForMyBinding(macroContainer, options, names);
|
findNamesForMyBinding(macroContainer, options, names);
|
||||||
if ((options & SEARCH_ACROSS_LANGUAGE_BOUNDARIES) != 0) {
|
if ((options & SEARCH_ACROSS_LANGUAGE_BOUNDARIES) != 0) {
|
||||||
|
@ -1033,8 +1029,7 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
if (!filescope) {
|
if (!filescope) {
|
||||||
linkage.getNestedBindingsIndex().accept(visitor);
|
linkage.getNestedBindingsIndex().accept(visitor);
|
||||||
}
|
}
|
||||||
}
|
} catch (OperationCanceledException e) {
|
||||||
catch (OperationCanceledException e) {
|
|
||||||
}
|
}
|
||||||
bindings= visitor.getBindings();
|
bindings= visitor.getBindings();
|
||||||
|
|
||||||
|
@ -1116,18 +1111,17 @@ public class PDOM extends PlatformObject implements IPDOM {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (OperationCanceledException e) {
|
||||||
catch (OperationCanceledException e) {
|
|
||||||
}
|
}
|
||||||
return result.toArray(new IIndexMacro[result.size()]);
|
return result.toArray(new IIndexMacro[result.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getProperty(String propertyName) throws CoreException {
|
public String getProperty(String propertyName) throws CoreException {
|
||||||
if(IIndexFragment.PROPERTY_FRAGMENT_FORMAT_ID.equals(propertyName)) {
|
if (IIndexFragment.PROPERTY_FRAGMENT_FORMAT_ID.equals(propertyName)) {
|
||||||
return FRAGMENT_PROPERTY_VALUE_FORMAT_ID;
|
return FRAGMENT_PROPERTY_VALUE_FORMAT_ID;
|
||||||
}
|
}
|
||||||
int version = db.getVersion();
|
int version = db.getVersion();
|
||||||
if(IIndexFragment.PROPERTY_FRAGMENT_FORMAT_VERSION.equals(propertyName)) {
|
if (IIndexFragment.PROPERTY_FRAGMENT_FORMAT_VERSION.equals(propertyName)) {
|
||||||
return PDOM.versionString(version);
|
return PDOM.versionString(version);
|
||||||
}
|
}
|
||||||
// play it safe, properties are accessed before version checks.
|
// play it safe, properties are accessed before version checks.
|
||||||
|
|
Loading…
Add table
Reference in a new issue