Skip to content

Commit

Permalink
UICompleter API Fix for UIInput and UIInputMany
Browse files Browse the repository at this point in the history
  • Loading branch information
lincolnthree committed Feb 6, 2013
1 parent beab608 commit f99d993
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/api/src/main/java/org/jboss/forge/ui/UICompleter.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public interface UICompleter<T>
* @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(UIInput<T> input, String value);
Iterable<String> getCompletionProposals(UIInputComponent<?, T> input, String value);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.Collections;

import org.jboss.forge.ui.UICompleter;
import org.jboss.forge.ui.UIInput;
import org.jboss.forge.ui.UIInputComponent;

/**
* A {@link UICompleter} that always returns zero proposals.
Expand All @@ -20,7 +20,7 @@
public class NoopCompleter implements UICompleter
{
@Override
public Iterable getCompletionProposals(UIInput input, String value)
public Iterable getCompletionProposals(UIInputComponent input, String value)
{
return Collections.emptyList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.jboss.forge.container.AddonId;
import org.jboss.forge.ui.UICompleter;
import org.jboss.forge.ui.UIInput;
import org.jboss.forge.ui.UIInputComponent;
import org.jboss.forge.ui.UIInputMany;
import org.jboss.forge.ui.UISelectMany;
import org.jboss.forge.ui.UISelectOne;
Expand Down Expand Up @@ -116,7 +117,7 @@ public void testCompleter()
Assert.assertEquals(firstName, firstName.setCompleter(new UICompleter<String>()
{
@Override
public Iterable<String> getCompletionProposals(UIInput<String> input, String value)
public Iterable<String> getCompletionProposals(UIInputComponent<?, String> input, String value)
{
return Arrays.asList("one", "two", "three");
}
Expand Down

0 comments on commit f99d993

Please sign in to comment.