Go to the documentation of this file.
19package org.sleuthkit.autopsy.actions;
21import org.sleuthkit.autopsy.coreutils.Desktop;
23import java.io.IOException;
24import java.util.logging.Level;
25import javax.swing.JOptionPane;
26import org.openide.DialogDisplayer;
27import org.openide.NotifyDescriptor;
28import org.openide.awt.ActionID;
29import org.openide.awt.ActionReference;
30import org.openide.awt.ActionRegistration;
31import org.openide.util.HelpCtx;
32import org.openide.util.NbBundle;
33import org.openide.util.actions.CallableSystemAction;
34import org.openide.windows.WindowManager;
35import org.sleuthkit.autopsy.casemodule.Case;
36import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
37import org.sleuthkit.autopsy.coreutils.Logger;
48@ActionRegistration(displayName =
"#CTL_OpenOutputFolder", iconInMenu =
true, lazy =
false)
49@ActionReference(path =
"Menu/Tools", position = 1900, separatorBefore = 1899)
50@ActionID(
id =
"org.sleuthkit.autopsy.actions.OpenOutputFolderAction", category =
"Help")
62 if (outputDir.exists()) {
65 }
catch (IOException ex) {
66 logger.log(Level.SEVERE, String.format(
"Failed to open output folder %s", outputDir), ex);
67 NotifyDescriptor descriptor =
new NotifyDescriptor.Message(
68 NbBundle.getMessage(
this.getClass(),
"OpenOutputFolder.CouldNotOpenOutputFolder", outputDir.getAbsolutePath()), NotifyDescriptor.ERROR_MESSAGE);
69 DialogDisplayer.getDefault().notify(descriptor);
72 NotifyDescriptor descriptor =
new NotifyDescriptor.Message(
73 NbBundle.getMessage(
this.getClass(),
"OpenOutputFolder.error1", outputDir.getAbsolutePath()), NotifyDescriptor.ERROR_MESSAGE);
74 DialogDisplayer.getDefault().notify(descriptor);
77 logger.log(Level.SEVERE,
"OpenOutputFolderAction enabled with no current case", ex);
78 JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), NbBundle.getMessage(
this.getClass(),
"OpenOutputFolder.noCaseOpen"));
89 return HelpCtx.DEFAULT_HELP;
static final long serialVersionUID
static final Logger logger
static Case getCurrentCaseThrows()
static boolean isCaseOpen()
String getOutputDirectory()
static Desktop getDesktop()
synchronized static Logger getLogger(String name)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.