mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #4028 from wschaeferB/4014-PreStoryCleanup
4014 pre story cleanup
This commit is contained in:
commit
047dc39b31
@ -24,10 +24,8 @@ import java.awt.event.ActionEvent;
|
|||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import javax.swing.AbstractAction;
|
import javax.swing.AbstractAction;
|
||||||
import javax.swing.ActionMap;
|
import javax.swing.ActionMap;
|
||||||
@ -57,7 +55,7 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
|||||||
private final List<TagName> tagNamesList = new ArrayList<>();
|
private final List<TagName> tagNamesList = new ArrayList<>();
|
||||||
private final List<TagName> standardTagNamesList = new ArrayList<>();
|
private final List<TagName> standardTagNamesList = new ArrayList<>();
|
||||||
private TagNameAndComment tagNameAndComment = null;
|
private TagNameAndComment tagNameAndComment = null;
|
||||||
|
|
||||||
public static class TagNameAndComment {
|
public static class TagNameAndComment {
|
||||||
|
|
||||||
private final TagName tagName;
|
private final TagName tagName;
|
||||||
@ -105,7 +103,16 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
|||||||
public static TagNameAndComment doDialog(Window owner) {
|
public static TagNameAndComment doDialog(Window owner) {
|
||||||
GetTagNameAndCommentDialog dialog = new GetTagNameAndCommentDialog(owner);
|
GetTagNameAndCommentDialog dialog = new GetTagNameAndCommentDialog(owner);
|
||||||
dialog.display();
|
dialog.display();
|
||||||
return dialog.tagNameAndComment;
|
return dialog.getTagNameAndComment();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the TagNameAndComment.
|
||||||
|
*
|
||||||
|
* @return the tagNameAndComment
|
||||||
|
*/
|
||||||
|
private TagNameAndComment getTagNameAndComment() {
|
||||||
|
return tagNameAndComment;
|
||||||
}
|
}
|
||||||
|
|
||||||
private GetTagNameAndCommentDialog(Window owner) {
|
private GetTagNameAndCommentDialog(Window owner) {
|
||||||
@ -114,14 +121,14 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
|||||||
ModalityType.APPLICATION_MODAL);
|
ModalityType.APPLICATION_MODAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void display() {
|
private void display() {
|
||||||
initComponents();
|
initComponents();
|
||||||
tagCombo.setRenderer(new DefaultListCellRenderer() {
|
tagCombo.setRenderer(new DefaultListCellRenderer() {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||||
String status = ((TagName) value).getKnownStatus() == TskData.FileKnown.BAD ?TagsManager.getNotableTagLabel() : "";
|
String status = ((TagName) value).getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
String newValue = ((TagName) value).getDisplayName() + status;
|
String newValue = ((TagName) value).getDisplayName() + status;
|
||||||
return super.getListCellRendererComponent(list, newValue, index, isSelected, cellHasFocus);
|
return super.getListCellRendererComponent(list, newValue, index, isSelected, cellHasFocus);
|
||||||
}
|
}
|
||||||
@ -151,7 +158,7 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
|||||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||||
List<String> standardTagNames = TagsManager.getStandardTagNames();
|
List<String> standardTagNames = TagsManager.getStandardTagNames();
|
||||||
Map<String, TagName> tagNamesMap = new TreeMap<>(tagsManager.getDisplayNamesToTagNamesMap());
|
Map<String, TagName> tagNamesMap = new TreeMap<>(tagsManager.getDisplayNamesToTagNamesMap());
|
||||||
|
|
||||||
tagNamesMap.entrySet().stream().map((entry) -> entry.getValue()).forEachOrdered((tagName) -> {
|
tagNamesMap.entrySet().stream().map((entry) -> entry.getValue()).forEachOrdered((tagName) -> {
|
||||||
if (standardTagNames.contains(tagName.getDisplayName())) {
|
if (standardTagNames.contains(tagName.getDisplayName())) {
|
||||||
standardTagNamesList.add(tagName);
|
standardTagNamesList.add(tagName);
|
||||||
@ -159,7 +166,6 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
|||||||
tagNamesList.add(tagName);
|
tagNamesList.add(tagName);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||||
Logger.getLogger(GetTagNameAndCommentDialog.class
|
Logger.getLogger(GetTagNameAndCommentDialog.class
|
||||||
@ -320,4 +326,5 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
|||||||
private javax.swing.JComboBox<TagName> tagCombo;
|
private javax.swing.JComboBox<TagName> tagCombo;
|
||||||
private javax.swing.JLabel tagLabel;
|
private javax.swing.JLabel tagLabel;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
|
|||||||
* Used as a key to ensure we eliminate duplicates from the result set by
|
* Used as a key to ensure we eliminate duplicates from the result set by
|
||||||
* not overwriting CR correlation instances.
|
* not overwriting CR correlation instances.
|
||||||
*/
|
*/
|
||||||
static final class UniquePathKey {
|
private static final class UniquePathKey {
|
||||||
|
|
||||||
private final String dataSourceID;
|
private final String dataSourceID;
|
||||||
private final String filePath;
|
private final String filePath;
|
||||||
@ -943,9 +943,9 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
|
|||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
if (other instanceof UniquePathKey) {
|
if (other instanceof UniquePathKey) {
|
||||||
UniquePathKey otherKey = (UniquePathKey) (other);
|
UniquePathKey otherKey = (UniquePathKey) (other);
|
||||||
return (Objects.equals(otherKey.dataSourceID, this.dataSourceID)
|
return (Objects.equals(otherKey.getDataSourceID(), this.getDataSourceID())
|
||||||
&& Objects.equals(otherKey.filePath, this.filePath)
|
&& Objects.equals(otherKey.getFilePath(), this.getFilePath())
|
||||||
&& Objects.equals(otherKey.type, this.type));
|
&& Objects.equals(otherKey.getType(), this.getType()));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -955,7 +955,34 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
|
|||||||
//int hash = 7;
|
//int hash = 7;
|
||||||
//hash = 67 * hash + this.dataSourceID.hashCode();
|
//hash = 67 * hash + this.dataSourceID.hashCode();
|
||||||
//hash = 67 * hash + this.filePath.hashCode();
|
//hash = 67 * hash + this.filePath.hashCode();
|
||||||
return Objects.hash(dataSourceID, filePath, type);
|
return Objects.hash(getDataSourceID(), getFilePath(), getType());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the type of this UniquePathKey.
|
||||||
|
*
|
||||||
|
* @return the type
|
||||||
|
*/
|
||||||
|
String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the file path for the UniquePathKey.
|
||||||
|
*
|
||||||
|
* @return the filePath
|
||||||
|
*/
|
||||||
|
String getFilePath() {
|
||||||
|
return filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the data source id for the UniquePathKey.
|
||||||
|
*
|
||||||
|
* @return the dataSourceID
|
||||||
|
*/
|
||||||
|
String getDataSourceID() {
|
||||||
|
return dataSourceID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ import org.openide.util.NbBundle.Messages;
|
|||||||
*/
|
*/
|
||||||
public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Messages({"DataContentViewerOtherCasesTableModel.case=Case",
|
@Messages({"DataContentViewerOtherCasesTableModel.case=Case",
|
||||||
"DataContentViewerOtherCasesTableModel.device=Device",
|
"DataContentViewerOtherCasesTableModel.device=Device",
|
||||||
"DataContentViewerOtherCasesTableModel.dataSource=Data Source",
|
"DataContentViewerOtherCasesTableModel.dataSource=Data Source",
|
||||||
@ -66,7 +68,7 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
List<OtherOccurrenceNodeData> nodeDataList;
|
private final List<OtherOccurrenceNodeData> nodeDataList;
|
||||||
|
|
||||||
DataContentViewerOtherCasesTableModel() {
|
DataContentViewerOtherCasesTableModel() {
|
||||||
nodeDataList = new ArrayList<>();
|
nodeDataList = new ArrayList<>();
|
||||||
@ -118,7 +120,7 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
|||||||
/**
|
/**
|
||||||
* Map a column ID to the value in that cell for node message data.
|
* Map a column ID to the value in that cell for node message data.
|
||||||
*
|
*
|
||||||
* @param nodeData The node message data.
|
* @param nodeData The node message data.
|
||||||
* @param columnId The ID of the cell column.
|
* @param columnId The ID of the cell column.
|
||||||
*
|
*
|
||||||
* @return The value in the cell.
|
* @return The value in the cell.
|
||||||
@ -133,7 +135,7 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
|||||||
/**
|
/**
|
||||||
* Map a column ID to the value in that cell for node instance data.
|
* Map a column ID to the value in that cell for node instance data.
|
||||||
*
|
*
|
||||||
* @param nodeData The node instance data.
|
* @param nodeData The node instance data.
|
||||||
* @param columnId The ID of the cell column.
|
* @param columnId The ID of the cell column.
|
||||||
*
|
*
|
||||||
* @return The value in the cell.
|
* @return The value in the cell.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2017-18 Basis Technology Corp.
|
* Copyright 2017-2018 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -46,7 +46,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
|||||||
final class RelationshipNode extends BlackboardArtifactNode {
|
final class RelationshipNode extends BlackboardArtifactNode {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(RelationshipNode.class.getName());
|
private static final Logger logger = Logger.getLogger(RelationshipNode.class.getName());
|
||||||
|
|
||||||
RelationshipNode(BlackboardArtifact artifact) {
|
RelationshipNode(BlackboardArtifact artifact) {
|
||||||
super(artifact);
|
super(artifact);
|
||||||
final String stripEnd = StringUtils.stripEnd(artifact.getDisplayName(), "s");
|
final String stripEnd = StringUtils.stripEnd(artifact.getDisplayName(), "s");
|
||||||
@ -115,7 +115,7 @@ final class RelationshipNode extends BlackboardArtifactNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addTagProperty(sheetSet);
|
addTagProperty(sheetSet);
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,8 +117,8 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
|
|||||||
|
|
||||||
drp.open();
|
drp.open();
|
||||||
drpExplorerManager = drp.getExplorerManager();
|
drpExplorerManager = drp.getExplorerManager();
|
||||||
drpExplorerManager.addPropertyChangeListener(evt ->
|
drpExplorerManager.addPropertyChangeListener(evt
|
||||||
viewInNewWindowButton.setEnabled(drpExplorerManager.getSelectedNodes().length == 1));
|
-> viewInNewWindowButton.setEnabled(drpExplorerManager.getSelectedNodes().length == 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,14 +21,12 @@ package org.sleuthkit.autopsy.datamodel;
|
|||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.swing.Action;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openide.nodes.Children;
|
import org.openide.nodes.Children;
|
||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
@ -38,9 +36,6 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
|||||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||||
import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent;
|
import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent;
|
||||||
import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent;
|
import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent;
|
||||||
import org.sleuthkit.autopsy.centralrepository.AddEditCentralRepoCommentAction;
|
|
||||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil;
|
|
||||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import static org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode.AbstractFilePropertyType.*;
|
import static org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode.AbstractFilePropertyType.*;
|
||||||
import static org.sleuthkit.autopsy.datamodel.Bundle.*;
|
import static org.sleuthkit.autopsy.datamodel.Bundle.*;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 Basis Technology Corp.
|
* Copyright 2011-2018 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -29,6 +29,7 @@ import org.sleuthkit.datamodel.AbstractFile;
|
|||||||
* Abstract class that implements the commonality between File and Directory
|
* Abstract class that implements the commonality between File and Directory
|
||||||
* Nodes (same properties).
|
* Nodes (same properties).
|
||||||
*
|
*
|
||||||
|
* @param <T> extends AbstractFile
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractFsContentNode<T extends AbstractFile> extends AbstractAbstractFileNode<T> {
|
public abstract class AbstractFsContentNode<T extends AbstractFile> extends AbstractAbstractFileNode<T> {
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@ import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagAddedEvent;
|
|||||||
import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagDeletedEvent;
|
import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagDeletedEvent;
|
||||||
import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent;
|
import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent;
|
||||||
import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent;
|
import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent;
|
||||||
import org.sleuthkit.autopsy.centralrepository.AddEditCentralRepoCommentAction;
|
|
||||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||||
import static org.sleuthkit.autopsy.datamodel.DisplayableItemNode.findLinked;
|
import static org.sleuthkit.autopsy.datamodel.DisplayableItemNode.findLinked;
|
||||||
@ -456,10 +454,10 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
|||||||
dataSourceStr));
|
dataSourceStr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If EXIF, add props for file size and path
|
// If EXIF, add props for file size and path
|
||||||
if (artifactTypeId == BlackboardArtifact.ARTIFACT_TYPE.TSK_METADATA_EXIF.getTypeID()) {
|
if (artifactTypeId == BlackboardArtifact.ARTIFACT_TYPE.TSK_METADATA_EXIF.getTypeID()) {
|
||||||
|
|
||||||
long size = 0;
|
long size = 0;
|
||||||
String path = ""; //NON-NLS
|
String path = ""; //NON-NLS
|
||||||
if (associated instanceof AbstractFile) {
|
if (associated instanceof AbstractFile) {
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2017 Basis Technology Corp.
|
* Copyright 2011-2018 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@ -19,6 +19,7 @@
|
|||||||
package org.sleuthkit.autopsy.datamodel;
|
package org.sleuthkit.autopsy.datamodel;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@ -46,11 +47,11 @@ public class LayoutFileNode extends AbstractAbstractFileNode<LayoutFile> {
|
|||||||
public static enum LayoutContentPropertyType {
|
public static enum LayoutContentPropertyType {
|
||||||
|
|
||||||
PARTS {
|
PARTS {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return NbBundle.getMessage(this.getClass(), "LayoutFileNode.propertyType.parts");
|
return NbBundle.getMessage(this.getClass(), "LayoutFileNode.propertyType.parts");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String nameForLayoutFile(LayoutFile lf) {
|
public static String nameForLayoutFile(LayoutFile lf) {
|
||||||
@ -115,9 +116,7 @@ public class LayoutFileNode extends AbstractAbstractFileNode<LayoutFile> {
|
|||||||
@Override
|
@Override
|
||||||
public Action[] getActions(boolean context) {
|
public Action[] getActions(boolean context) {
|
||||||
List<Action> actionsList = new ArrayList<>();
|
List<Action> actionsList = new ArrayList<>();
|
||||||
for (Action a : super.getActions(true)) {
|
actionsList.addAll(Arrays.asList(super.getActions(true)));
|
||||||
actionsList.add(a);
|
|
||||||
}
|
|
||||||
actionsList.add(new NewWindowViewAction(
|
actionsList.add(new NewWindowViewAction(
|
||||||
NbBundle.getMessage(this.getClass(), "LayoutFileNode.getActions.viewInNewWin.text"), this));
|
NbBundle.getMessage(this.getClass(), "LayoutFileNode.getActions.viewInNewWin.text"), this));
|
||||||
actionsList.add(new ExternalViewerAction(
|
actionsList.add(new ExternalViewerAction(
|
||||||
@ -126,19 +125,18 @@ public class LayoutFileNode extends AbstractAbstractFileNode<LayoutFile> {
|
|||||||
actionsList.add(ExtractAction.getInstance());
|
actionsList.add(ExtractAction.getInstance());
|
||||||
actionsList.add(null); // creates a menu separator
|
actionsList.add(null); // creates a menu separator
|
||||||
actionsList.add(AddContentTagAction.getInstance());
|
actionsList.add(AddContentTagAction.getInstance());
|
||||||
|
|
||||||
final Collection<AbstractFile> selectedFilesList =
|
final Collection<AbstractFile> selectedFilesList
|
||||||
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
|
= new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
|
||||||
if(selectedFilesList.size() == 1) {
|
if (selectedFilesList.size() == 1) {
|
||||||
actionsList.add(DeleteFileContentTagAction.getInstance());
|
actionsList.add(DeleteFileContentTagAction.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
actionsList.addAll(ContextMenuExtensionPoint.getActions());
|
actionsList.addAll(ContextMenuExtensionPoint.getActions());
|
||||||
return actionsList.toArray(new Action[actionsList.size()]);
|
return actionsList.toArray(new Action[actionsList.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fillPropertyMap(Map<String, Object> map) {
|
||||||
void fillPropertyMap(Map<String, Object> map) {
|
|
||||||
AbstractAbstractFileNode.fillPropertyMap(map, getContent());
|
AbstractAbstractFileNode.fillPropertyMap(map, getContent());
|
||||||
map.put(LayoutContentPropertyType.PARTS.toString(), content.getNumParts());
|
map.put(LayoutContentPropertyType.PARTS.toString(), content.getNumParts());
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2017 Basis Technology Corp.
|
* Copyright 2011-2018 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -40,7 +40,7 @@ public class LocalDirectoryNode extends SpecialDirectoryNode {
|
|||||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
|
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NbBundle.Messages({
|
@NbBundle.Messages({
|
||||||
"LocalDirectoryNode.createSheet.name.name=Name",
|
"LocalDirectoryNode.createSheet.name.name=Name",
|
||||||
|
@ -96,7 +96,7 @@ public class LocalFileNode extends AbstractAbstractFileNode<AbstractFile> {
|
|||||||
public Action[] getActions(boolean context) {
|
public Action[] getActions(boolean context) {
|
||||||
List<Action> actionsList = new ArrayList<>();
|
List<Action> actionsList = new ArrayList<>();
|
||||||
actionsList.addAll(Arrays.asList(super.getActions(true)));
|
actionsList.addAll(Arrays.asList(super.getActions(true)));
|
||||||
|
|
||||||
actionsList.add(new ViewContextAction(NbBundle.getMessage(this.getClass(), "LocalFileNode.viewFileInDir.text"), this.content));
|
actionsList.add(new ViewContextAction(NbBundle.getMessage(this.getClass(), "LocalFileNode.viewFileInDir.text"), this.content));
|
||||||
actionsList.add(null); // creates a menu separator
|
actionsList.add(null); // creates a menu separator
|
||||||
actionsList.add(new NewWindowViewAction(
|
actionsList.add(new NewWindowViewAction(
|
||||||
@ -125,7 +125,7 @@ public class LocalFileNode extends AbstractAbstractFileNode<AbstractFile> {
|
|||||||
logger.log(Level.WARNING, "Unable to add unzip with password action to context menus", ex);
|
logger.log(Level.WARNING, "Unable to add unzip with password action to context menus", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return actionsList.toArray(new Action[0]);
|
return actionsList.toArray(new Action[actionsList.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,8 +50,6 @@ public class VirtualDirectoryNode extends SpecialDirectoryNode {
|
|||||||
|
|
||||||
this.setDisplayName(nameForVirtualDirectory(ld));
|
this.setDisplayName(nameForVirtualDirectory(ld));
|
||||||
|
|
||||||
String name = ld.getName();
|
|
||||||
|
|
||||||
//set icon for name, special case for logical file set
|
//set icon for name, special case for logical file set
|
||||||
if (ld.isDataSource()) {
|
if (ld.isDataSource()) {
|
||||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/fileset-icon-16.png"); //NON-NLS
|
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/fileset-icon-16.png"); //NON-NLS
|
||||||
@ -59,7 +57,7 @@ public class VirtualDirectoryNode extends SpecialDirectoryNode {
|
|||||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-virtual.png"); //TODO NON-NLS
|
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-virtual.png"); //TODO NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NbBundle.Messages({"VirtualDirectoryNode.createSheet.size.name=Size (Bytes)",
|
@NbBundle.Messages({"VirtualDirectoryNode.createSheet.size.name=Size (Bytes)",
|
||||||
"VirtualDirectoryNode.createSheet.size.displayName=Size (Bytes)",
|
"VirtualDirectoryNode.createSheet.size.displayName=Size (Bytes)",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user