mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Fixed up the reporting of parse and resolve times for the new content assist.
This commit is contained in:
parent
cecadcc3e0
commit
d15eba065f
1 changed files with 8 additions and 3 deletions
|
@ -78,7 +78,6 @@ public class CCompletionProcessor2 implements IContentAssistProcessor {
|
|||
}
|
||||
);
|
||||
long stopTime = System.currentTimeMillis();
|
||||
System.out.println("Completion Parse: " + (stopTime - startTime) + "ms");
|
||||
|
||||
int repLength = completionNode.getLength();
|
||||
int repOffset = offset - repLength;
|
||||
|
@ -92,15 +91,21 @@ public class CCompletionProcessor2 implements IContentAssistProcessor {
|
|||
proposals.add(createBindingCompletionProposal(binding, repOffset, repLength));
|
||||
}
|
||||
|
||||
long propTime = System.currentTimeMillis();
|
||||
System.out.println("Completion Parse: " + (stopTime - startTime) + " + Resolve:"
|
||||
+ (propTime - stopTime));
|
||||
System.out.flush();
|
||||
|
||||
if (!proposals.isEmpty())
|
||||
return (ICompletionProposal[])proposals.toArray(new ICompletionProposal[proposals.size()]);
|
||||
else
|
||||
errorMessage = "No completions found";
|
||||
} catch (UnsupportedDialectException e) {
|
||||
errorMessage = "Unsupported Dialect Exception";
|
||||
} catch (Throwable e) {
|
||||
errorMessage = e.toString();
|
||||
}
|
||||
|
||||
errorMessage = "No completions found";
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue