GWT: hide stale suggestions.

This commit is contained in:
bjorn
2008-10-24 14:22:19 +00:00
parent d5678ee2de
commit 4cd3d6395b
2 changed files with 4 additions and 1 deletions

View File

@@ -3,5 +3,5 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/Users/bringert/src/gwt-mac-1.5.3/gwt-user.jar"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="output" path="src"/>
</classpath>

View File

@@ -60,6 +60,9 @@ public class CompletionOracle extends SuggestOracle {
// only allow a single completion request at a time
if (JSONRequest != null)
JSONRequest.cancel();
// hack: first report no completions, to hide suggestions until we get the new completions
callback.onSuggestionsReady(request, new SuggestOracle.Response(new ArrayList<CompletionSuggestion>()));
JSONRequest = pgf.complete(request.getQuery(), getInputLangs(), null, request.getLimit(),
new PGF.CompleteCallback() {