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

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

        directoryListBox.clearItems();
        fileListBox.clearItems();
        File []entries = directory.listFiles();
        if(entries == null) {
            return;
        }
        Arrays.sort(entries, Comparator.comparing(o -> o.getName().toLowerCase()));
        if (directory.getAbsoluteFile().getParentFile() !=null){
            directoryListBox.addItem("..", () -> {
                FileDialog.this.directory = directory.getAbsoluteFile().getParentFile();
                reloadViews(directory.getAbsoluteFile().getParentFile());
            });
        } else {
            File[] roots = File.listRoots();
            for (final File entry : roots) {
                if (entry.canRead()) {
                    directoryListBox.addItem('[' + entry.getPath() + ']', () -> {
                        FileDialog.this.directory = entry;
                        reloadViews(entry);
                    });
                }
            }
        }
        for(final File entry: entries) {
            if(entry.isHidden() && !showHiddenFilesAndDirs) {
                continue;
            }
            if(entry.isDirectory()) {
                directoryListBox.addItem(entry.getName(), () -> {
                    FileDialog.this.directory = entry;
                    reloadViews(entry);
                });
            }
            else {
                fileListBox.addItem(entry.getName(), () -> {
                    fileBox.setText(entry.getName());
                    setFocusedInteractable(okButton);
                });
            }
        }
        if(fileListBox.isEmpty()) {
            fileListBox.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