Revert "Improve add data source wizard comments"

This reverts commit a18f33383668aac5a465bf86d22a57a6eb022753.
This commit is contained in:
Richard Cordovano 2016-01-20 17:28:50 -05:00
parent f85a6f7ac7
commit fc6f972e54
4 changed files with 20 additions and 14 deletions

View File

@ -40,9 +40,11 @@ import org.sleuthkit.autopsy.ingest.IngestManager;
import org.sleuthkit.datamodel.Image; import org.sleuthkit.datamodel.Image;
/** /**
* An action that adds a data source to the current case. This action needs to * An action that adds a data source to the current case.
* be enabled and disabled as cases are opened and closed. Use *
* CallableSystemAction.get(AddImageAction.class).setEnabled() to do so. * RC: This action needs to be enabled and disabled as cases are opened and
* closed. Currently this is done using
* CallableSystemAction.get(AddImageAction.class).setEnabled().
*/ */
public final class AddImageAction extends CallableSystemAction implements Presenter.Toolbar { public final class AddImageAction extends CallableSystemAction implements Presenter.Toolbar {
@ -57,8 +59,8 @@ public final class AddImageAction extends CallableSystemAction implements Presen
* Constructs an action that adds a data source to the current case. * Constructs an action that adds a data source to the current case.
*/ */
public AddImageAction() { public AddImageAction() {
putValue(Action.NAME, NbBundle.getMessage(AddImageAction.class, "CTL_AddImage"));
cleanupSupport = new ChangeSupport(this); cleanupSupport = new ChangeSupport(this);
putValue(Action.NAME, NbBundle.getMessage(AddImageAction.class, "CTL_AddImage"));
toolbarButton = new JButton(); toolbarButton = new JButton();
toolbarButton.addActionListener(AddImageAction.this::actionPerformed); toolbarButton.addActionListener(AddImageAction.this::actionPerformed);
setEnabled(false); setEnabled(false);
@ -101,6 +103,9 @@ public final class AddImageAction extends CallableSystemAction implements Presen
* abstract CleanupTask class to call their cleanup methods (assuming * abstract CleanupTask class to call their cleanup methods (assuming
* they have not done an override of stateChanged), after which the * they have not done an override of stateChanged), after which the
* CleanupTasks are unregistered. * CleanupTasks are unregistered.
*
* RC: This is a convoluted and error-prone way to implement clean up.
* Fortunately, it is confined to this package.
*/ */
cleanupSupport.fireChange(); cleanupSupport.fireChange();
} }
@ -180,8 +185,13 @@ public final class AddImageAction extends CallableSystemAction implements Presen
* cleanUp method is called. Implementations should not override * cleanUp method is called. Implementations should not override
* stateChanged, and should not re-enable themselves after cleanUp is * stateChanged, and should not re-enable themselves after cleanUp is
* called. To stop cleanUp being called, call disable before the wizard is * called. To stop cleanUp being called, call disable before the wizard is
* dismissed. Also, instances must be constructed using a reference to an * dismissed.
* AddImageAction object because this is a non-static inner class. *
* Instances must be constructed using a reference to an AddImageAction
* object because this is a non-static inner class.
*
* RC: This is a convoluted and error-prone way to implement clean up.
* Fortunately, it is confined to this package.
*/ */
abstract class CleanupTask implements ChangeListener { abstract class CleanupTask implements ChangeListener {
@ -228,11 +238,6 @@ public final class AddImageAction extends CallableSystemAction implements Presen
} }
/**
* Is not used by Autopsy.
*
* @deprecated
*/
@Deprecated @Deprecated
public interface IndexImageTask { public interface IndexImageTask {

View File

@ -38,7 +38,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgress
final class AddImageWizardAddingProgressPanel implements WizardDescriptor.FinishablePanel<WizardDescriptor> { final class AddImageWizardAddingProgressPanel implements WizardDescriptor.FinishablePanel<WizardDescriptor> {
private final ChangeSupport changeSupport; private final ChangeSupport changeSupport;
private final DSPProgressMonitorImpl dspProgressMonitor; private final DSPProgressMonitorImpl dspProgressMonitor = new DSPProgressMonitorImpl();
private AddImageWizardAddingProgressVisual component; private AddImageWizardAddingProgressVisual component;
private boolean dataSourceAdded = false; private boolean dataSourceAdded = false;
@ -48,7 +48,6 @@ final class AddImageWizardAddingProgressPanel implements WizardDescriptor.Finish
*/ */
AddImageWizardAddingProgressPanel() { AddImageWizardAddingProgressPanel() {
changeSupport = new ChangeSupport(this); changeSupport = new ChangeSupport(this);
dspProgressMonitor = new DSPProgressMonitorImpl();
} }
/** /**

View File

@ -37,7 +37,7 @@ final class AddImageWizardChooseDataSourcePanel implements WizardDescriptor.Pane
private AddImageWizardChooseDataSourceVisual component; private AddImageWizardChooseDataSourceVisual component;
private final ChangeSupport changeSupport; private final ChangeSupport changeSupport;
private boolean nextButtonIsEnabled; private boolean nextButtonIsEnabled = false;
/** /**
* Constructs an instance of the first panel of the add data source wizard. * Constructs an instance of the first panel of the add data source wizard.

View File

@ -194,6 +194,8 @@ final class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<Wi
* while the user is doing the ingest module configuration. It is ok to * while the user is doing the ingest module configuration. It is ok to
* do this now because the back button is disabled for this wizard - the * do this now because the back button is disabled for this wizard - the
* user cannot go back to choose a different data source. * user cannot go back to choose a different data source.
*
* RC: Not sure why the cancel button is disabled.
*/ */
JButton cancel = new JButton(NbBundle.getMessage(this.getClass(), "AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text")); JButton cancel = new JButton(NbBundle.getMessage(this.getClass(), "AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text"));
cancel.setEnabled(false); cancel.setEnabled(false);