mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 04:15:35 +02:00
Removed uses of a deprecated method.
This commit is contained in:
parent
76acf33601
commit
6f839b7011
2 changed files with 6 additions and 9 deletions
|
@ -72,7 +72,7 @@ public class FilesOnReindexTests extends PDOMTestBase {
|
||||||
|
|
||||||
void performAssertions(IFile file) throws CoreException {
|
void performAssertions(IFile file) throws CoreException {
|
||||||
IIndex index = CCorePlugin.getIndexManager().getIndex(project);
|
IIndex index = CCorePlugin.getIndexManager().getIndex(project);
|
||||||
assertNotNull(index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file)));
|
assertTrue(index.getFiles(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file)).length != 0);
|
||||||
|
|
||||||
IBinding[] bs = index.findBindings(Pattern.compile("C"), true, IndexFilter.ALL, new NullProgressMonitor());
|
IBinding[] bs = index.findBindings(Pattern.compile("C"), true, IndexFilter.ALL, new NullProgressMonitor());
|
||||||
assertEquals(1, bs.length);
|
assertEquals(1, bs.length);
|
||||||
|
|
|
@ -43,7 +43,6 @@ import org.eclipse.ui.WorkbenchException;
|
||||||
import org.eclipse.ui.handlers.IHandlerService;
|
import org.eclipse.ui.handlers.IHandlerService;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.dom.ILinkage;
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||||
import org.eclipse.cdt.core.index.IIndex;
|
import org.eclipse.cdt.core.index.IIndex;
|
||||||
import org.eclipse.cdt.core.index.IIndexFile;
|
import org.eclipse.cdt.core.index.IIndexFile;
|
||||||
|
@ -133,13 +132,11 @@ public class BaseUITestCase extends BaseTestCase {
|
||||||
continue;
|
continue;
|
||||||
index.acquireReadLock();
|
index.acquireReadLock();
|
||||||
try {
|
try {
|
||||||
IIndexFile pfile= index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
|
IIndexFile[] indexFiles= index.getFiles(IndexLocationFactory.getWorkspaceIFL(file));
|
||||||
if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
|
for (IIndexFile indexFile : indexFiles) {
|
||||||
return;
|
if (indexFile != null && indexFile.getTimestamp() >= file.getLocalTimeStamp()) {
|
||||||
}
|
return;
|
||||||
pfile= index.getFile(ILinkage.C_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
|
}
|
||||||
if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
index.releaseReadLock();
|
index.releaseReadLock();
|
||||||
|
|
Loading…
Add table
Reference in a new issue