@Override
  public void run() {
    InputComponents.setValueFor(converterFactory, input, value);

    if (valueChangeListener != null) {
      valueChangeListener.run();
    }
  }
Exemplo n.º 2
0
 @Override
 public UISelectMany<VALUETYPE> setValue(Iterable<VALUETYPE> value) {
   // assertChoicesInValueChoices(value);
   Set<ValueChangeListener> listeners = getValueChangeListeners();
   if (!listeners.isEmpty() && !InputComponents.areElementsEqual(getValue(), value)) {
     fireValueChangeListeners(value);
   }
   this.value = value;
   return this;
 }
 @Test
 public void testProjectTypeWithNoBuildSystemRequirements() throws Exception {
   File tempDir = OperatingSystemUtils.createTempDir();
   try {
     WizardCommandController wizard = testHarness.createWizardController(NewProjectWizard.class);
     wizard.initialize();
     Assert.assertFalse(wizard.canMoveToNextStep());
     wizard.setValueFor("named", "test");
     wizard.setValueFor("targetLocation", tempDir);
     wizard.setValueFor("topLevelPackage", "org.example");
     wizard.setValueFor("type", "norequirements");
     Assert.assertEquals(
         "norequirements", InputComponents.getValueFor(wizard.getInputs().get("type")).toString());
   } finally {
     tempDir.delete();
   }
 }
 protected String getInputValue() {
   Object value = InputComponents.getValueFor(input);
   return (value == null) ? null : converter.convert(value);
 }