javatidy
[jalview.git] / src / jalview / commands / EditCommand.java
index a8aa886..9321524 100644 (file)
@@ -1,18 +1,18 @@
 /*
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
- * 
+ *
  * This file is part of Jalview.
- * 
+ *
  * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License 
+ * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- * 
- * Jalview is distributed in the hope that it will be useful, but 
- * WITHOUT ANY WARRANTY; without even the implied warranty 
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * PURPOSE.  See the GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  */
 package jalview.commands;
@@ -22,24 +22,24 @@ import java.util.*;
 import jalview.datamodel.*;
 
 /**
- * 
+ *
  * <p>
  * Title: EditCommmand
  * </p>
- * 
+ *
  * <p>
  * Description: Essential information for performing undo and redo for cut/paste
  * insert/delete gap which can be stored in the HistoryList
  * </p>
- * 
+ *
  * <p>
  * Copyright: Copyright (c) 2006
  * </p>
- * 
+ *
  * <p>
  * Company: Dundee University
  * </p>
- * 
+ *
  * @author not attributable
  * @version 1.0
  */
@@ -54,7 +54,7 @@ public class EditCommand implements CommandI
   public static final int PASTE = 3;
 
   public static final int REPLACE = 4;
-  
+
   public static final int INSERT_NUC=5;
 
   Edit[] edits;
@@ -96,11 +96,13 @@ public class EditCommand implements CommandI
     performEdit(0, null);
   }
 
+  @Override
   final public String getDescription()
   {
     return description;
   }
 
+  @Override
   public int getSize()
   {
     return edits == null ? 0 : edits.length;
@@ -116,7 +118,7 @@ public class EditCommand implements CommandI
    * operation affects more alignment objects than the one referenced in al (for
    * example, cut or pasting whole sequences). Use the form with an additional
    * AlignmentI[] views parameter.
-   * 
+   *
    * @param command
    * @param seqs
    * @param position
@@ -133,7 +135,7 @@ public class EditCommand implements CommandI
   /**
    * append a new edit command with a set of alignment views that may be
    * operated on
-   * 
+   *
    * @param command
    * @param seqs
    * @param position
@@ -202,11 +204,13 @@ public class EditCommand implements CommandI
     }
   }
 
+  @Override
   final public void doCommand(AlignmentI[] views)
   {
     performEdit(0, views);
   }
 
+  @Override
   final public void undoCommand(AlignmentI[] views)
   {
     int e = 0, eSize = edits.length;
@@ -245,7 +249,7 @@ public class EditCommand implements CommandI
 
     adjustAnnotations(command, true, false, null);
   }
-//  
+//
 //  final void insertNuc(Edit command)
 //  {
 //
@@ -452,12 +456,12 @@ public class EditCommand implements CommandI
        * cut addHistoryItem(new EditCommand("Cut Sequences", EditCommand.CUT,
        * cut, sg.getStartRes(), sg.getEndRes()-sg.getStartRes()+1,
        * viewport.alignment));
-       * 
+       *
        */
       /**
        * then addHistoryItem(new EditCommand( "Add sequences",
        * EditCommand.PASTE, sequences, 0, alignment.getWidth(), alignment) );
-       * 
+       *
        */
       oldstring = command.seqs[i].getSequenceAsString();
       tmp = new StringBuffer(oldstring.substring(0, start));