{
public enum Action
{
- INSERT_GAP, DELETE_GAP, CUT, PASTE, REPLACE, INSERT_NUC
+ INSERT_GAP()
+ {
+ @Override
+ public Action getUndoAction()
+ {
+ return DELETE_GAP;
+ }
+ },
+ DELETE_GAP()
+ {
+ @Override
+ public Action getUndoAction()
+ {
+ return INSERT_GAP;
+ }
+ },
+ CUT()
+ {
+ @Override
+ public Action getUndoAction()
+ {
+ return PASTE;
+ }
+ },
+ PASTE()
+ {
+ @Override
+ public Action getUndoAction()
+ {
+ return CUT;
+ }
+ },
+ REPLACE
+ {
+ @Override
+ public Action getUndoAction()
+ {
+ return REPLACE;
+ }
+ },
+ INSERT_NUC
+ {
+ @Override
+ public Action getUndoAction()
+ {
+ return null;
+ }
+ };
+ public abstract Action getUndoAction();
};
private List<Edit> edits = new ArrayList<Edit>();
if (command.seqs[i].getLength() < 1)
{
// ie this sequence was deleted, we need to
- // read it to the alignment
+ // readd it to the alignment
if (command.alIndex[i] < command.al.getHeight())
{
List<SequenceI> sequences;
}
else
{
- throw new IllegalStateException("Can't undo edit action " + action);
+ System.err.println("Can't undo edit action " + action);
+ // throw new IllegalStateException("Can't undo edit action " +
+ // action);
}
}
}