mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Minor code simplification.
This commit is contained in:
parent
26acd7fa6a
commit
71d5459a41
1 changed files with 8 additions and 9 deletions
|
@ -640,23 +640,22 @@ public class PDOMFile implements IIndexFragmentFile {
|
||||||
return result.toArray(new IIndexName[result.size()]);
|
return result.toArray(new IIndexName[result.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PDOMFile findFile(PDOMLinkage linkage, BTree btree, IIndexFileLocation location, IIndexLocationConverter strategy)
|
public static PDOMFile findFile(PDOMLinkage linkage, BTree btree, IIndexFileLocation location,
|
||||||
throws CoreException {
|
IIndexLocationConverter strategy) throws CoreException {
|
||||||
String internalRepresentation= strategy.toInternalFormat(location);
|
String internalRepresentation= strategy.toInternalFormat(location);
|
||||||
long record= 0;
|
|
||||||
if (internalRepresentation != null) {
|
if (internalRepresentation != null) {
|
||||||
Finder finder = new Finder(linkage.getDB(), internalRepresentation, linkage.getLinkageID());
|
Finder finder = new Finder(linkage.getDB(), internalRepresentation, linkage.getLinkageID());
|
||||||
btree.accept(finder);
|
btree.accept(finder);
|
||||||
record= finder.getRecord();
|
long record= finder.getRecord();
|
||||||
}
|
if (record != 0) {
|
||||||
if (record != 0) {
|
return new PDOMFile(linkage, record);
|
||||||
return new PDOMFile(linkage, record);
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IIndexFragmentFile[] findFiles(PDOM pdom, BTree btree, IIndexFileLocation location, IIndexLocationConverter strategy)
|
public static IIndexFragmentFile[] findFiles(PDOM pdom, BTree btree, IIndexFileLocation location,
|
||||||
throws CoreException {
|
IIndexLocationConverter strategy) throws CoreException {
|
||||||
String internalRepresentation= strategy.toInternalFormat(location);
|
String internalRepresentation= strategy.toInternalFormat(location);
|
||||||
if (internalRepresentation != null) {
|
if (internalRepresentation != null) {
|
||||||
Finder finder = new Finder(pdom.getDB(), internalRepresentation, -1);
|
Finder finder = new Finder(pdom.getDB(), internalRepresentation, -1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue