19 package org.sleuthkit.autopsy.actions;
21 import java.awt.event.ActionEvent;
22 import java.awt.event.ActionListener;
23 import java.awt.Desktop;
25 import java.io.IOException;
26 import java.util.logging.Level;
27 import javax.swing.JOptionPane;
28 import org.openide.DialogDisplayer;
29 import org.openide.NotifyDescriptor;
30 import org.openide.awt.ActionID;
31 import org.openide.awt.ActionReference;
32 import org.openide.awt.ActionRegistration;
33 import org.openide.util.NbBundle;
41 displayName =
"#CTL_OpenOutputFolder", iconInMenu =
true)
42 @ActionReference(path =
"Menu/Help", position = 1850)
43 @ActionID(
id =
"org.sleuthkit.autopsy.actions.OpenOutputFolderAction", category =
"Help")
55 if (outputDir.exists() ==
false) {
57 =
new NotifyDescriptor.Message(NbBundle.getMessage(
this.getClass(),
58 "OpenOutputFolder.error1", outputDir.getAbsolutePath()),
59 NotifyDescriptor.ERROR_MESSAGE);
60 DialogDisplayer.getDefault().notify(d);
62 Desktop.getDesktop().open(outputDir);
65 JOptionPane.showMessageDialog(null, NbBundle.getMessage(
this.getClass(),
"OpenOutputFolder.noCaseOpen"));
67 }
catch (IOException ex) {
68 logger.log(Level.WARNING, NbBundle.getMessage(
this.getClass(),
"OpenOutputFolder.CouldNotOpenOutputFolder"), ex);
void actionPerformed(ActionEvent e)
String getOutputDirectory()
static Case getCurrentCase()
synchronized static Logger getLogger(String name)
static boolean isCaseOpen()