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.
|
||||
*/
|
||||
void acquireWriteLock(int giveupReadLockCount) throws InterruptedException;
|
||||
|
||||
|
||||
/**
|
||||
* Releases a write lock, reestablishing a certain amount of read locks.
|
||||
* @param establishReadLockCount amount of read-locks to establish
|
||||
* @param flush if <code>true</code> changes are flushed to disk
|
||||
*/
|
||||
void releaseWriteLock(int establishReadLockCount, boolean flush);
|
||||
|
||||
|
||||
/**
|
||||
* Write the key, value mapping to the fragment properties. If a mapping for the
|
||||
* 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,
|
||||
IncludeInformation[] includes,
|
||||
IASTPreprocessorStatement[] macros, IASTName[][] names, ASTFilePathResolver resolver) throws CoreException {
|
||||
|
||||
IIndexFragment indexFragment = file.getIndexFragment();
|
||||
if (!isWritableFragment(indexFragment)) {
|
||||
assert false : "Attempt to update file of read-only fragment"; //$NON-NLS-1$
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
for (IncludeInformation ii : includes) {
|
||||
if (ii.fLocation != null) {
|
||||
ii.fTargetFile= addFile(linkageID, ii.fLocation);
|
||||
|
@ -89,8 +87,7 @@ public class WritableCIndex extends CIndex implements IWritableIndex {
|
|||
IIndexFragment indexFragment = file.getIndexFragment();
|
||||
if (!isWritableFragment(indexFragment)) {
|
||||
assert false : "Attempt to clear file of read-only fragment"; //$NON-NLS-1$
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
((IWritableIndexFragment) indexFragment).clearFile(file, clearedContexts);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue