Skip to content

Commit

Permalink
Remove Input prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
lincolnthree committed Jan 22, 2013
1 parent 1577c00 commit ae68716
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @param VALUETYPE The value type to be provided by completion.
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
*/
public interface UIInputCompleter<VALUETYPE>
public interface UICompleter<VALUETYPE>
{
// FIXME this needs to be thought out, before or after validation?
// Should this take a String or the actual VALUETYPE instead?
Expand Down
4 changes: 2 additions & 2 deletions ui/api/src/main/java/org/jboss/forge/ui/UIInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@Exported
public interface UIInput<T>
{
UIInputCompleter<T> getCompleter();
UICompleter<T> getCompleter();

String getLabel();

Expand All @@ -30,7 +30,7 @@ public interface UIInput<T>

boolean isRequired();

UIInput<T> setCompleter(UIInputCompleter<T> completer);
UIInput<T> setCompleter(UICompleter<T> completer);

UIInput<T> setDefaultValue(T value);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
import java.util.ArrayList;
import java.util.List;

import org.jboss.forge.ui.UIInputCompleter;
import org.jboss.forge.ui.UICompleter;

/**
* A {@link UIInputCompleter} that always returns zero proposals.
* A {@link UICompleter} that always returns zero proposals.
*
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
*/
@SuppressWarnings("rawtypes")
public class NoopCompleter implements UIInputCompleter
public class NoopCompleter implements UICompleter
{
@Override
public List getCompletionProposals(String value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import javax.enterprise.inject.Vetoed;

import org.jboss.forge.ui.UIInput;
import org.jboss.forge.ui.UIInputCompleter;
import org.jboss.forge.ui.UICompleter;
import org.jboss.forge.ui.UIMetadata;
import org.jboss.forge.ui.util.Callables;

Expand All @@ -35,7 +35,7 @@ public class UIInputImpl<T> implements UIInput<T>
private Callable<Boolean> required;
private Callable<T> defaultValue;
private UIMetadata metadata = new UIMetadataImpl();
private UIInputCompleter<T> completer;
private UICompleter<T> completer;

public UIInputImpl(String name, Class<T> type)
{
Expand All @@ -45,7 +45,7 @@ public UIInputImpl(String name, Class<T> type)

@Override
@SuppressWarnings("unchecked")
public UIInputCompleter<T> getCompleter()
public UICompleter<T> getCompleter()
{
return this.completer == null ? new NoopCompleter() : this.completer;
}
Expand Down Expand Up @@ -93,7 +93,7 @@ public boolean isRequired()
}

@Override
public UIInput<T> setCompleter(UIInputCompleter<T> completer)
public UIInput<T> setCompleter(UICompleter<T> completer)
{
this.completer = completer;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.jboss.forge.container.AddonDependency;
import org.jboss.forge.container.AddonId;
import org.jboss.forge.ui.UIInput;
import org.jboss.forge.ui.UIInputCompleter;
import org.jboss.forge.ui.UICompleter;
import org.jboss.forge.ui.UIMetadata;
import org.jboss.forge.ui.util.Callables;
import org.jboss.shrinkwrap.api.ArchivePaths;
Expand Down Expand Up @@ -84,9 +84,9 @@ public void testDefaultValue()
@Test
public void testCompleter()
{
UIInputCompleter<String> originalCompleter = firstName.getCompleter();
UICompleter<String> originalCompleter = firstName.getCompleter();
Assert.assertNotNull(originalCompleter);
Assert.assertEquals(firstName, firstName.setCompleter(new UIInputCompleter<String>()
Assert.assertEquals(firstName, firstName.setCompleter(new UICompleter<String>()
{
@Override
public List<String> getCompletionProposals(String value)
Expand All @@ -109,6 +109,6 @@ public void testMetadata()
metadata.set(UIInput.class, firstName);
Assert.assertSame(firstName, firstName);
Assert.assertSame(firstName, metadata.get(UIInput.class));
Assert.assertNull(metadata.get(UIInputCompleter.class));
Assert.assertNull(metadata.get(UICompleter.class));
}
}

0 comments on commit ae68716

Please sign in to comment.