Merge pull request #1069 from rcordovano/tag_menu_sort_from_sidhesh

Commit Sidhesh's tag sorting for context menu
This commit is contained in:
Richard Cordovano 2015-02-19 16:09:42 -05:00
commit d53725d5f2

View File

@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.actions;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import javax.swing.JMenu; import javax.swing.JMenu;
@ -81,6 +82,7 @@ abstract class AddTagAction extends TagAction implements Presenter.Popup {
List<TagName> tagNames = null; List<TagName> tagNames = null;
try { try {
tagNames = tagsManager.getAllTagNames(); tagNames = tagsManager.getAllTagNames();
Collections.sort(tagNames);
} }
catch (TskCoreException ex) { catch (TskCoreException ex) {
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS