List of usage examples for org.springframework.ide.eclipse.boot.wizard MultiSelectionFieldModel getChoices
@SuppressWarnings("unchecked") public synchronized T[] getChoices()
From source file:org.springframework.ide.eclipse.boot.wizard.NewSpringBootWizardModel.java
/** * Convenience method for easier scripting of the wizard model (used in testing). Not used * by the UI itself. If the dependencyId isn't found in the wizard model then an IllegalArgumentException * will be raised.//ww w. j a v a 2s . c o m */ public void addDependency(String dependencyId) { for (String catName : dependencies.getCategories()) { MultiSelectionFieldModel<Dependency> cat = dependencies.getContents(catName); for (Dependency dep : cat.getChoices()) { if (dependencyId.equals(dep.getId())) { cat.select(dep); return; //dep found and added to selection } } } throw new IllegalArgumentException("No such dependency: " + dependencyId); }