From: gmungoc Date: Fri, 1 Mar 2019 09:59:24 +0000 (+0000) Subject: JAL-3140 update for change to SequenceI api X-Git-Tag: Release_2_11_0~17^2~92 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6084ed0c6da51ac6569320a33b7f4aa0ec523c80;p=jalview.git JAL-3140 update for change to SequenceI api --- diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index 1a227c5..f80bd4a 100644 --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@ -24,6 +24,7 @@ import jalview.analysis.AlignSeq; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; +import jalview.datamodel.ContiguousI; import jalview.datamodel.Range; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; @@ -526,8 +527,8 @@ public class EditCommand implements CommandI command.string[i] = sequence.getSequence(command.position, command.position + command.number); SequenceI oldds = sequence.getDatasetSequence(); - Range cutPositions = sequence.findPositions(command.position + 1, - command.position + command.number); + ContiguousI cutPositions = sequence.findPositions( + command.position + 1, command.position + command.number); boolean cutIsInternal = cutPositions != null && sequence.getStart() != cutPositions .getBegin() && sequence.getEnd() != cutPositions.getEnd(); @@ -763,9 +764,9 @@ public class EditCommand implements CommandI * EditCommand.PASTE, sequences, 0, alignment.getWidth(), alignment) ); * */ - - Range beforeEditedPositions = command.seqs[i].findPositions(1, start); - Range afterEditedPositions = command.seqs[i] + ContiguousI beforeEditedPositions = command.seqs[i].findPositions(1, + start); + ContiguousI afterEditedPositions = command.seqs[i] .findPositions(end + 1, command.seqs[i].getLength()); oldstring = command.seqs[i].getSequenceAsString();