19package org.sleuthkit.autopsy.actions;
21import java.awt.Cursor;
22import java.awt.event.ActionEvent;
23import java.awt.event.ActionListener;
24import java.util.concurrent.ExecutionException;
25import java.util.logging.Level;
26import javax.swing.SwingWorker;
27import org.openide.LifecycleManager;
28import org.openide.awt.ActionID;
29import org.openide.awt.ActionReference;
30import org.openide.awt.ActionRegistration;
31import org.openide.util.NbBundle;
32import org.openide.windows.WindowManager;
33import org.sleuthkit.autopsy.casemodule.Case;
34import org.sleuthkit.autopsy.casemodule.CaseActionException;
35import org.sleuthkit.autopsy.casemodule.StartupWindowProvider;
36import org.sleuthkit.autopsy.coreutils.Logger;
37import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
43@ActionRegistration(displayName =
"#CTL_ExitAction", iconInMenu =
true)
44@ActionReference(path =
"Menu/Case", position = 1000, separatorBefore = 999)
45@ActionID(
id =
"org.sleuthkit.autopsy.casemodule.ExitAction", category =
"Case")
51 "ExitAction.confirmationDialog.title=Ingest is Running",
52 "ExitAction.confirmationDialog.message=Ingest is running, are you sure you want to exit?",
53 "# {0} - exception message",
"ExitAction.messageBox.caseCloseExceptionMessage=Error closing case: {0}"
58 WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
59 new SwingWorker<Void, Void>() {
62 protected Void doInBackground()
throws Exception {
68 protected void done() {
71 }
catch (InterruptedException ex) {
72 logger.log(Level.SEVERE,
"Unexpected interrupt closing the current case", ex);
73 }
catch (ExecutionException ex) {
74 logger.log(Level.SEVERE,
"Error closing the current case", ex);
77 WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
78 LifecycleManager.getDefault().exit();
static final Logger logger
void actionPerformed(ActionEvent e)
static boolean checkAndConfirmProceed(String optionsDlgTitle, String optionsDlgMessage)
static void closeCurrentCase()
synchronized static Logger getLogger(String name)
static void error(String message)