public void saveWordlistToFile(File file) { if (file.getAbsolutePath().indexOf(".txt") == -1) { file = new File(file.getAbsolutePath() + ".txt"); } if (WordlistModel.saveToFile(file, this.listModel)) { this.mainView.showInfomessage("Wörterliste erfolgreich gespeichert"); } else { this.mainView.showInfomessage("Wörterliste konnte nicht gespeichert werden"); } }