mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
gah
This commit is contained in:
parent
990072d3bd
commit
4593b8d57e
@ -450,11 +450,11 @@ public final class ImageAnalyzerController implements FileUpdateListener {
|
|||||||
for (GroupKey<?> gk : groupsForFile) {
|
for (GroupKey<?> gk : groupsForFile) {
|
||||||
Grouping g = groupManager.getGroupForKey(gk);
|
Grouping g = groupManager.getGroupForKey(gk);
|
||||||
|
|
||||||
//if there is aleady a group that was previously deemed fully analyzed, then add this newly analyzed file to it.
|
|
||||||
if (g != null) {
|
if (g != null) {
|
||||||
|
//if there is aleady a group that was previously deemed fully analyzed, then add this newly analyzed file to it.
|
||||||
g.addFile(fileId);
|
g.addFile(fileId);
|
||||||
} ////if there wasn't already a group check if there should be one now
|
} else {
|
||||||
else {
|
//if there wasn't already a group check if there should be one now
|
||||||
//TODO: use method in groupmanager ?
|
//TODO: use method in groupmanager ?
|
||||||
List<Long> checkAnalyzed = groupManager.checkAnalyzed(gk);
|
List<Long> checkAnalyzed = groupManager.checkAnalyzed(gk);
|
||||||
if (checkAnalyzed != null) { // => the group is analyzed, so add it to the ui
|
if (checkAnalyzed != null) { // => the group is analyzed, so add it to the ui
|
||||||
|
@ -92,7 +92,7 @@ public class CategorizeAction extends AddTagAction {
|
|||||||
List<ContentTag> allContentTags = Case.getCurrentCase().getServices().getTagsManager().getContentTagsByContent(file);
|
List<ContentTag> allContentTags = Case.getCurrentCase().getServices().getTagsManager().getContentTagsByContent(file);
|
||||||
|
|
||||||
for (ContentTag ct : allContentTags) {
|
for (ContentTag ct : allContentTags) {
|
||||||
//this is bad: treating tags as categories as long as thier names start with prefix
|
//this is bad: treating tags as categories as long as their names start with prefix
|
||||||
//TODO: abandon using tags for categories and instead add a new column to DrawableDB
|
//TODO: abandon using tags for categories and instead add a new column to DrawableDB
|
||||||
if (ct.getName().getDisplayName().startsWith(Category.CATEGORY_PREFIX)) {
|
if (ct.getName().getDisplayName().startsWith(Category.CATEGORY_PREFIX)) {
|
||||||
LOGGER.log(Level.INFO, "removing old category from {0}", file.getName());
|
LOGGER.log(Level.INFO, "removing old category from {0}", file.getName());
|
||||||
@ -104,8 +104,7 @@ public class CategorizeAction extends AddTagAction {
|
|||||||
Case.getCurrentCase().getServices().getTagsManager().addContentTag(file, tagName, comment);
|
Case.getCurrentCase().getServices().getTagsManager().addContentTag(file, tagName, comment);
|
||||||
}
|
}
|
||||||
//make sure rest of ui hears category change.
|
//make sure rest of ui hears category change.
|
||||||
controller.handleFileUpdate(
|
controller.handleFileUpdate(new FileUpdateEvent(Collections.singleton(fileID), DrawableAttribute.CATEGORY));
|
||||||
new FileUpdateEvent(Collections.singleton(fileID), DrawableAttribute.CATEGORY));
|
|
||||||
|
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error categorizing result", ex);
|
LOGGER.log(Level.SEVERE, "Error categorizing result", ex);
|
||||||
|
@ -54,7 +54,7 @@ public enum Category implements Comparable<Category> {
|
|||||||
|
|
||||||
final static private Map<String, Category> nameMap = new HashMap<>();
|
final static private Map<String, Category> nameMap = new HashMap<>();
|
||||||
|
|
||||||
private static List<Category> valuesList = Arrays.asList(values());
|
private static final List<Category> valuesList = Arrays.asList(values());
|
||||||
|
|
||||||
static {
|
static {
|
||||||
for (Category cat : values()) {
|
for (Category cat : values()) {
|
||||||
|
@ -63,13 +63,11 @@ public class GroupKey<T extends Comparable<T>> implements Comparable<GroupKey<T>
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final GroupKey<?> other = (GroupKey<?>) obj;
|
final GroupKey<?> other = (GroupKey<?>) obj;
|
||||||
if (!Objects.equals(this.val, other.val)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.attr != other.attr) {
|
if (this.attr != other.attr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
|
return Objects.equals(this.val, other.val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,6 +30,7 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
@ -90,7 +91,7 @@ public class GroupManager {
|
|||||||
@ThreadConfined(type = ThreadType.JFX)
|
@ThreadConfined(type = ThreadType.JFX)
|
||||||
private final ObservableList<Grouping> unSeenGroups = FXCollections.observableArrayList();
|
private final ObservableList<Grouping> unSeenGroups = FXCollections.observableArrayList();
|
||||||
|
|
||||||
private final SortedList<Grouping> sortedUnSeenGroups = unSeenGroups.sorted();
|
private final SortedList<Grouping> sortedUnSeenGroups = new SortedList<>(unSeenGroups);
|
||||||
|
|
||||||
private final ObservableList<Grouping> publicSortedUnseenGroupsWrapper = FXCollections.unmodifiableObservableList(sortedUnSeenGroups);
|
private final ObservableList<Grouping> publicSortedUnseenGroupsWrapper = FXCollections.unmodifiableObservableList(sortedUnSeenGroups);
|
||||||
|
|
||||||
@ -137,10 +138,16 @@ public class GroupManager {
|
|||||||
* file is a part of
|
* file is a part of
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public Set<GroupKey<?>> getGroupKeysForFile(DrawableFile<?> file) {
|
synchronized public Set<GroupKey<?>> getGroupKeysForFile(DrawableFile<?> file) {
|
||||||
Set<GroupKey<?>> resultSet = new HashSet<>();
|
Set<GroupKey<?>> resultSet = new HashSet<>();
|
||||||
for (Comparable<?> val : groupBy.getValue(file)) {
|
for (Comparable<?> val : groupBy.getValue(file)) {
|
||||||
resultSet.add(new GroupKey(groupBy, val));
|
if (groupBy == DrawableAttribute.TAGS) {
|
||||||
|
if (((TagName) val).getDisplayName().startsWith(Category.CATEGORY_PREFIX) == false) {
|
||||||
|
resultSet.add(new GroupKey(groupBy, val));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
resultSet.add(new GroupKey(groupBy, val));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return resultSet;
|
return resultSet;
|
||||||
}
|
}
|
||||||
@ -154,7 +161,7 @@ public class GroupManager {
|
|||||||
* @return a a set of {@link GroupKey}s representing the group(s) the given
|
* @return a a set of {@link GroupKey}s representing the group(s) the given
|
||||||
* file is a part of
|
* file is a part of
|
||||||
*/
|
*/
|
||||||
public Set<GroupKey<?>> getGroupKeysForFileID(Long fileID) {
|
synchronized public Set<GroupKey<?>> getGroupKeysForFileID(Long fileID) {
|
||||||
try {
|
try {
|
||||||
DrawableFile<?> file = db.getFileFromID(fileID);
|
DrawableFile<?> file = db.getFileFromID(fileID);
|
||||||
return getGroupKeysForFile(file);
|
return getGroupKeysForFile(file);
|
||||||
@ -185,7 +192,9 @@ public class GroupManager {
|
|||||||
groupBy = DrawableAttribute.PATH;
|
groupBy = DrawableAttribute.PATH;
|
||||||
sortOrder = SortOrder.ASCENDING;
|
sortOrder = SortOrder.ASCENDING;
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
unSeenGroups.clear();
|
synchronized (unSeenGroups) {
|
||||||
|
unSeenGroups.clear();
|
||||||
|
}
|
||||||
analyzedGroups.clear();
|
analyzedGroups.clear();
|
||||||
});
|
});
|
||||||
synchronized (groupMap) {
|
synchronized (groupMap) {
|
||||||
@ -236,7 +245,9 @@ public class GroupManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void markGroupSeen(Grouping group) {
|
public void markGroupSeen(Grouping group) {
|
||||||
unSeenGroups.remove(group);
|
synchronized (unSeenGroups) {
|
||||||
|
unSeenGroups.remove(group);
|
||||||
|
}
|
||||||
db.markGroupSeen(group.groupKey);
|
db.markGroupSeen(group.groupKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,13 +266,16 @@ public class GroupManager {
|
|||||||
group.removeFile(fileID);
|
group.removeFile(fileID);
|
||||||
if (group.fileIds().isEmpty()) {
|
if (group.fileIds().isEmpty()) {
|
||||||
synchronized (groupMap) {
|
synchronized (groupMap) {
|
||||||
groupMap.remove(group.groupKey);
|
groupMap.remove(groupKey, group);
|
||||||
}
|
}
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
analyzedGroups.remove(group);
|
analyzedGroups.remove(group);
|
||||||
unSeenGroups.remove(group);
|
synchronized (unSeenGroups) {
|
||||||
|
unSeenGroups.remove(group);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,9 +306,10 @@ public class GroupManager {
|
|||||||
if (analyzedGroups.contains(g) == false) {
|
if (analyzedGroups.contains(g) == false) {
|
||||||
analyzedGroups.add(g);
|
analyzedGroups.add(g);
|
||||||
}
|
}
|
||||||
|
synchronized (unSeenGroups) {
|
||||||
if (groupSeen == false && unSeenGroups.contains(g) == false) {
|
if (groupSeen == false && unSeenGroups.contains(g) == false) {
|
||||||
unSeenGroups.add(g);
|
unSeenGroups.add(g);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -399,7 +414,9 @@ public class GroupManager {
|
|||||||
values = (List<A>) Category.valuesList();
|
values = (List<A>) Category.valuesList();
|
||||||
break;
|
break;
|
||||||
case TAGS:
|
case TAGS:
|
||||||
values = (List<A>) Case.getCurrentCase().getServices().getTagsManager().getTagNamesInUse();
|
values = (List<A>) Case.getCurrentCase().getServices().getTagsManager().getTagNamesInUse().stream()
|
||||||
|
.filter(t -> t.getDisplayName().startsWith(Category.CATEGORY_PREFIX) == false)
|
||||||
|
.collect(Collectors.toList());
|
||||||
break;
|
break;
|
||||||
case ANALYZED:
|
case ANALYZED:
|
||||||
values = (List<A>) Arrays.asList(false, true);
|
values = (List<A>) Arrays.asList(false, true);
|
||||||
@ -412,7 +429,6 @@ public class GroupManager {
|
|||||||
//otherwise do straight db query
|
//otherwise do straight db query
|
||||||
return db.findValuesForAttribute(groupBy, sortBy, sortOrder);
|
return db.findValuesForAttribute(groupBy, sortBy, sortOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
//sort in memory
|
//sort in memory
|
||||||
Collections.sort(values, sortBy.getValueComparator(groupBy, sortOrder));
|
Collections.sort(values, sortBy.getValueComparator(groupBy, sortOrder));
|
||||||
|
|
||||||
@ -600,7 +616,9 @@ public class GroupManager {
|
|||||||
groupProgress = ProgressHandleFactory.createHandle("regrouping files by " + groupBy.attrName.toString() + " sorted by " + sortBy.name() + " in " + sortOrder.toString() + " order", this);
|
groupProgress = ProgressHandleFactory.createHandle("regrouping files by " + groupBy.attrName.toString() + " sorted by " + sortBy.name() + " in " + sortOrder.toString() + " order", this);
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
analyzedGroups.clear();
|
analyzedGroups.clear();
|
||||||
unSeenGroups.clear();
|
synchronized (unSeenGroups) {
|
||||||
|
unSeenGroups.clear();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
synchronized (groupMap) {
|
synchronized (groupMap) {
|
||||||
groupMap.clear();
|
groupMap.clear();
|
||||||
|
@ -21,7 +21,6 @@ package org.sleuthkit.autopsy.imageanalyzer.grouping;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javafx.application.Platform;
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
@ -42,7 +41,7 @@ public class Grouping {
|
|||||||
|
|
||||||
public static final String UNKNOWN = "unknown";
|
public static final String UNKNOWN = "unknown";
|
||||||
|
|
||||||
final private ObservableList<Long> fileIDs = FXCollections.observableArrayList();
|
private final ObservableList<Long> fileIDs = FXCollections.observableArrayList();
|
||||||
|
|
||||||
//cache the number of files in this groups with hashset hits
|
//cache the number of files in this groups with hashset hits
|
||||||
private int filesWithHashSetHitsCount = -1;
|
private int filesWithHashSetHitsCount = -1;
|
||||||
@ -110,17 +109,13 @@ public class Grouping {
|
|||||||
}
|
}
|
||||||
|
|
||||||
synchronized public void addFile(Long f) {
|
synchronized public void addFile(Long f) {
|
||||||
Platform.runLater(() -> {
|
if (fileIDs.contains(f) == false) {
|
||||||
if (fileIDs.contains(f) == false) {
|
fileIDs.add(f);
|
||||||
fileIDs.add(f);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized public void removeFile(Long f) {
|
synchronized public void removeFile(Long f) {
|
||||||
Platform.runLater(() -> {
|
fileIDs.removeAll(f);
|
||||||
fileIDs.removeAll(f);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ import javafx.animation.Interpolator;
|
|||||||
import javafx.animation.KeyFrame;
|
import javafx.animation.KeyFrame;
|
||||||
import javafx.animation.KeyValue;
|
import javafx.animation.KeyValue;
|
||||||
import javafx.animation.Timeline;
|
import javafx.animation.Timeline;
|
||||||
|
import javafx.application.Platform;
|
||||||
import javafx.beans.Observable;
|
import javafx.beans.Observable;
|
||||||
import javafx.beans.property.ReadOnlyObjectProperty;
|
import javafx.beans.property.ReadOnlyObjectProperty;
|
||||||
import javafx.beans.property.ReadOnlyObjectWrapper;
|
import javafx.beans.property.ReadOnlyObjectWrapper;
|
||||||
@ -354,10 +355,13 @@ public class GroupPane extends BorderPane implements GroupView {
|
|||||||
resetHeaderString();
|
resetHeaderString();
|
||||||
//and assign fileIDs to gridView
|
//and assign fileIDs to gridView
|
||||||
if (grouping.get() == null) {
|
if (grouping.get() == null) {
|
||||||
gridView.getItems().clear();
|
Platform.runLater(gridView.getItems()::clear);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
gridView.setItems(grouping.get().fileIds());
|
Platform.runLater(() -> {
|
||||||
grouping.get().fileIds().addListener((Observable p) -> {
|
gridView.setItems(grouping.get().fileIds());
|
||||||
|
});
|
||||||
|
grouping.get().fileIds().addListener((Observable p) -> {
|
||||||
resetHeaderString();
|
resetHeaderString();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import java.util.Arrays;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.property.SimpleObjectProperty;
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
import javafx.beans.property.SimpleStringProperty;
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
@ -52,6 +53,7 @@ import org.sleuthkit.autopsy.imageanalyzer.TagUtils;
|
|||||||
import org.sleuthkit.autopsy.imageanalyzer.datamodel.Category;
|
import org.sleuthkit.autopsy.imageanalyzer.datamodel.Category;
|
||||||
import org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableAttribute;
|
import org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableAttribute;
|
||||||
import org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableFile;
|
import org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableFile;
|
||||||
|
import org.sleuthkit.datamodel.TagName;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -123,7 +125,13 @@ public class MetaDataPane extends AnchorPane implements Category.CategoryListene
|
|||||||
attributeColumn.setPrefWidth(USE_COMPUTED_SIZE);
|
attributeColumn.setPrefWidth(USE_COMPUTED_SIZE);
|
||||||
|
|
||||||
valueColumn.setCellValueFactory((p) -> {
|
valueColumn.setCellValueFactory((p) -> {
|
||||||
return new SimpleStringProperty(StringUtils.join((Collection<?>) p.getValue().getValue(), ";"));
|
if (p.getValue().getKey() == DrawableAttribute.TAGS) {
|
||||||
|
return new SimpleStringProperty(((Collection<TagName>) p.getValue().getValue()).stream()
|
||||||
|
.map(TagName::getDisplayName)
|
||||||
|
.collect(Collectors.joining(" ; ", "", "")));
|
||||||
|
} else {
|
||||||
|
return new SimpleStringProperty(StringUtils.join((Collection<?>) p.getValue().getValue(), " ; "));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
valueColumn.setPrefWidth(USE_COMPUTED_SIZE);
|
valueColumn.setPrefWidth(USE_COMPUTED_SIZE);
|
||||||
valueColumn.setCellFactory((p) -> new TableCell<Pair<DrawableAttribute<?>, ? extends Object>, String>() {
|
valueColumn.setCellFactory((p) -> new TableCell<Pair<DrawableAttribute<?>, ? extends Object>, String>() {
|
||||||
|
@ -75,6 +75,7 @@ import org.sleuthkit.autopsy.imageanalyzer.actions.SwingMenuItemAdapter;
|
|||||||
import org.sleuthkit.autopsy.imageanalyzer.datamodel.Category;
|
import org.sleuthkit.autopsy.imageanalyzer.datamodel.Category;
|
||||||
import org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableAttribute;
|
import org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableAttribute;
|
||||||
import org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableFile;
|
import org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableFile;
|
||||||
|
import org.sleuthkit.autopsy.imageanalyzer.grouping.GroupKey;
|
||||||
import org.sleuthkit.datamodel.ContentTag;
|
import org.sleuthkit.datamodel.ContentTag;
|
||||||
import org.sleuthkit.datamodel.TagName;
|
import org.sleuthkit.datamodel.TagName;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
@ -250,6 +251,7 @@ public abstract class SingleDrawableViewBase extends AnchorPane implements Drawa
|
|||||||
protected abstract void clearContent();
|
protected abstract void clearContent();
|
||||||
|
|
||||||
protected abstract void disposeContent();
|
protected abstract void disposeContent();
|
||||||
|
|
||||||
protected abstract Runnable getContentUpdateRunnable();
|
protected abstract Runnable getContentUpdateRunnable();
|
||||||
|
|
||||||
protected abstract String getLabelText();
|
protected abstract String getLabelText();
|
||||||
@ -264,18 +266,21 @@ public abstract class SingleDrawableViewBase extends AnchorPane implements Drawa
|
|||||||
Exceptions.printStackTrace(ex);
|
Exceptions.printStackTrace(ex);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//TODO: convert this to an action!
|
//TODO: convert this to an action!
|
||||||
List<ContentTag> contentTagsByContent;
|
final ImageAnalyzerController controller = ImageAnalyzerController.getDefault();
|
||||||
try {
|
try {
|
||||||
contentTagsByContent = Case.getCurrentCase().getServices().getTagsManager().getContentTagsByContent(getFile());
|
// remove file from old category group
|
||||||
|
controller.getGroupManager().removeFromGroup(new GroupKey<TagName>(DrawableAttribute.TAGS, TagUtils.getFollowUpTagName()), fileID);
|
||||||
|
|
||||||
|
List<ContentTag> contentTagsByContent = Case.getCurrentCase().getServices().getTagsManager().getContentTagsByContent(getFile());
|
||||||
for (ContentTag ct : contentTagsByContent) {
|
for (ContentTag ct : contentTagsByContent) {
|
||||||
if (ct.getName().getDisplayName().equals(TagUtils.getFollowUpTagName().getDisplayName())) {
|
if (ct.getName().getDisplayName().equals(TagUtils.getFollowUpTagName().getDisplayName())) {
|
||||||
Case.getCurrentCase().getServices().getTagsManager().deleteContentTag(ct);
|
Case.getCurrentCase().getServices().getTagsManager().deleteContentTag(ct);
|
||||||
SwingUtilities.invokeLater(() -> DirectoryTreeTopComponent.findInstance().refreshContentTreeSafe());
|
SwingUtilities.invokeLater(() -> DirectoryTreeTopComponent.findInstance().refreshContentTreeSafe());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImageAnalyzerController.getDefault().handleFileUpdate(new FileUpdateEvent(Collections.singleton(fileID), DrawableAttribute.TAGS));
|
|
||||||
|
controller.handleFileUpdate(new FileUpdateEvent(Collections.singleton(fileID), DrawableAttribute.TAGS));
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
Exceptions.printStackTrace(ex);
|
Exceptions.printStackTrace(ex);
|
||||||
}
|
}
|
||||||
|
@ -37,17 +37,26 @@ class GroupTreeCell extends TreeCell<TreeNode> {
|
|||||||
super.updateItem(tNode, empty);
|
super.updateItem(tNode, empty);
|
||||||
prefWidthProperty().bind(getTreeView().widthProperty().subtract(15));
|
prefWidthProperty().bind(getTreeView().widthProperty().subtract(15));
|
||||||
|
|
||||||
if (tNode != null) {
|
if (tNode == null || empty) {
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
setTooltip(null);
|
||||||
|
setText(null);
|
||||||
|
setGraphic(null);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
final String name = StringUtils.defaultIfBlank(tNode.getPath(), Grouping.UNKNOWN);
|
final String name = StringUtils.defaultIfBlank(tNode.getPath(), Grouping.UNKNOWN);
|
||||||
setTooltip(new Tooltip(name));
|
Platform.runLater(() -> {
|
||||||
|
setTooltip(new Tooltip(name));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
if (tNode.getGroup() == null) {
|
if (tNode.getGroup() == null) {
|
||||||
setText(name);
|
Platform.runLater(() -> {
|
||||||
setGraphic(new ImageView(EMPTY_FOLDER_ICON));
|
setText(name);
|
||||||
} else {
|
setGraphic(new ImageView(EMPTY_FOLDER_ICON));
|
||||||
//this TreeNode has a group so append counts to name ...
|
});
|
||||||
setText(name + " (" + getNumerator() + getDenominator() + ")");
|
|
||||||
|
|
||||||
|
} else {
|
||||||
//if number of files in this group changes (eg file is recategorized), update counts
|
//if number of files in this group changes (eg file is recategorized), update counts
|
||||||
tNode.getGroup().fileIds().addListener((Observable o) -> {
|
tNode.getGroup().fileIds().addListener((Observable o) -> {
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
@ -55,13 +64,14 @@ class GroupTreeCell extends TreeCell<TreeNode> {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//... and use icon corresponding to group type
|
Platform.runLater(() -> {
|
||||||
setGraphic(new ImageView(tNode.getGroup().groupKey.getAttribute().getIcon()));
|
//this TreeNode has a group so append counts to name ...
|
||||||
|
setText(name + " (" + getNumerator() + getDenominator() + ")");
|
||||||
|
//... and use icon corresponding to group type
|
||||||
|
setGraphic(new ImageView(tNode.getGroup().groupKey.getAttribute().getIcon()));
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
setTooltip(null);
|
|
||||||
setText(null);
|
|
||||||
setGraphic(null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,10 +80,15 @@ class GroupTreeCell extends TreeCell<TreeNode> {
|
|||||||
* of hashset hits + "/"
|
* of hashset hits + "/"
|
||||||
*/
|
*/
|
||||||
synchronized private String getNumerator() {
|
synchronized private String getNumerator() {
|
||||||
final String numerator = (getItem().getGroup().groupKey.getAttribute() != DrawableAttribute.HASHSET)
|
try {
|
||||||
? getItem().getGroup().getFilesWithHashSetHitsCount() + "/"
|
final String numerator = (getItem().getGroup().groupKey.getAttribute() != DrawableAttribute.HASHSET)
|
||||||
: "";
|
? getItem().getGroup().getFilesWithHashSetHitsCount() + "/"
|
||||||
return numerator;
|
: "";
|
||||||
|
return numerator;
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
//instead of this try catch block, remove the listener when assigned a null treeitem / group
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,6 +22,7 @@ import java.util.Collections;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.scene.control.TreeItem;
|
import javafx.scene.control.TreeItem;
|
||||||
@ -189,7 +190,7 @@ class GroupTreeItem extends TreeItem<TreeNode> implements Comparable<GroupTreeIt
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GroupTreeItem getTreeItemForGroup(GroupTreeItem root, Grouping grouping) {
|
static GroupTreeItem getTreeItemForGroup(GroupTreeItem root, Grouping grouping) {
|
||||||
if (root.getValue().getGroup() == grouping) {
|
if (Objects.equals(root.getValue().getGroup(), grouping)) {
|
||||||
return root;
|
return root;
|
||||||
} else {
|
} else {
|
||||||
synchronized (root.getChildren()) {
|
synchronized (root.getChildren()) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#Updated by build script
|
#Updated by build script
|
||||||
#Wed, 27 Aug 2014 16:43:40 -0400
|
#Wed, 03 Sep 2014 09:52:11 -0400
|
||||||
LBL_splash_window_title=Starting Autopsy
|
LBL_splash_window_title=Starting Autopsy
|
||||||
SPLASH_HEIGHT=288
|
SPLASH_HEIGHT=288
|
||||||
SPLASH_WIDTH=538
|
SPLASH_WIDTH=538
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#Updated by build script
|
#Updated by build script
|
||||||
#Wed, 27 Aug 2014 16:43:40 -0400
|
#Wed, 03 Sep 2014 09:52:11 -0400
|
||||||
|
|
||||||
CTL_MainWindow_Title=Autopsy 3.1.0
|
CTL_MainWindow_Title=Autopsy 3.1.0
|
||||||
CTL_MainWindow_Title_No_Project=Autopsy 3.1.0
|
CTL_MainWindow_Title_No_Project=Autopsy 3.1.0
|
||||||
|
@ -13,111 +13,5 @@ cluster.path=\
|
|||||||
${nbplatform.active.dir}/java:\
|
${nbplatform.active.dir}/java:\
|
||||||
${nbplatform.active.dir}/platform
|
${nbplatform.active.dir}/platform
|
||||||
disabled.modules=\
|
disabled.modules=\
|
||||||
org.apache.tools.ant.module,\
|
org.netbeans.modules.junit
|
||||||
org.netbeans.api.debugger.jpda,\
|
|
||||||
org.netbeans.api.java,\
|
|
||||||
org.netbeans.lib.nbjavac,\
|
|
||||||
org.netbeans.libs.cglib,\
|
|
||||||
org.netbeans.libs.javacapi,\
|
|
||||||
org.netbeans.libs.javacimpl,\
|
|
||||||
org.netbeans.libs.springframework,\
|
|
||||||
org.netbeans.modules.ant.browsetask,\
|
|
||||||
org.netbeans.modules.ant.debugger,\
|
|
||||||
org.netbeans.modules.ant.freeform,\
|
|
||||||
org.netbeans.modules.ant.grammar,\
|
|
||||||
org.netbeans.modules.ant.kit,\
|
|
||||||
org.netbeans.modules.beans,\
|
|
||||||
org.netbeans.modules.classfile,\
|
|
||||||
org.netbeans.modules.dbschema,\
|
|
||||||
org.netbeans.modules.debugger.jpda,\
|
|
||||||
org.netbeans.modules.debugger.jpda.ant,\
|
|
||||||
org.netbeans.modules.debugger.jpda.kit,\
|
|
||||||
org.netbeans.modules.debugger.jpda.projects,\
|
|
||||||
org.netbeans.modules.debugger.jpda.ui,\
|
|
||||||
org.netbeans.modules.debugger.jpda.visual,\
|
|
||||||
org.netbeans.modules.findbugs.installer,\
|
|
||||||
org.netbeans.modules.form,\
|
|
||||||
org.netbeans.modules.form.binding,\
|
|
||||||
org.netbeans.modules.form.j2ee,\
|
|
||||||
org.netbeans.modules.form.kit,\
|
|
||||||
org.netbeans.modules.form.nb,\
|
|
||||||
org.netbeans.modules.form.refactoring,\
|
|
||||||
org.netbeans.modules.hibernate,\
|
|
||||||
org.netbeans.modules.hibernatelib,\
|
|
||||||
org.netbeans.modules.hudson.ant,\
|
|
||||||
org.netbeans.modules.hudson.maven,\
|
|
||||||
org.netbeans.modules.i18n,\
|
|
||||||
org.netbeans.modules.i18n.form,\
|
|
||||||
org.netbeans.modules.j2ee.core.utilities,\
|
|
||||||
org.netbeans.modules.j2ee.eclipselink,\
|
|
||||||
org.netbeans.modules.j2ee.eclipselinkmodelgen,\
|
|
||||||
org.netbeans.modules.j2ee.jpa.refactoring,\
|
|
||||||
org.netbeans.modules.j2ee.jpa.verification,\
|
|
||||||
org.netbeans.modules.j2ee.metadata,\
|
|
||||||
org.netbeans.modules.j2ee.metadata.model.support,\
|
|
||||||
org.netbeans.modules.j2ee.persistence,\
|
|
||||||
org.netbeans.modules.j2ee.persistence.kit,\
|
|
||||||
org.netbeans.modules.j2ee.persistenceapi,\
|
|
||||||
org.netbeans.modules.java.api.common,\
|
|
||||||
org.netbeans.modules.java.debug,\
|
|
||||||
org.netbeans.modules.java.editor,\
|
|
||||||
org.netbeans.modules.java.editor.lib,\
|
|
||||||
org.netbeans.modules.java.examples,\
|
|
||||||
org.netbeans.modules.java.freeform,\
|
|
||||||
org.netbeans.modules.java.guards,\
|
|
||||||
org.netbeans.modules.java.helpset,\
|
|
||||||
org.netbeans.modules.java.hints,\
|
|
||||||
org.netbeans.modules.java.hints.declarative,\
|
|
||||||
org.netbeans.modules.java.hints.declarative.test,\
|
|
||||||
org.netbeans.modules.java.hints.legacy.spi,\
|
|
||||||
org.netbeans.modules.java.hints.test,\
|
|
||||||
org.netbeans.modules.java.hints.ui,\
|
|
||||||
org.netbeans.modules.java.j2seplatform,\
|
|
||||||
org.netbeans.modules.java.j2seproject,\
|
|
||||||
org.netbeans.modules.java.kit,\
|
|
||||||
org.netbeans.modules.java.lexer,\
|
|
||||||
org.netbeans.modules.java.navigation,\
|
|
||||||
org.netbeans.modules.java.platform,\
|
|
||||||
org.netbeans.modules.java.preprocessorbridge,\
|
|
||||||
org.netbeans.modules.java.project,\
|
|
||||||
org.netbeans.modules.java.source,\
|
|
||||||
org.netbeans.modules.java.source.ant,\
|
|
||||||
org.netbeans.modules.java.source.queries,\
|
|
||||||
org.netbeans.modules.java.source.queriesimpl,\
|
|
||||||
org.netbeans.modules.java.sourceui,\
|
|
||||||
org.netbeans.modules.java.testrunner,\
|
|
||||||
org.netbeans.modules.javadoc,\
|
|
||||||
org.netbeans.modules.javawebstart,\
|
|
||||||
org.netbeans.modules.junit,\
|
|
||||||
org.netbeans.modules.maven,\
|
|
||||||
org.netbeans.modules.maven.checkstyle,\
|
|
||||||
org.netbeans.modules.maven.coverage,\
|
|
||||||
org.netbeans.modules.maven.embedder,\
|
|
||||||
org.netbeans.modules.maven.grammar,\
|
|
||||||
org.netbeans.modules.maven.graph,\
|
|
||||||
org.netbeans.modules.maven.hints,\
|
|
||||||
org.netbeans.modules.maven.indexer,\
|
|
||||||
org.netbeans.modules.maven.junit,\
|
|
||||||
org.netbeans.modules.maven.kit,\
|
|
||||||
org.netbeans.modules.maven.model,\
|
|
||||||
org.netbeans.modules.maven.osgi,\
|
|
||||||
org.netbeans.modules.maven.persistence,\
|
|
||||||
org.netbeans.modules.maven.refactoring,\
|
|
||||||
org.netbeans.modules.maven.repository,\
|
|
||||||
org.netbeans.modules.maven.search,\
|
|
||||||
org.netbeans.modules.maven.spring,\
|
|
||||||
org.netbeans.modules.projectimport.eclipse.core,\
|
|
||||||
org.netbeans.modules.projectimport.eclipse.j2se,\
|
|
||||||
org.netbeans.modules.refactoring.java,\
|
|
||||||
org.netbeans.modules.spellchecker.bindings.java,\
|
|
||||||
org.netbeans.modules.spring.beans,\
|
|
||||||
org.netbeans.modules.testng,\
|
|
||||||
org.netbeans.modules.testng.ant,\
|
|
||||||
org.netbeans.modules.testng.maven,\
|
|
||||||
org.netbeans.modules.websvc.jaxws21,\
|
|
||||||
org.netbeans.modules.websvc.jaxws21api,\
|
|
||||||
org.netbeans.modules.websvc.saas.codegen.java,\
|
|
||||||
org.netbeans.modules.xml.jaxb,\
|
|
||||||
org.netbeans.modules.xml.tools.java,\
|
|
||||||
org.netbeans.spi.java.hints
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user