mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
64d21644a9
commit
71ea7fe4f8
2 changed files with 4 additions and 7 deletions
|
@ -58,14 +58,14 @@ public interface IWritableIndexFragment extends IIndexFragment {
|
||||||
* Acquires a write lock, while giving up a certain amount of read locks.
|
* Acquires a write lock, while giving up a certain amount of read locks.
|
||||||
*/
|
*/
|
||||||
void acquireWriteLock(int giveupReadLockCount) throws InterruptedException;
|
void acquireWriteLock(int giveupReadLockCount) throws InterruptedException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Releases a write lock, reestablishing a certain amount of read locks.
|
* Releases a write lock, reestablishing a certain amount of read locks.
|
||||||
* @param establishReadLockCount amount of read-locks to establish
|
* @param establishReadLockCount amount of read-locks to establish
|
||||||
* @param flush if <code>true</code> changes are flushed to disk
|
* @param flush if <code>true</code> changes are flushed to disk
|
||||||
*/
|
*/
|
||||||
void releaseWriteLock(int establishReadLockCount, boolean flush);
|
void releaseWriteLock(int establishReadLockCount, boolean flush);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the key, value mapping to the fragment properties. If a mapping for the
|
* Write the key, value mapping to the fragment properties. If a mapping for the
|
||||||
* same key already exists, it is overwritten.
|
* same key already exists, it is overwritten.
|
||||||
|
|
|
@ -61,12 +61,10 @@ public class WritableCIndex extends CIndex implements IWritableIndex {
|
||||||
public void setFileContent(IIndexFragmentFile file, int linkageID,
|
public void setFileContent(IIndexFragmentFile file, int linkageID,
|
||||||
IncludeInformation[] includes,
|
IncludeInformation[] includes,
|
||||||
IASTPreprocessorStatement[] macros, IASTName[][] names, ASTFilePathResolver resolver) throws CoreException {
|
IASTPreprocessorStatement[] macros, IASTName[][] names, ASTFilePathResolver resolver) throws CoreException {
|
||||||
|
|
||||||
IIndexFragment indexFragment = file.getIndexFragment();
|
IIndexFragment indexFragment = file.getIndexFragment();
|
||||||
if (!isWritableFragment(indexFragment)) {
|
if (!isWritableFragment(indexFragment)) {
|
||||||
assert false : "Attempt to update file of read-only fragment"; //$NON-NLS-1$
|
assert false : "Attempt to update file of read-only fragment"; //$NON-NLS-1$
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
for (IncludeInformation ii : includes) {
|
for (IncludeInformation ii : includes) {
|
||||||
if (ii.fLocation != null) {
|
if (ii.fLocation != null) {
|
||||||
ii.fTargetFile= addFile(linkageID, ii.fLocation);
|
ii.fTargetFile= addFile(linkageID, ii.fLocation);
|
||||||
|
@ -89,8 +87,7 @@ public class WritableCIndex extends CIndex implements IWritableIndex {
|
||||||
IIndexFragment indexFragment = file.getIndexFragment();
|
IIndexFragment indexFragment = file.getIndexFragment();
|
||||||
if (!isWritableFragment(indexFragment)) {
|
if (!isWritableFragment(indexFragment)) {
|
||||||
assert false : "Attempt to clear file of read-only fragment"; //$NON-NLS-1$
|
assert false : "Attempt to clear file of read-only fragment"; //$NON-NLS-1$
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
((IWritableIndexFragment) indexFragment).clearFile(file, clearedContexts);
|
((IWritableIndexFragment) indexFragment).clearFile(file, clearedContexts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue