mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-21 16:05:25 +02:00
Cosmetics.
This commit is contained in:
parent
89ae641793
commit
15da05324a
2 changed files with 13 additions and 15 deletions
|
@ -29,16 +29,15 @@ import org.eclipse.core.runtime.OperationCanceledException;
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
public class NamedNodeCollector implements IBTreeVisitor, IPDOMVisitor {
|
public class NamedNodeCollector implements IBTreeVisitor, IPDOMVisitor {
|
||||||
|
|
||||||
private final PDOMLinkage linkage;
|
private final PDOMLinkage linkage;
|
||||||
private final char[] matchChars;
|
private final char[] matchChars;
|
||||||
private final boolean prefixLookup;
|
private final boolean prefixLookup;
|
||||||
private final IContentAssistMatcher contentAssistMatcher;
|
private final IContentAssistMatcher contentAssistMatcher;
|
||||||
private final boolean caseSensitive;
|
private final boolean caseSensitive;
|
||||||
private IProgressMonitor monitor= null;
|
private IProgressMonitor monitor;
|
||||||
private int monitorCheckCounter= 0;
|
private int monitorCheckCounter;
|
||||||
|
|
||||||
private List<PDOMNamedNode> nodes = new ArrayList<PDOMNamedNode>();
|
private List<PDOMNamedNode> nodes = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collects all nodes with given name.
|
* Collects all nodes with given name.
|
||||||
|
@ -99,14 +98,13 @@ public class NamedNodeCollector implements IBTreeVisitor, IPDOMVisitor {
|
||||||
int cmp;
|
int cmp;
|
||||||
if (prefixLookup) {
|
if (prefixLookup) {
|
||||||
cmp= rhsName.comparePrefix(matchChars, false);
|
cmp= rhsName.comparePrefix(matchChars, false);
|
||||||
if(caseSensitive) {
|
if (caseSensitive) {
|
||||||
cmp= cmp==0 ? rhsName.comparePrefix(matchChars, true) : cmp;
|
cmp= cmp == 0 ? rhsName.comparePrefix(matchChars, true) : cmp;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(caseSensitive) {
|
if (caseSensitive) {
|
||||||
cmp= rhsName.compareCompatibleWithIgnoreCase(matchChars);
|
cmp= rhsName.compareCompatibleWithIgnoreCase(matchChars);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
cmp= rhsName.compare(matchChars, false);
|
cmp= rhsName.compare(matchChars, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue