mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
Merge pull request #7046 from gdicristofaro/7702-artifactsInDirectories
7702 artifacts in directories
This commit is contained in:
commit
daf7a1fcff
@ -18,8 +18,12 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.directorytree;
|
||||
|
||||
import java.util.Objects;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.CasePreferences;
|
||||
import org.sleuthkit.autopsy.datamodel.DataSourceFilesNode;
|
||||
import org.sleuthkit.autopsy.datamodel.DataSourcesNode;
|
||||
import static org.sleuthkit.autopsy.directorytree.Bundle.*;
|
||||
|
||||
@NbBundle.Messages({"SelectionContext.dataSources=Data Sources",
|
||||
@ -62,6 +66,12 @@ enum SelectionContext {
|
||||
if (n == null || n.getParentNode() == null) {
|
||||
// Parent of root node or root node. Occurs during case open / close.
|
||||
return SelectionContext.OTHER;
|
||||
} else if ((!Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) && DataSourcesNode.getNameIdentifier().equals(n.getParentNode().getName()))
|
||||
|| (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) && DataSourceFilesNode.getNameIdentifier().equals(n.getParentNode().getName()))) {
|
||||
// if group by data type and root is the DataSourcesNode or
|
||||
// if group by persons/hosts and parent of DataSourceFilesNode
|
||||
// then it is a data source node
|
||||
return SelectionContext.DATA_SOURCES;
|
||||
} else if (n.getParentNode().getParentNode() == null) {
|
||||
// One level below root node. Should be one of DataSources, Views, or Results
|
||||
return SelectionContext.getContextFromName(n.getDisplayName());
|
||||
|
Loading…
x
Reference in New Issue
Block a user