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 org.openide.util.NbBundle.Messages;
29 import org.openide.util.actions.Presenter;
41 "MergeHostMenuAction_menuTitle=Merge Into Other Host",})
55 this.sourceHost = host;
59 @SuppressWarnings(
"NoopMethodInAbstractClass")
60 public
void actionPerformed(ActionEvent event) {
65 JMenu menu =
new JMenu(Bundle.MergeHostMenuAction_menuTitle());
68 List<Host> otherHosts = Collections.emptyList();
71 otherHosts.remove(sourceHost);
73 logger.log(Level.WARNING,
"Error getting hosts for case.", ex);
78 if (otherHosts.isEmpty()) {
79 menu.setEnabled(
false);
81 menu.setEnabled(
true);
83 .filter(p -> p != null && p.getName() != null)
84 .sorted((a, b) -> a.getName().compareToIgnoreCase(b.getName()))
SleuthkitCase getSleuthkitCase()
synchronized static Logger getLogger(String name)
static Case getCurrentCaseThrows()