class DoNothing implements Runnable {
        @Override
        public void run() {
        }
    }

    private void reloadViews(final File directory) {<FILL_FUNCTION_BODY>

        dirBox.setText(directory.getAbsolutePath());
        dirListBox.clearItems();
        File[] entries = directory.listFiles();
        if (entries == null) {
            return;
        }
        Arrays.sort(entries, Comparator.comparing(o -> o.getName().toLowerCase()));
        if (directory.getAbsoluteFile().getParentFile() != null) {
            dirListBox.addItem("..", () -> {
                DirectoryDialog.this.directory = directory.getAbsoluteFile().getParentFile();
                reloadViews(directory.getAbsoluteFile().getParentFile());
            });
        }
        else {
            File[] roots = File.listRoots();
            for (final File entry : roots) {
                if (entry.canRead()) {
                    dirListBox.addItem('[' + entry.getPath() + ']', () -> {
                        DirectoryDialog.this.directory = entry;
                        reloadViews(entry);
                    });
                }
            }
        }
        for (final File entry : entries) {
            if (entry.isHidden() && !showHiddenDirs) {
                continue;
            }
            if (entry.isDirectory()) {
                dirListBox.addItem(entry.getName(), () -> {
                    DirectoryDialog.this.directory = entry;
                    reloadViews(entry);
                });
            }
        }
        if (dirListBox.isEmpty()) {
            dirListBox.addItem("<empty>", new DoNothing());
        }
    
<methods>public java.lang.Object showDialog(com.googlecode.lanterna.gui2.WindowBasedTextGUI) <variables>private static final Set<com.googlecode.lanterna.gui2.Window.Hint> GLOBAL_DIALOG_HINTS