Skip to content

Commit

Permalink
UICompleter.getCompletion should return Iterable<VALUE_TYPE> instead …
Browse files Browse the repository at this point in the history
…of Iterable<String>
  • Loading branch information
gastaldi committed Aug 22, 2013
1 parent 0e5b2d4 commit c298d8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ public void complete(CompleteOperation completeOperation, InputComponent<?, Obje
UICompleter<Object> completer = InputComponents.getCompleterFor(input);
if (completer != null)
{
for (String proposal : completer.getCompletionProposals(context, input, typedValue))
for (Object proposal : completer.getCompletionProposals(context, input, typedValue))
{
completeOperation.addCompletionCandidate(proposal);
if (proposal != null)
{
completeOperation.addCompletionCandidate(proposal.toString());
}
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ public interface UICompleter<VALUETYPE>
* @param value The user input value requiring completion, or null, if no value yet exists. These values will undergo
* conversion to fit the type required by the corresponding {@link UIInput}.
*/
Iterable<String> getCompletionProposals(UIContext context, InputComponent<?, VALUETYPE> input, String value);
Iterable<VALUETYPE> getCompletionProposals(UIContext context, InputComponent<?, VALUETYPE> input, String value);
}

0 comments on commit c298d8c

Please sign in to comment.