19 package org.sleuthkit.autopsy.casemodule;
21 import java.util.Collection;
22 import java.util.Iterator;
23 import java.util.logging.Level;
24 import org.netbeans.spi.sendopts.OptionProcessor;
25 import org.openide.util.Lookup;
48 if (instance == null) {
50 if (instance == null) {
61 if (startupWindowToUse == null) {
66 if(defaultArg != null) {
71 logger.log(Level.INFO,
"Running from command line");
80 Collection<? extends StartupWindowInterface> startupWindows
83 int windowsCount = startupWindows.size();
84 if (windowsCount == 1) {
85 startupWindowToUse = startupWindows.iterator().next();
86 logger.log(Level.INFO,
"Will use the default startup window: " + startupWindowToUse.toString());
87 }
else if (windowsCount == 2) {
89 Iterator<? extends StartupWindowInterface> it = startupWindows.iterator();
90 while (it.hasNext()) {
93 startupWindowToUse = window;
94 logger.log(Level.INFO,
"Will use the custom startup window: " + startupWindowToUse.toString());
100 Iterator<? extends StartupWindowInterface> it = startupWindows.iterator();
101 while (it.hasNext()) {
103 if (!window.getClass().getCanonicalName().startsWith(
"org.sleuthkit.autopsy")) {
104 startupWindowToUse = window;
105 logger.log(Level.INFO,
"Will use the custom startup window: " + startupWindowToUse.toString());
111 if (startupWindowToUse == null) {
112 logger.log(Level.SEVERE,
"Unexpected error, no startup window chosen, using the default");
129 if(processor != null) {
142 if(processor != null) {
150 if (startupWindowToUse != null) {
151 startupWindowToUse.
open();
157 if (startupWindowToUse != null) {
158 startupWindowToUse.
close();
StartupWindowInterface getStartupWindow()
static volatile StartupWindowProvider instance
String getDefaultArgument()
boolean isRunFromCommandLine()
boolean isRunningFromCommandLine()
String getDefaultArgument()
volatile StartupWindowInterface startupWindowToUse
synchronized static Logger getLogger(String name)
static StartupWindowProvider getInstance()
static final Logger logger