// build list of entries (filter on text already entered)
JsArray<CppCompletion> filtered = JsArray.createArray().cast();
for (int i = 0; i < completions_.length(); i++)
{
CppCompletion completion = completions_.get(i);
String typedText = completion.getTypedText();
if ((userTypedText.length() == 0) ||
typedText.startsWith(userTypedText))
{
// be more picky for member scope completions because clang
// returns a bunch of noise like constructors, destructors,
// compiler generated assignments, etc.
if (completionPosition_.getScope() ==
CompletionPosition.Scope.Member)
{
if (completion.getType() == CppCompletion.VARIABLE ||
(completion.getType() == CppCompletion.FUNCTION &&
!typedText.startsWith("operator=")))
{
filtered.push(completion);
}