From a207f4080b01543b48b80f6f3eb331b75b63bdc6 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 7 Oct 2015 22:35:09 +0100 Subject: [PATCH] JAL-1894 source formatting --- src/jalview/analysis/AlignmentUtils.java | 7 +++---- src/jalview/appletgui/AlignFrame.java | 3 +-- src/jalview/bin/JalviewLite.java | 3 +-- src/jalview/datamodel/Mapping.java | 3 +-- src/jalview/gui/AlignFrame.java | 1 - src/jalview/io/BioJsHTMLOutput.java | 13 ++++++------- src/jalview/io/FeaturesFile.java | 3 +-- src/jalview/io/JSONFile.java | 4 +--- src/jalview/jbgui/GStructureChooser.java | 2 +- .../json/binding/biojson/v1/ColourSchemeMapper.java | 1 + src/jalview/ws/DBRefFetcher.java | 9 ++++----- src/jalview/ws/uimodel/AlignAnalysisUIText.java | 1 - 12 files changed, 20 insertions(+), 30 deletions(-) diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 05e844c..898e4f7 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -228,8 +228,8 @@ public class AlignmentUtils * @param cdnaAlignment * @return */ - public static boolean mapProteinAlignmentToCdna(final AlignmentI proteinAlignment, - final AlignmentI cdnaAlignment) + public static boolean mapProteinAlignmentToCdna( + final AlignmentI proteinAlignment, final AlignmentI cdnaAlignment) { if (proteinAlignment == null || cdnaAlignment == null) { @@ -429,8 +429,7 @@ public class AlignmentUtils { return null; } - if (!translatesAs(cdnaSeqChars, startOffset, - aaSeqChars)) + if (!translatesAs(cdnaSeqChars, startOffset, aaSeqChars)) { return null; } diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index fce74e3..80ab5d5 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -2081,8 +2081,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, infoPanel .add(new Label(MessageManager.getString("warn.delete_all"))); - final JVDialog dialog = new JVDialog(this, title, true, 400, - 200); + final JVDialog dialog = new JVDialog(this, title, true, 400, 200); dialog.setMainPanel(infoPanel); dialog.ok.setLabel(MessageManager.getString("action.ok")); dialog.cancel.setLabel(MessageManager.getString("action.cancel")); diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index efb77e7..36a7cff 100644 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -2404,8 +2404,7 @@ public class JalviewLite extends Applet implements return rtn; } catch (Exception ex) { - System.out.println("Exception checking resources: " + f + " " - + ex); + System.out.println("Exception checking resources: " + f + " " + ex); return false; } } diff --git a/src/jalview/datamodel/Mapping.java b/src/jalview/datamodel/Mapping.java index ea08d97..6c619ce 100644 --- a/src/jalview/datamodel/Mapping.java +++ b/src/jalview/datamodel/Mapping.java @@ -253,8 +253,7 @@ public class Mapping * allow for offset e.g. treat pos 8 as 2 if sequence starts at 7 */ int truePos = sequencePos - (start - 1); - while (alignedBases < truePos - && alignedColumn < alignedSeq.length) + while (alignedBases < truePos && alignedColumn < alignedSeq.length) { if (alignedSeq[alignedColumn++] != gap) { diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index eda4a1c..7908b0c 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -2415,7 +2415,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } } - /** * DOCUMENT ME! * diff --git a/src/jalview/io/BioJsHTMLOutput.java b/src/jalview/io/BioJsHTMLOutput.java index 1f4c53a..ac29d8e 100644 --- a/src/jalview/io/BioJsHTMLOutput.java +++ b/src/jalview/io/BioJsHTMLOutput.java @@ -115,16 +115,15 @@ public class BioJsHTMLOutput AlignmentExportData exportData = jalview.gui.AlignFrame .getAlignmentForExport(JSONFile.FILE_DESC, ap.getAlignViewport(), exportSettings); - String bioJSON = new FormatAdapter(ap, - exportData.getSettings()).formatSequences(JSONFile.FILE_DESC, - exportData.getAlignment(), exportData.getOmitHidden(), - exportData.getStartEndPostions(), ap.getAlignViewport() - .getColumnSelection()); + String bioJSON = new FormatAdapter(ap, exportData.getSettings()) + .formatSequences(JSONFile.FILE_DESC, exportData + .getAlignment(), exportData.getOmitHidden(), + exportData.getStartEndPostions(), ap + .getAlignViewport().getColumnSelection()); String bioJSTemplateString = getBioJsTemplateAsString(); String generatedBioJsWithJalviewAlignmentAsJson = bioJSTemplateString - .replaceAll("#sequenceData#", bioJSON) - .toString(); + .replaceAll("#sequenceData#", bioJSON).toString(); PrintWriter out = new java.io.PrintWriter(new java.io.FileWriter( outputFile)); diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index d0960e7..aa5583c 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -123,8 +123,7 @@ public class FeaturesFile extends AlignFile * - process html strings into plain text * @return true if features were added */ - public boolean parse(AlignmentI align, Map colours, - boolean removeHTML) + public boolean parse(AlignmentI align, Map colours, boolean removeHTML) { return parse(align, colours, null, removeHTML, false); } diff --git a/src/jalview/io/JSONFile.java b/src/jalview/io/JSONFile.java index 3ac4aa7..aece7a6 100644 --- a/src/jalview/io/JSONFile.java +++ b/src/jalview/io/JSONFile.java @@ -439,7 +439,6 @@ public class JSONFile extends AlignFile implements ComplexAlignFile seqMap.put(seqUniqueId, seq); } - parseFeatures(jsonSeqArray); for (Iterator seqGrpIter = seqGrpJsonArray.iterator(); seqGrpIter @@ -478,8 +477,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile } } SequenceGroup seqGrp = new SequenceGroup(grpSeqs, grpName, null, - displayBoxes, displayText, colourText, - startRes, endRes); + displayBoxes, displayText, colourText, startRes, endRes); seqGrp.cs = ColourSchemeMapper.getJalviewColourScheme(colourScheme, seqGrp); seqGrp.setShowNonconserved(showNonconserved); diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 25924f0..67b3a20 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -296,7 +296,7 @@ public abstract class GStructureChooser extends JPanel implements { if (btn_view.isEnabled()) { - btn_view.requestFocus(); + btn_view.requestFocus(); } else { diff --git a/src/jalview/json/binding/biojson/v1/ColourSchemeMapper.java b/src/jalview/json/binding/biojson/v1/ColourSchemeMapper.java index aeab34c..b3422ab 100644 --- a/src/jalview/json/binding/biojson/v1/ColourSchemeMapper.java +++ b/src/jalview/json/binding/biojson/v1/ColourSchemeMapper.java @@ -58,6 +58,7 @@ public class ColourSchemeMapper csPID = new PIDColourScheme(); csBlosum62 = new Blosum62ColourScheme(); } + public static ColourSchemeI getJalviewColourScheme( String colourSchemeName, AnnotatedCollectionI annotCol) { diff --git a/src/jalview/ws/DBRefFetcher.java b/src/jalview/ws/DBRefFetcher.java index 03632c8..d531fea 100644 --- a/src/jalview/ws/DBRefFetcher.java +++ b/src/jalview/ws/DBRefFetcher.java @@ -622,11 +622,10 @@ public class DBRefFetcher implements Runnable // absStart = 0; // create valid mapping between matching region of local sequence and // the mapped sequence - mp = new Mapping(null, new int[] { - sequenceStart + absStart, - sequenceStart + absStart + entrySeq.length() - 1 }, - new int[] { entry.getStart(), - entry.getStart() + entrySeq.length() - 1 }, 1, 1); + mp = new Mapping(null, new int[] { sequenceStart + absStart, + sequenceStart + absStart + entrySeq.length() - 1 }, new int[] + { entry.getStart(), entry.getStart() + entrySeq.length() - 1 }, + 1, 1); updateRefFrame = false; // mapping is based on current start/end so // don't modify start and end } diff --git a/src/jalview/ws/uimodel/AlignAnalysisUIText.java b/src/jalview/ws/uimodel/AlignAnalysisUIText.java index 6514d98..9518eaa 100644 --- a/src/jalview/ws/uimodel/AlignAnalysisUIText.java +++ b/src/jalview/ws/uimodel/AlignAnalysisUIText.java @@ -20,7 +20,6 @@ */ package jalview.ws.uimodel; - public class AlignAnalysisUIText { -- 1.7.10.2