void (List<? extends VirtualFile> selection) { for (VirtualFile file : selection) { if (file.isDirectory()) { myPathTextField.getField().setText(VfsUtil.getReadableUrl(file)); } else { myFileName.setText(file.getName()); final VirtualFile parent = file.getParent(); if (parent != null) { myPathTextField.getField().setText(VfsUtil.getReadableUrl(parent)); } } } updateOkButton(); }