From 6f9acb31a9f7c8571273a141583133358a6445ce Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 10 Jul 2015 06:13:01 +0100 Subject: [PATCH] JAL-1807 explicit imports (jalview.commands) --- src/jalview/commands/CommandI.java | 6 ++++-- src/jalview/commands/EditCommand.java | 17 ++++++++++------- src/jalview/commands/RemoveGapColCommand.java | 3 ++- src/jalview/commands/RemoveGapsCommand.java | 3 ++- src/jalview/commands/SlideSequencesCommand.java | 3 ++- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/jalview/commands/CommandI.java b/src/jalview/commands/CommandI.java index ea36d34..1679243 100644 --- a/src/jalview/commands/CommandI.java +++ b/src/jalview/commands/CommandI.java @@ -20,11 +20,13 @@ */ package jalview.commands; +import jalview.datamodel.AlignmentI; + public interface CommandI { - public void doCommand(jalview.datamodel.AlignmentI[] views); + public void doCommand(AlignmentI[] views); - public void undoCommand(jalview.datamodel.AlignmentI[] views); + public void undoCommand(AlignmentI[] views); public String getDescription(); diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index 2d3a8d8..e44068d 100644 --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@ -20,12 +20,15 @@ */ package jalview.commands; +import jalview.analysis.AlignSeq; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; +import jalview.schemes.ResidueProperties; +import jalview.util.Comparison; import jalview.util.ReverseListIterator; import jalview.util.StringUtils; @@ -641,7 +644,7 @@ public class EditCommand implements CommandI tmp.insert(command.position, command.string[i]); for (int s = 0; s < command.string[i].length; s++) { - if (jalview.schemes.ResidueProperties.aaIndex[command.string[i][s]] != 23) + if (ResidueProperties.aaIndex[command.string[i][s]] != 23) { if (!newDSNeeded) { @@ -680,8 +683,8 @@ public class EditCommand implements CommandI // make a new DS sequence // use new ds mechanism here ds = new Sequence(command.seqs[i].getName(), - jalview.analysis.AlignSeq.extractGaps( - jalview.util.Comparison.GapChars, + AlignSeq.extractGaps( + Comparison.GapChars, command.seqs[i].getSequenceAsString()), command.seqs[i].getStart(), command.seqs[i].getEnd()); ds.setDescription(command.seqs[i].getDescription()); @@ -731,16 +734,16 @@ public class EditCommand implements CommandI oldstring = command.seqs[i].getSequenceAsString(); tmp = new StringBuffer(oldstring.substring(0, start)); tmp.append(command.string[i]); - String nogaprep = jalview.analysis.AlignSeq.extractGaps( - jalview.util.Comparison.GapChars, new String( + String nogaprep = AlignSeq.extractGaps( + Comparison.GapChars, new String( command.string[i])); int ipos = command.seqs[i].findPosition(start) - command.seqs[i].getStart(); tmp.append(oldstring.substring(end)); command.seqs[i].setSequence(tmp.toString()); command.string[i] = oldstring.substring(start, end).toCharArray(); - String nogapold = jalview.analysis.AlignSeq.extractGaps( - jalview.util.Comparison.GapChars, new String( + String nogapold = AlignSeq.extractGaps( + Comparison.GapChars, new String( command.string[i])); if (!nogaprep.toLowerCase().equals(nogapold.toLowerCase())) { diff --git a/src/jalview/commands/RemoveGapColCommand.java b/src/jalview/commands/RemoveGapColCommand.java index 490dc4a..3e0023d 100644 --- a/src/jalview/commands/RemoveGapColCommand.java +++ b/src/jalview/commands/RemoveGapColCommand.java @@ -41,6 +41,7 @@ package jalview.commands; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; public class RemoveGapColCommand extends EditCommand { @@ -67,7 +68,7 @@ public class RemoveGapColCommand extends EditCommand { if (seqs[j].getLength() > i) { - if (!jalview.util.Comparison.isGap(seqs[j].getCharAt(i))) + if (!Comparison.isGap(seqs[j].getCharAt(i))) { if (delete) { diff --git a/src/jalview/commands/RemoveGapsCommand.java b/src/jalview/commands/RemoveGapsCommand.java index db1725b..3a485c8 100644 --- a/src/jalview/commands/RemoveGapsCommand.java +++ b/src/jalview/commands/RemoveGapsCommand.java @@ -41,6 +41,7 @@ package jalview.commands; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; public class RemoveGapsCommand extends EditCommand { @@ -92,7 +93,7 @@ public class RemoveGapsCommand extends EditCommand { delete = true; - if (!jalview.util.Comparison.isGap(sequence[j])) + if (!Comparison.isGap(sequence[j])) { if (delete) { diff --git a/src/jalview/commands/SlideSequencesCommand.java b/src/jalview/commands/SlideSequencesCommand.java index 8a27059..c5dd14e 100644 --- a/src/jalview/commands/SlideSequencesCommand.java +++ b/src/jalview/commands/SlideSequencesCommand.java @@ -21,6 +21,7 @@ package jalview.commands; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; public class SlideSequencesCommand extends EditCommand { @@ -38,7 +39,7 @@ public class SlideSequencesCommand extends EditCommand { for (j = 0; j < slideSize; j++) { - if (!jalview.util.Comparison.isGap(seqsLeft[i].getCharAt(j))) + if (!Comparison.isGap(seqsLeft[i].getCharAt(j))) { gapsInsertedBegin = true; break; -- 1.7.10.2