private Button populateButton(final ListView<String> listView) {
        final Button button = new Button("Populate", FontAwesome.DATABASE.view());

        button.setOnAction(e -> {
            final Column col = column.getMappedColumn();

            final DbmsProperty dbms = ancestor(col, DbmsProperty.class).get();
            final String dbmsName   = dbms.getName();
            final String schemaName = ancestor(col, Schema.class).get().getName();
            final String tableName  = col.getParentOrThrow().getName();
            final String columnName = col.getName();

            final ProgressMeasure progress = ProgressMeasure.create();

            if (!passwords.get(dbmsName).isPresent()) {
                ui.showPasswordDialog(dbms);
            }

            final char[] password = passwords.get(dbmsName).orElseThrow(() ->
                new SpeedmentToolException(
                    "A password is required to populate enum constants field!"
                )
            );

            final CompletableFuture<Boolean> task = supplyAsync(() -> {
                try {
                    // Hack to create a Manager for reading a single column from
                    // the database.
                    LOGGER.info("Creating Temporary Speedment...");

                    progress.setProgress(0.2);
                    final Injector inj = injector.newBuilder()
                        .withComponent(TempApplicationMetadata.class)
                        .withComponent(SqlStreamSupplierComponentImpl.class)
                        .withParam("temp.json", Json.toJson(dbms.getParentOrThrow().getData()))
                        .withParam("temp.dbms", dbmsName)
                        .withParam("temp.schema", schemaName)
                        .withParam("temp.table", tableName)
                        .withParam("temp.column", columnName)
                        .withComponent(SingleColumnManager.class)
                        .withComponent(SingleColumnSqlAdapter.class)
                        .beforeInitialized(PasswordComponent.class, passw -> {
                            LOGGER.info("Installing Password...");
                            passw.put(dbmsName, password);
                        })
                        .build();

                    LOGGER.info("Temporary Speedment built. Streaming...");

                    progress.setProgress(0.4);
                    final String constants =
                        inj.getOrThrow(SingleColumnManager.class).stream()
                            .distinct().sorted()
                            .collect(joining(","));

                    LOGGER.info("Streaming complete!");

                    // Run in UI thread:
                    runLater(() -> {
                        column.enumConstantsProperty().setValue(constants);
                        setValue(constants);
                        progress.setProgress(1.0);
                    });

                    return true;
                } catch (final InstantiationException ex) {
                    LOGGER.error(ex);
                    return false;
                }
            }).handleAsync((res, ex) -> {
                if (ex != null) {
                    LOGGER.error(ex);
                    return false;
                }

                progress.setProgress(1.0);
                return true;
            });

            ui.showProgressDialog("Populating Enum Constants", progress, task);
        });

        return button;
    }
Removes any empty substrings and makes sure the entire string is either
{@code null} or non-empty.

@return  the formatted string
plugin-parent/enum-generator/src/main/java/com/speedment/plugins/enums/internal/ui/AddRemoveStringItem.java