19 package org.sleuthkit.autopsy.datamodel.hosts;
21 import java.awt.event.ActionEvent;
22 import java.util.Collections;
23 import java.util.List;
24 import java.util.logging.Level;
25 import javax.swing.AbstractAction;
26 import javax.swing.JMenu;
27 import javax.swing.JMenuItem;
28 import javax.swing.JSeparator;
29 import org.openide.util.NbBundle.Messages;
30 import org.openide.util.actions.Presenter;
44 "AssociatePersonsMenuAction_menuTitle=Associate with Person",})
62 @SuppressWarnings(
"NoopMethodInAbstractClass")
63 public
void actionPerformed(ActionEvent event) {
68 JMenu menu =
new JMenu(Bundle.AssociatePersonsMenuAction_menuTitle());
70 List<Person> existingPersons = Collections.emptyList();
74 logger.log(Level.WARNING,
"Error getting persons for case.", ex);
77 existingPersons.stream()
78 .filter(p -> p != null && p.getName() != null)
79 .sorted((a, b) -> a.getName().compareToIgnoreCase(b.getName()))
83 if (menu.getItemCount() > 0) {
84 menu.add(
new JSeparator());
SleuthkitCase getSleuthkitCase()
synchronized static Logger getLogger(String name)
static Case getCurrentCaseThrows()