mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-20 11:26:53 +00:00
Cleanup
This commit is contained in:
parent
cef97dba30
commit
c3e12f2c35
@ -507,7 +507,8 @@ public class AnalysisResultTypeFactory extends TreeChildFactory<AnalysisResultSe
|
||||
ActionsFactory.ActionGroup group = new ActionsFactory.ActionGroup();
|
||||
KeywordSearchTermParams searchTermParams = this.getItemData().getSearchParams();
|
||||
|
||||
// ELTODO group.add(new DeleteAnalysisResultSetAction(searchTermParams));
|
||||
// ELTODO fill this stub when implementing KWS result deletion
|
||||
// group.add(new DeleteAnalysisResultSetAction(searchTermParams));
|
||||
|
||||
return Optional.of(group);
|
||||
}
|
||||
|
@ -172,32 +172,6 @@ public final class ActionsFactory {
|
||||
actionGroups.add(new ActionGroup(new ExtractArchiveWithPasswordAction(optionalFile.get())));
|
||||
}
|
||||
|
||||
/* ELTODO REMOVE
|
||||
Optional<BlackboardArtifact.Type> analysisResultType = actionContext.getAnalysisResultType();
|
||||
if (analysisResultType.isPresent()) {
|
||||
Optional<String> configuration = actionContext.getAnalysisResultConfiguration();
|
||||
|
||||
//dataSourceId.map(d -> Long.toString(d)).orElse("<Null or Empty>");
|
||||
Optional<Long> dataSourceId = actionContext.getDataSourceIdForActions();
|
||||
|
||||
actionGroups.add(new ActionGroup(new DeleteAnalysisResultSetAction(analysisResultType.get(),
|
||||
configuration.isPresent() ? configuration.get() : "",
|
||||
dataSourceId.isPresent() ? dataSourceId.get() : null)));
|
||||
|
||||
actionGroups.add(new ActionGroup(new AbstractAction("Delete Analysis Results of Type") {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
MessageFormat.format("Stub Action for deleting analysis result type: {0} with configuration {1} and data source of {2}",
|
||||
analysisResultType.get().getDisplayName(),
|
||||
configuration.map(c -> c == null ? "<Null>" : c).orElse("<Empty>"),
|
||||
dataSourceId.map(d -> Long.toString(d)).orElse("<Null or Empty>")),
|
||||
"Deleting...",
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
}
|
||||
}));
|
||||
}*/
|
||||
|
||||
List<Action> actionList = new ArrayList<>();
|
||||
for (ActionGroup aGroup : actionGroups) {
|
||||
if (aGroup != null) {
|
||||
|
@ -24,4 +24,4 @@ ArtifactFactory_getViewSrcContentAction_displayName=View Source {0} in Directory
|
||||
# {0} - contentType
|
||||
ArtifactFactory_getViewSrcContentAction_displayName2=View Source {0}
|
||||
DeleteAnalysisResultAction_label=Delete Analysis Result
|
||||
DeleteKeywordSetAction_label=Delete Keyword Search Results
|
||||
DeleteKeywordSetAction_label=Delete Analysis Results
|
||||
|
@ -20,21 +20,12 @@
|
||||
package org.sleuthkit.autopsy.mainui.nodes.actions;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.Collection;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.openide.explorer.ExplorerManager;
|
||||
import org.openide.explorer.view.BeanTreeView;
|
||||
import org.openide.nodes.Children;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.util.Utilities;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent;
|
||||
import org.sleuthkit.autopsy.mainui.datamodel.KeywordSearchTermParams;
|
||||
import org.sleuthkit.datamodel.AnalysisResult;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
@ -63,13 +54,6 @@ public class DeleteAnalysisResultSetAction extends AbstractAction {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
//ExplorerManager em = DirectoryTreeTopComponent.findInstance().getExplorerManager();
|
||||
//Node[] selectedNode = em.getSelectedNodes();
|
||||
//Children c = selectedNode[0].getChildren();
|
||||
//for (Node next : c.getNodes()) {
|
||||
//}
|
||||
|
||||
|
||||
SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground() throws Exception {
|
||||
@ -87,8 +71,7 @@ public class DeleteAnalysisResultSetAction extends AbstractAction {
|
||||
}
|
||||
};
|
||||
|
||||
worker.execute();
|
||||
|
||||
worker.execute();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user