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 org.openide.DialogDisplayer;
27 import org.openide.NotifyDescriptor;
28 import org.openide.awt.ActionID;
29 import org.openide.awt.ActionReference;
30 import org.openide.awt.ActionRegistration;
31 import org.openide.modules.Places;
32 import org.openide.util.Exceptions;
33 import org.openide.util.NbBundle;
41 displayName =
"#CTL_OpenLogFolder", iconInMenu =
true)
42 @ActionReference(path =
"Menu/Help", position = 1750)
43 @ActionID(
id =
"org.sleuthkit.autopsy.actions.OpenLogFolderAction", category =
"Help")
54 logDir =
new File(Places.getUserDirectory().getAbsolutePath() + File.separator +
"var" + File.separator +
"log");
56 if (logDir.exists() ==
false) {
58 new NotifyDescriptor.Message(
59 NbBundle.getMessage(
this.getClass(),
"OpenLogFolder.error1", logDir.getAbsolutePath()),
60 NotifyDescriptor.ERROR_MESSAGE);
61 DialogDisplayer.getDefault().notify(d);
63 Desktop.getDesktop().open(logDir);
65 }
catch (IOException ex) {
66 Exceptions.printStackTrace(ex);
String getLogDirectoryPath()
static Case getCurrentCase()
void actionPerformed(ActionEvent e)
static boolean isCaseOpen()