mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Added token counts to debug message in content assist.
This commit is contained in:
parent
e832d582ff
commit
b829c4ed8e
3 changed files with 14 additions and 3 deletions
|
@ -33,6 +33,9 @@ public class ASTCompletionNode {
|
|||
|
||||
private IASTTranslationUnit translationUnit;
|
||||
|
||||
// used for debug
|
||||
public int count;
|
||||
|
||||
/**
|
||||
* Only constructor.
|
||||
*
|
||||
|
|
|
@ -212,7 +212,10 @@ public class InternalASTServiceProvider implements IASTServiceProvider {
|
|||
|
||||
// Run the parse and return the completion node
|
||||
parser.parse();
|
||||
return parser.getCompletionNode();
|
||||
ASTCompletionNode node = parser.getCompletionNode();
|
||||
if (node != null)
|
||||
node.count = scanner.getCount();
|
||||
return node;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -121,12 +121,17 @@ public class CCompletionProcessor2 implements IContentAssistProcessor {
|
|||
|
||||
if (CUIPlugin.getDefault().getPreferenceStore().getBoolean(ContentAssistPreference.TIME_DOM)) {
|
||||
long propTime = System.currentTimeMillis();
|
||||
System.out.println("Completion Parse: " + (stopTime - startTime) + " + Proposals: " //$NON-NLS-1$ //$NON-NLS-2$
|
||||
System.out.print("Completion Parse: " + (stopTime - startTime) + " + Proposals: " //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ (propTime - stopTime));
|
||||
if (completionNode != null)
|
||||
System.out.print(" - tokens: " + completionNode.count);
|
||||
else
|
||||
System.out.print(" - no completion node");
|
||||
System.out.println();
|
||||
System.out.flush();
|
||||
}
|
||||
|
||||
return propsArray;
|
||||
return propsArray;
|
||||
|
||||
} catch (UnsupportedDialectException e) {
|
||||
errorMessage = "Unsupported Dialect Exception";
|
||||
|
|
Loading…
Add table
Reference in a new issue