mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +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 {
|
||||
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());
|
||||
assertEquals(1, bs.length);
|
||||
|
|
|
@ -43,7 +43,6 @@ import org.eclipse.ui.WorkbenchException;
|
|||
import org.eclipse.ui.handlers.IHandlerService;
|
||||
|
||||
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.index.IIndex;
|
||||
import org.eclipse.cdt.core.index.IIndexFile;
|
||||
|
@ -133,13 +132,11 @@ public class BaseUITestCase extends BaseTestCase {
|
|||
continue;
|
||||
index.acquireReadLock();
|
||||
try {
|
||||
IIndexFile pfile= index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
|
||||
if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
|
||||
return;
|
||||
}
|
||||
pfile= index.getFile(ILinkage.C_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
|
||||
if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
|
||||
return;
|
||||
IIndexFile[] indexFiles= index.getFiles(IndexLocationFactory.getWorkspaceIFL(file));
|
||||
for (IIndexFile indexFile : indexFiles) {
|
||||
if (indexFile != null && indexFile.getTimestamp() >= file.getLocalTimeStamp()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
index.releaseReadLock();
|
||||
|
|
Loading…
Add table
Reference in a new issue