Merge pull request #2786 from sleuthkit/release-4.4.0

Merge in release 4.4.0 branch
This commit is contained in:
Richard Cordovano 2017-05-05 12:14:12 -04:00 committed by GitHub
commit f0c96524d5
7 changed files with 11 additions and 22 deletions

View File

@ -174,10 +174,6 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
for(BlackboardArtifactTag artifactTag : existingTagsList) {
if(tagDisplayName.equals(artifactTag.getName().getDisplayName())) {
JMenuItem tagNameItem = new JMenuItem(tagDisplayName);
// for the bookmark tag name only, added shortcut label
if (tagDisplayName.equals(NbBundle.getMessage(AddTagAction.class, "AddBookmarkTagAction.bookmark.text"))) {
tagNameItem.setAccelerator(AddBookmarkTagAction.BOOKMARK_SHORTCUT);
}
tagNameItem.addActionListener((ActionEvent e) -> {
deleteTag(tagName, artifactTag, artifact.getArtifactID());
});

View File

@ -159,8 +159,6 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
// a tag with the associated tag name.
if (null != tagNamesMap && !tagNamesMap.isEmpty()) {
try {
/*List<BlackboardArtifactTag> existingTagsList =
Case.getCurrentCase().getServices().getTagsManager().getBlackboardArtifactTagsByArtifact(artifact);*/
List<ContentTag> existingTagsList =
Case.getCurrentCase().getServices().getTagsManager()
.getContentTagsByContent(file);
@ -172,10 +170,6 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
for(ContentTag contentTag : existingTagsList) {
if(tagDisplayName.equals(contentTag.getName().getDisplayName())) {
JMenuItem tagNameItem = new JMenuItem(tagDisplayName);
// for the bookmark tag name only, added shortcut label
if (tagDisplayName.equals(NbBundle.getMessage(AddTagAction.class, "AddBookmarkTagAction.bookmark.text"))) {
tagNameItem.setAccelerator(AddBookmarkTagAction.BOOKMARK_SHORTCUT);
}
tagNameItem.addActionListener((ActionEvent e) -> {
deleteTag(tagName, contentTag, file.getId());
});

View File

@ -382,8 +382,8 @@ public class HashsetHits implements AutopsyVisitableItem {
if (!artifactHits.containsKey(id)) {
BlackboardArtifact art = skCase.getBlackboardArtifact(id);
artifactHits.put(id, art);
list.add(id);
}
list.add(id);
} catch (TskException ex) {
logger.log(Level.SEVERE, "TSK Exception occurred", ex); //NON-NLS
}

View File

@ -356,10 +356,9 @@ public class InterestingHits implements AutopsyVisitableItem {
try {
if (!artifactHits.containsKey(id)) {
BlackboardArtifact art = skCase.getBlackboardArtifact(id);
artifactHits.put(id, art);
list.add(id);
}
list.add(id);
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "TSK Exception occurred", ex); //NON-NLS
}

View File

@ -709,17 +709,16 @@ public class KeywordHits implements AutopsyVisitableItem {
RegExpInstanceKey key = new RegExpInstanceKey(id);
if (!nodesMap.containsKey(key)) {
nodesMap.put(key, createNode(key));
list.add(key);
}
list.add(key);
}
} else {
for (String instance : instances) {
RegExpInstanceKey key = new RegExpInstanceKey(instance);
if (!nodesMap.containsKey(key)) {
nodesMap.put(key, createNode(key));
list.add(key);
}
list.add(key);
}
}
@ -904,8 +903,8 @@ public class KeywordHits implements AutopsyVisitableItem {
for (Long id : keywordResults.getArtifactIds(setName, keyword, instance) ) {
if (!nodesMap.containsKey(id)) {
nodesMap.put(id, createBlackboardArtifactNode(id));
list.add(id);
}
list.add(id);
}
return true;
}

View File

@ -102,14 +102,14 @@ public class EventRootNode extends DisplayableItemNode {
for (Long eventId: eventIDs){
if (!nodesMap.containsKey(eventId)) {
nodesMap.put(eventId, createNode(eventId));
toPopulate.add(eventId);
}
toPopulate.add(eventId);
}
} else {
if (!nodesMap.containsKey(-1L)) {
nodesMap.put(-1L, createNode(-1L));
toPopulate.add(-1L);
}
toPopulate.add(-1L);
}
return true;
}

View File

@ -35,6 +35,7 @@ import org.openide.util.actions.Presenter;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.core.Installer;
import org.sleuthkit.autopsy.core.RuntimeProperties;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.imagegallery.ImageGalleryController;
import org.sleuthkit.autopsy.imagegallery.ImageGalleryModule;
@ -64,7 +65,7 @@ public final class OpenAction extends CallableSystemAction implements Presenter.
toolbarButton.addActionListener(actionEvent -> performAction());
pcl = (PropertyChangeEvent evt) -> {
if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) {
setEnabled(evt.getNewValue() != null);
setEnabled(RuntimeProperties.runningWithGUI() && evt.getNewValue() != null);
}
};
Case.addPropertyChangeListener(pcl);