mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Merge branch 'core-corecomponentinterfaces' of ssh://repo.narfindustries.com/autopsy-jp into core-corecomponentinterfaces
This commit is contained in:
commit
cd742ec214
@ -1 +1,3 @@
|
||||
OpenIDE-Module-Name=CoreComponentInterfaces
|
||||
CoreComponentControl.CTL_DirectoryTreeTopComponent=Directory Tree
|
||||
CoreComponentControl.CTL_FavoritesTopComponent=Favorites
|
||||
|
@ -0,0 +1,3 @@
|
||||
OpenIDE-Module-Name=\u4E3B\u8981\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30A4\u30B9
|
||||
CoreComponentControl.CTL_DirectoryTreeTopComponent=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30C4\u30EA\u30FC
|
||||
CoreComponentControl.CTL_FavoritesTopComponent=\u304A\u6C17\u306B\u5165\u308A
|
@ -22,6 +22,8 @@ import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.windows.Mode;
|
||||
@ -37,6 +39,10 @@ import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent;
|
||||
public class CoreComponentControl {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(CoreComponentControl.class.getName());
|
||||
private static final String DIRECTORY_TREE = NbBundle.getMessage(CoreComponentControl.class,
|
||||
"CoreComponentControl.CTL_DirectoryTreeTopComponent");
|
||||
private static final String FAVORITES = NbBundle.getMessage(CoreComponentControl.class,
|
||||
"CoreComponentControl.CTL_FavoritesTopComponent");
|
||||
|
||||
/**
|
||||
* Opens all TopComponent windows that are needed ({@link DataExplorer}, {@link DataResult}, and
|
||||
@ -83,6 +89,7 @@ public class CoreComponentControl {
|
||||
Set<? extends Mode> modes = wm.getModes();
|
||||
Iterator<? extends Mode> iter = wm.getModes().iterator();
|
||||
|
||||
|
||||
TopComponent directoryTree = null;
|
||||
TopComponent favorites = null;
|
||||
String tcName = "";
|
||||
@ -94,16 +101,13 @@ public class CoreComponentControl {
|
||||
logger.log(Level.INFO, "tcName was null");
|
||||
tcName = "";
|
||||
}
|
||||
switch (tcName) {
|
||||
case "Directory Tree":
|
||||
// switch requires constant strings, so converted to if/else.
|
||||
if (DIRECTORY_TREE.equals(tcName)) {
|
||||
directoryTree = tc;
|
||||
break;
|
||||
case "Favorites":
|
||||
} else if (FAVORITES.equals(tcName)) {
|
||||
favorites = tc;
|
||||
break;
|
||||
default:
|
||||
} else {
|
||||
tc.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user