Merge branch 'LibrAlign' of https://dev.e-taxonomy.eu/git/taxeditor into LibrAlign
[taxeditor.git] / eu.etaxonomy.taxeditor.molecular / src / main / java / eu / etaxonomy / taxeditor / molecular / handler / AlignmentEditorPasteHandler.java
index 590aab56cda513d4684b25da531f4949cf16aea3..98205803035aa38a307005ee86efc049a0a21c9d 100644 (file)
@@ -30,10 +30,11 @@ import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
  * @date 26.08.2015\r
  */\r
 public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHandler implements IElementUpdater {\r
-       private void pasteString(AlignmentArea area, int sequenceID, String content) {\r
+       private void pasteString(AlignmentArea area, String sequenceID, String content) {\r
                area.getActionProvider().deleteSelection();  // Overwrite selected tokens.\r
                area.getActionProvider().elongateSequence(sequenceID, area.getSelection().getCursorColumn());\r
 \r
+               @SuppressWarnings("unchecked")\r
                AlignmentModel<Object> alignmentModel = (AlignmentModel<Object>)area.getAlignmentModel();\r
                alignmentModel.insertTokensAt(sequenceID, area.getSelection().getCursorColumn(),\r
                                AlignmentModelUtils.charSequenceToTokenList(content, alignmentModel.getTokenSet(),\r
@@ -62,7 +63,7 @@ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHan
 \r
                        if (!lines.isEmpty()) { //TODO Can lines be empty? (Can an empty string "" be copied to the clipboard?)\r
                                if (selection.getCursorHeight() == 1) {  // If the consensus sequence is focused, this is the only possible case.\r
-                                       int sequenceID = focusedArea.getSequenceOrder().idByIndex(selection.getCursorRow());\r
+                                       String sequenceID = focusedArea.getSequenceOrder().idByIndex(selection.getCursorRow());\r
                                        if (lines.size() == 1) {\r
                                                pasteString(focusedArea, sequenceID, lines.get(0));\r
                                        }\r