Skip to content

Commit

Permalink
Merge pull request #191 from Derekljh/master
Browse files Browse the repository at this point in the history
Add Citations
  • Loading branch information
Derekljh authored Apr 29, 2024
2 parents 78f46bd + 8585118 commit bc72b87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public CommandResult execute(Model model, CommandHistory history) throws Command
}

private void openMailApp(String emailList) throws URISyntaxException, IOException {
// Cited from: https://stackoverflow.com/questions/2357895/java-open-default-mail-application-and-create-new-mail-and-populate-to-and-subj
Desktop desktop;
if (Desktop.isDesktopSupported()
&& (desktop = Desktop.getDesktop()).isSupported(Desktop.Action.MAIL)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public CommandResult execute(Model model, CommandHistory history) throws Command
String phoneList = model.getFilteredPersonList().stream()
.map(person -> person.getPhone().toString())
.collect(Collectors.joining(","));

// Cited from: https://stackoverflow.com/questions/6710350/copying-text-to-the-clipboard-using-java
StringSelection stringSelection = new StringSelection(phoneList);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(stringSelection, null);
Expand Down

0 comments on commit bc72b87

Please sign in to comment.