From d15eba065f54c8a0b4b3a07ccb1d23a5df2e9c99 Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Mon, 21 Feb 2005 16:39:42 +0000 Subject: [PATCH] Fixed up the reporting of parse and resolve times for the new content assist. --- .../ui/text/contentassist/CCompletionProcessor2.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor2.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor2.java index 5224772829a..52fe396b19a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor2.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor2.java @@ -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; @@ -91,16 +90,22 @@ public class CCompletionProcessor2 implements IContentAssistProcessor { if (binding != null && !(binding instanceof IProblemBinding)) 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; }