JAL-3775 Eclipse re-formatting commit
authorBen Soares <b.soares@dundee.ac.uk>
Fri, 13 Nov 2020 18:09:28 +0000 (18:09 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Fri, 13 Nov 2020 18:09:28 +0000 (18:09 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/Desktop.java
src/jalview/gui/Preferences.java
src/jalview/io/BackupFiles.java
src/jalview/jbgui/GPreferences.java
src/jalview/project/Jalview2XML.java

index e886ad0..5370437 100644 (file)
@@ -1079,9 +1079,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
         if (fileObject == null)
         {
 
-          DataSourceType protocol = HttpUtils.startsWithHttpOrHttps(fileName)
-                  ? DataSourceType.URL
-                  : DataSourceType.FILE;
+          DataSourceType protocol = HttpUtils.startsWithHttpOrHttps(
+                  fileName) ? DataSourceType.URL : DataSourceType.FILE;
           newframe = loader.LoadFileWaitTillLoaded(fileName, protocol,
                   currentFileFormat);
         }
index 67d273c..21092e6 100644 (file)
@@ -395,11 +395,9 @@ public class Desktop extends jalview.jbgui.GDesktop
       }
     });
 
-    boolean selmemusage = Cache.getDefault("SHOW_MEMUSAGE",
-            false);
+    boolean selmemusage = Cache.getDefault("SHOW_MEMUSAGE", false);
 
-    boolean showjconsole = Cache.getDefault("SHOW_JAVA_CONSOLE",
-            false);
+    boolean showjconsole = Cache.getDefault("SHOW_JAVA_CONSOLE", false);
     desktop = new MyDesktopPane(selmemusage);
 
     showMemusage.setSelected(selmemusage);
@@ -558,10 +556,10 @@ public class Desktop extends jalview.jbgui.GDesktop
             .getStructureSelectionManager(this);
     if (Cache.getDefault(Preferences.ADD_SS_ANN, true))
     {
-      ssm.setAddTempFacAnnot(Cache
-              .getDefault(Preferences.ADD_TEMPFACT_ANN, true));
-      ssm.setProcessSecondaryStructure(Cache
-              .getDefault(Preferences.STRUCT_FROM_PDB, true));
+      ssm.setAddTempFacAnnot(
+              Cache.getDefault(Preferences.ADD_TEMPFACT_ANN, true));
+      ssm.setProcessSecondaryStructure(
+              Cache.getDefault(Preferences.STRUCT_FROM_PDB, true));
       ssm.setSecStructServices(
               Cache.getDefault(Preferences.USE_RNAVIEW, true));
     }
@@ -610,7 +608,7 @@ public class Desktop extends jalview.jbgui.GDesktop
         }
       }
     }).start();
-    
+
   }
 
   @Override
@@ -655,10 +653,8 @@ public class Desktop extends jalview.jbgui.GDesktop
     Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
     String x = Cache.getProperty(windowName + "SCREEN_X");
     String y = Cache.getProperty(windowName + "SCREEN_Y");
-    String width = Cache
-            .getProperty(windowName + "SCREEN_WIDTH");
-    String height = Cache
-            .getProperty(windowName + "SCREEN_HEIGHT");
+    String width = Cache.getProperty(windowName + "SCREEN_WIDTH");
+    String height = Cache.getProperty(windowName + "SCREEN_HEIGHT");
     if ((x != null) && (y != null) && (width != null) && (height != null))
     {
       int ix = Integer.parseInt(x), iy = Integer.parseInt(y),
@@ -668,10 +664,10 @@ public class Desktop extends jalview.jbgui.GDesktop
         // attempt #1 - try to cope with change in screen geometry - this
         // version doesn't preserve original jv aspect ratio.
         // take ratio of current screen size vs original screen size.
-        double sw = ((1f * screenSize.width) / (1f * Integer.parseInt(
-                Cache.getProperty("SCREENGEOMETRY_WIDTH"))));
-        double sh = ((1f * screenSize.height) / (1f * Integer.parseInt(
-                Cache.getProperty("SCREENGEOMETRY_HEIGHT"))));
+        double sw = ((1f * screenSize.width) / (1f * Integer
+                .parseInt(Cache.getProperty("SCREENGEOMETRY_WIDTH"))));
+        double sh = ((1f * screenSize.height) / (1f * Integer
+                .parseInt(Cache.getProperty("SCREENGEOMETRY_HEIGHT"))));
         // rescale the bounds depending upon the current screen geometry.
         ix = (int) (ix * sw);
         iw = (int) (iw * sw);
@@ -962,8 +958,8 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   /**
-   * Add key bindings to a JInternalFrame so that Ctrl-W and Cmd-W will close the
-   * window
+   * Add key bindings to a JInternalFrame so that Ctrl-W and Cmd-W will close
+   * the window
    * 
    * @param frame
    */
@@ -1103,8 +1099,9 @@ public class Desktop extends jalview.jbgui.GDesktop
   public void inputLocalFileMenuItem_actionPerformed(AlignViewport viewport)
   {
     String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT");
-    JalviewFileChooser chooser = JalviewFileChooser
-            .forRead(Cache.getProperty("LAST_DIRECTORY"), fileFormat, BackupFiles.getEnabled());
+    JalviewFileChooser chooser = JalviewFileChooser.forRead(
+            Cache.getProperty("LAST_DIRECTORY"), fileFormat,
+            BackupFiles.getEnabled());
 
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle(
@@ -1290,10 +1287,8 @@ public class Desktop extends jalview.jbgui.GDesktop
   public void quit()
   {
     Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
-    Cache.setProperty("SCREENGEOMETRY_WIDTH",
-            screen.width + "");
-    Cache.setProperty("SCREENGEOMETRY_HEIGHT",
-            screen.height + "");
+    Cache.setProperty("SCREENGEOMETRY_WIDTH", screen.width + "");
+    Cache.setProperty("SCREENGEOMETRY_HEIGHT", screen.height + "");
     storeLastKnownDimensions("", new Rectangle(getBounds().x, getBounds().y,
             getWidth(), getHeight()));
 
@@ -1324,9 +1319,9 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   private void storeLastKnownDimensions(String string, Rectangle jc)
   {
-    Cache.log.debug("Storing last known dimensions for "
-            + string + ": x:" + jc.x + " y:" + jc.y + " width:" + jc.width
-            + " height:" + jc.height);
+    Cache.log.debug("Storing last known dimensions for " + string + ": x:"
+            + jc.x + " y:" + jc.y + " width:" + jc.width + " height:"
+            + jc.height);
 
     Cache.setProperty(string + "SCREEN_X", jc.x + "");
     Cache.setProperty(string + "SCREEN_Y", jc.y + "");
@@ -1681,16 +1676,17 @@ public class Desktop extends jalview.jbgui.GDesktop
           setProgressBar(MessageManager.formatMessage(
                   "label.saving_jalview_project", new Object[]
                   { chosenFile.getName() }), chosenFile.hashCode());
-          Cache.setProperty("LAST_DIRECTORY",
-                  chosenFile.getParent());
+          Cache.setProperty("LAST_DIRECTORY", chosenFile.getParent());
           // TODO catch and handle errors for savestate
           // TODO prevent user from messing with the Desktop whilst we're saving
           try
           {
-               boolean doBackup = BackupFiles.getEnabled();
-            BackupFiles backupfiles = doBackup ? new BackupFiles(chosenFile) : null;
+            boolean doBackup = BackupFiles.getEnabled();
+            BackupFiles backupfiles = doBackup ? new BackupFiles(chosenFile)
+                    : null;
 
-            new Jalview2XML().saveState(doBackup ? backupfiles.getTempFile() : chosenFile);
+            new Jalview2XML().saveState(
+                    doBackup ? backupfiles.getTempFile() : chosenFile);
 
             if (doBackup)
             {
@@ -1716,7 +1712,7 @@ public class Desktop extends jalview.jbgui.GDesktop
           setProgressBar(null, chosenFile.hashCode());
         }
       }).start();
-      }
+    }
   }
 
   @Override
@@ -1747,8 +1743,10 @@ public class Desktop extends jalview.jbgui.GDesktop
         "Jalview Project (old)" };
     JalviewFileChooser chooser = new JalviewFileChooser(
             Cache.getProperty("LAST_DIRECTORY"), suffix, desc,
-            "Jalview Project", true, BackupFiles.getEnabled()); // last two booleans: allFiles,
-                                            // allowBackupFiles
+            "Jalview Project", true, BackupFiles.getEnabled()); // last two
+                                                                // booleans:
+                                                                // allFiles,
+    // allowBackupFiles
     chooser.setFileView(new JalviewFileView());
     chooser.setDialogTitle(MessageManager.getString("label.restore_state"));
     chooser.setResponseHandler(0, new Runnable()
@@ -1765,29 +1763,30 @@ public class Desktop extends jalview.jbgui.GDesktop
           @Override
           public void run()
           {
-               try 
+            try
             {
               new Jalview2XML().loadJalviewAlign(selectedFile);
             } catch (OutOfMemoryError oom)
-               {
-                 new OOMWarning("Whilst loading project from " + choice, oom);
-               } catch (Exception ex)
-               {
-                 Cache.log.error(
-                         "Problems whilst loading project from " + choice, ex);
-                 JvOptionPane.showMessageDialog(Desktop.desktop,
-                         MessageManager.formatMessage(
-                                 "label.error_whilst_loading_project_from",
-                               new Object[]
-                                   { choice }),
-                         MessageManager.getString("label.couldnt_load_project"),
-                         JvOptionPane.WARNING_MESSAGE);
-               }
+            {
+              new OOMWarning("Whilst loading project from " + choice, oom);
+            } catch (Exception ex)
+            {
+              Cache.log.error(
+                      "Problems whilst loading project from " + choice, ex);
+              JvOptionPane.showMessageDialog(Desktop.desktop,
+                      MessageManager.formatMessage(
+                              "label.error_whilst_loading_project_from",
+                              new Object[]
+                              { choice }),
+                      MessageManager
+                              .getString("label.couldnt_load_project"),
+                      JvOptionPane.WARNING_MESSAGE);
+            }
           }
         }, "Project Loader").start();
       }
     });
-    
+
     chooser.showOpenDialog(this);
   }
 
@@ -1976,9 +1975,7 @@ public class Desktop extends jalview.jbgui.GDesktop
 
     // FIXME: ideally should use UI interface API
     FeatureSettings viewFeatureSettings = (af.featureSettings != null
-            && af.featureSettings.isOpen())
-            ? af.featureSettings
-            : null;
+            && af.featureSettings.isOpen()) ? af.featureSettings : null;
     Rectangle fsBounds = af.getFeatureSettingsGeometry();
     for (int i = 0; i < size; i++)
     {
@@ -2011,7 +2008,8 @@ public class Desktop extends jalview.jbgui.GDesktop
 
       addInternalFrame(newaf, af.getTitle(), AlignFrame.DEFAULT_WIDTH,
               AlignFrame.DEFAULT_HEIGHT);
-      // and materialise a new feature settings dialog instance for the new alignframe
+      // and materialise a new feature settings dialog instance for the new
+      // alignframe
       // (closes the old as if 'OK' was pressed)
       if (ap == af.alignPanel && newaf.featureSettings != null
               && newaf.featureSettings.isOpen()
@@ -2029,9 +2027,9 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   /**
    * Gather expanded views (separate AlignFrame's) with the same sequence set
-   * identifier back in to this frame as additional views, and close the expanded
-   * views. Note the expanded frames may themselves have multiple views. We take
-   * the lot.
+   * identifier back in to this frame as additional views, and close the
+   * expanded views. Note the expanded frames may themselves have multiple
+   * views. We take the lot.
    * 
    * @param source
    */
@@ -2083,8 +2081,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     }
 
     // refresh the feature setting UI for the source frame if it exists
-    if (source.featureSettings != null
-            && source.featureSettings.isOpen())
+    if (source.featureSettings != null && source.featureSettings.isOpen())
     {
       source.showFeatureSettingsUI();
     }
@@ -2189,12 +2186,12 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   /**
    * Proxy class for JDesktopPane which optionally displays the current memory
-   * usage and highlights the desktop area with a red bar if free memory runs low.
+   * usage and highlights the desktop area with a red bar if free memory runs
+   * low.
    * 
    * @author AMW
    */
-  public class MyDesktopPane extends JDesktopPane
-          implements Runnable
+  public class MyDesktopPane extends JDesktopPane implements Runnable
   {
     private static final float ONE_MB = 1048576f;
 
@@ -2431,14 +2428,17 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   /**
-   * Bind Ctrl/Cmd-Q to Quit - for reset as Groovy Console takes over this binding
-   * when opened
+   * Bind Ctrl/Cmd-Q to Quit - for reset as Groovy Console takes over this
+   * binding when opened
    */
   protected void addQuitHandler()
   {
-    getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
-            .put(KeyStroke.getKeyStroke(KeyEvent.VK_Q,
-                    jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()),
+    getRootPane()
+            .getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
+                    KeyStroke
+                            .getKeyStroke(KeyEvent.VK_Q,
+                                    jalview.util.ShortcutKeyMaskExWrapper
+                                            .getMenuShortcutKeyMaskEx()),
                     "Quit");
     getRootPane().getActionMap().put("Quit", new AbstractAction()
     {
@@ -2567,8 +2567,9 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   /**
-   * This will return the first AlignFrame holding the given viewport instance. It
-   * will break if there are more than one AlignFrames viewing a particular av.
+   * This will return the first AlignFrame holding the given viewport instance.
+   * It will break if there are more than one AlignFrames viewing a particular
+   * av.
    * 
    * @param viewport
    * @return alignFrame for viewport
@@ -2945,8 +2946,8 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   /**
    * Explode the views in the given SplitFrame into separate SplitFrame windows.
-   * This respects (remembers) any previous 'exploded geometry' i.e. the size and
-   * location last time the view was expanded (if any). However it does not
+   * This respects (remembers) any previous 'exploded geometry' i.e. the size
+   * and location last time the view was expanded (if any). However it does not
    * remember the split pane divider location - this is set to match the
    * 'exploding' frame.
    * 
@@ -3117,7 +3118,8 @@ public class Desktop extends jalview.jbgui.GDesktop
           Transferable t) throws Exception
   {
 
-    // BH 2018 changed List<String> to List<Object> to allow for File from SwingJS
+    // BH 2018 changed List<String> to List<Object> to allow for File from
+    // SwingJS
 
     // DataFlavor[] flavors = t.getTransferDataFlavors();
     // for (int i = 0; i < flavors.length; i++) {
@@ -3129,7 +3131,8 @@ public class Desktop extends jalview.jbgui.GDesktop
     // byte[] data = getDroppedFileBytes(file);
     // fileName.setText(file.getName() + " - " + data.length + " " +
     // evt.getLocation());
-    // JTextArea target = (JTextArea) ((DropTarget) evt.getSource()).getComponent();
+    // JTextArea target = (JTextArea) ((DropTarget)
+    // evt.getSource()).getComponent();
     // target.setText(new String(data));
     // }
     // dtde.dropComplete(true);
@@ -3329,10 +3332,10 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   /**
-   * Answers a (possibly empty) list of any structure viewer frames (currently for
-   * either Jmol or Chimera) which are currently open. This may optionally be
-   * restricted to viewers of a specified class, or viewers linked to a specified
-   * alignment panel.
+   * Answers a (possibly empty) list of any structure viewer frames (currently
+   * for either Jmol or Chimera) which are currently open. This may optionally
+   * be restricted to viewers of a specified class, or viewers linked to a
+   * specified alignment panel.
    * 
    * @param apanel
    *          if not null, only return viewers linked to this panel
index 0e04117..6972657 100755 (executable)
@@ -374,12 +374,10 @@ public class Preferences extends GPreferences
     /*
      * Set overview panel defaults
      */
-    gapColour.setBackground(
-            Cache.getDefaultColour(GAP_COLOUR,
-                    jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_GAP));
-    hiddenColour.setBackground(
-            Cache.getDefaultColour(HIDDEN_COLOUR,
-                    jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN));
+    gapColour.setBackground(Cache.getDefaultColour(GAP_COLOUR,
+            jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_GAP));
+    hiddenColour.setBackground(Cache.getDefaultColour(HIDDEN_COLOUR,
+            jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN));
     useLegacyGap.setSelected(Cache.getDefault(USE_LEGACY_GAP, false));
     gapLabel.setEnabled(!useLegacyGap.isSelected());
     gapColour.setEnabled(!useLegacyGap.isSelected());
@@ -402,7 +400,8 @@ public class Preferences extends GPreferences
      * set choice of structure viewer, and path if saved as a preference;
      * default to Jmol (first choice) if an unexpected value is found
      */
-    String viewerType = Cache.getDefault(STRUCTURE_DISPLAY, ViewerType.JMOL.name());
+    String viewerType = Cache.getDefault(STRUCTURE_DISPLAY,
+            ViewerType.JMOL.name());
     structViewer.setSelectedItem(viewerType);
     String viewerPath = "";
     ViewerType type = null;
@@ -438,10 +437,11 @@ public class Preferences extends GPreferences
       {
         if (validateViewerPath())
         {
-          Cache.setProperty(structViewer.getSelectedItem()
-                  .equals(ViewerType.CHIMERAX.name())
-                  ? CHIMERAX_PATH
-                  : CHIMERA_PATH, structureViewerPath.getText());
+          Cache.setProperty(
+                  structViewer.getSelectedItem().equals(
+                          ViewerType.CHIMERAX.name()) ? CHIMERAX_PATH
+                                  : CHIMERA_PATH,
+                  structureViewerPath.getText());
         }
       }
     });
@@ -655,8 +655,7 @@ public class Preferences extends GPreferences
 
     annotations_actionPerformed(null); // update the display of the annotation
                                        // settings
-    
-    
+
     /*
      * Set Backups tab defaults
      */
@@ -676,7 +675,7 @@ public class Preferences extends GPreferences
     comboBox.addItem(promptEachTimeOpt);
     comboBox.addItem(lineArtOpt);
     comboBox.addItem(textOpt);
-    
+
     /*
      * JalviewJS doesn't support Lineart so force it to Text
      */
@@ -827,8 +826,7 @@ public class Preferences extends GPreferences
             Boolean.toString(structFromPdb.isSelected()));
     String viewer = structViewer.getSelectedItem().toString();
     String viewerPath = structureViewerPath.getText();
-    Cache.applicationProperties.setProperty(STRUCTURE_DISPLAY,
-            viewer);
+    Cache.applicationProperties.setProperty(STRUCTURE_DISPLAY, viewer);
     if (viewer.equals(ViewerType.CHIMERA.name()))
     {
       Cache.setOrRemove(CHIMERA_PATH, viewerPath);
@@ -959,16 +957,16 @@ public class Preferences extends GPreferences
     Cache.applicationProperties.setProperty(BackupFiles.ENABLED,
             Boolean.toString(enableBackupFiles.isSelected()));
     int preset = getComboIntStringKey(backupfilesPresetsCombo);
-    Cache.applicationProperties.setProperty(BackupFiles.NS + "_PRESET", Integer.toString(preset));
+    Cache.applicationProperties.setProperty(BackupFiles.NS + "_PRESET",
+            Integer.toString(preset));
 
     if (preset == BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM)
     {
       BackupFilesPresetEntry customBFPE = getBackupfilesCurrentEntry();
       BackupFilesPresetEntry.backupfilesPresetEntriesValues.put(
               BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM, customBFPE);
-      Cache.applicationProperties
-              .setProperty(BackupFilesPresetEntry.CUSTOMCONFIG,
-                      customBFPE.toString());
+      Cache.applicationProperties.setProperty(
+              BackupFilesPresetEntry.CUSTOMCONFIG, customBFPE.toString());
     }
 
     BackupFilesPresetEntry savedBFPE = BackupFilesPresetEntry.backupfilesPresetEntriesValues
@@ -1278,8 +1276,7 @@ public class Preferences extends GPreferences
     if (!useLegacyGap.isSelected())
     {
       JalviewColourChooser.showColourChooser(this,
-              MessageManager.getString("label.select_gap_colour"),
-              gap);
+              MessageManager.getString("label.select_gap_colour"), gap);
     }
   }
 
@@ -1287,8 +1284,7 @@ public class Preferences extends GPreferences
   public void hiddenColour_actionPerformed(JPanel hidden)
   {
     JalviewColourChooser.showColourChooser(this,
-            MessageManager.getString("label.select_hidden_colour"),
-            hidden);
+            MessageManager.getString("label.select_hidden_colour"), hidden);
   }
 
   @Override
index 6e80578..2b6147f 100644 (file)
@@ -380,8 +380,8 @@ public class BackupFiles
 
                 boolean delete = confirmNewerDeleteFile(fileToBeDeleted,
                         replacementFile, true);
-                Cache.trace("BACKUPFILES "
-                        + (delete ? "confirmed" : "not") + " deleting file "
+                Cache.trace("BACKUPFILES " + (delete ? "confirmed" : "not")
+                        + " deleting file "
                         + fileToBeDeleted.getAbsolutePath()
                         + " which is newer than "
                         + replacementFile.getAbsolutePath());
@@ -460,8 +460,8 @@ public class BackupFiles
         // noMax == true means keep all backup files
         if ((!noMax) && bfTreeMap.size() >= max)
         {
-          Cache.trace("BACKUPFILES noMax: " + noMax + ", " + "max: "
-                  + max + ", " + "bfTreeMap.size(): " + bfTreeMap.size());
+          Cache.trace("BACKUPFILES noMax: " + noMax + ", " + "max: " + max
+                  + ", " + "bfTreeMap.size(): " + bfTreeMap.size());
           // need to delete some files to keep number of backups to designated
           // max.
           // Note that if the suffix is not numbered then do not delete any
@@ -898,8 +898,8 @@ public class BackupFiles
       // delete destination file - not usually necessary but Just In Case...
       Cache.trace("BACKUPFILES deleting " + newFile.getAbsolutePath());
       newFile.delete();
-      Cache.trace("BACKUPFILES moving " + oldFile.getAbsolutePath()
-              + " to " + newFile.getAbsolutePath());
+      Cache.trace("BACKUPFILES moving " + oldFile.getAbsolutePath() + " to "
+              + newFile.getAbsolutePath());
       Files.move(oldPath, newPath, StandardCopyOption.REPLACE_EXISTING);
       ret = true;
       Cache.trace("BACKUPFILES move seems to have succeeded");
index f1a94fc..38a4732 100755 (executable)
@@ -427,11 +427,11 @@ public class GPreferences extends JPanel
     tabbedPane.add(initConnectionsTab(),
             MessageManager.getString("label.connections"));
 
-       if (!Platform.isJS()) 
-       {
-         tabbedPane.add(initBackupsTab(), 
-                       MessageManager.getString("label.backups"));
-       }
+    if (!Platform.isJS())
+    {
+      tabbedPane.add(initBackupsTab(),
+              MessageManager.getString("label.backups"));
+    }
 
     tabbedPane.add(initLinksTab(),
             MessageManager.getString("label.urllinks"));
@@ -1693,11 +1693,13 @@ public class GPreferences extends JPanel
 
     ypos += lineSpacing;
     structureViewerPathLabel = new JLabel();
-    structureViewerPathLabel.setFont(LABEL_FONT);// new Font("SansSerif", 0, 11));
+    structureViewerPathLabel.setFont(LABEL_FONT);// new Font("SansSerif", 0,
+                                                 // 11));
     structureViewerPathLabel.setHorizontalAlignment(SwingConstants.LEFT);
     structureViewerPathLabel.setText(MessageManager
             .formatMessage("label.viewer_path", "Chimera(X)"));
-    structureViewerPathLabel.setBounds(new Rectangle(10, ypos, 170, height));
+    structureViewerPathLabel
+            .setBounds(new Rectangle(10, ypos, 170, height));
     structureViewerPathLabel.setEnabled(false);
     structureTab.add(structureViewerPathLabel);
 
@@ -1755,14 +1757,14 @@ public class GPreferences extends JPanel
     /*
      * hide Chimera options in JalviewJS
      */
-    if (Platform.isJS()) 
+    if (Platform.isJS())
     {
       structureViewerPathLabel.setVisible(false);
       structureViewerPath.setVisible(false);
       viewerLabel.setVisible(false);
       structViewer.setVisible(false);
     }
-    
+
     return structureTab;
   }
 
@@ -2139,13 +2141,13 @@ public class GPreferences extends JPanel
     visualTab.add(fontNameCB);
     visualTab.add(fontSizeCB);
     visualTab.add(fontStyleCB);
-    
+
     if (Platform.isJS())
     {
       startupCheckbox.setVisible(false);
       startupFileTextfield.setVisible(false);
     }
-    
+
     return visualTab;
   }
 
@@ -2157,8 +2159,8 @@ public class GPreferences extends JPanel
   {
     BackupFilesPresetEntry savedPreset = BackupFilesPresetEntry
             .getSavedBackupEntry();
-    enableBackupFiles
-            .setSelected(Cache.getDefault(BackupFiles.ENABLED, !Platform.isJS()));
+    enableBackupFiles.setSelected(
+            Cache.getDefault(BackupFiles.ENABLED, !Platform.isJS()));
 
     BackupFilesPresetEntry backupfilesCustomEntry = BackupFilesPresetEntry
             .createBackupFilesPresetEntry(Cache
@@ -2235,7 +2237,6 @@ public class GPreferences extends JPanel
       }
     });
 
-
     // enable checkbox 1 col
     gbc.gridwidth = 1;
     gbc.gridheight = 1;
@@ -2308,8 +2309,8 @@ public class GPreferences extends JPanel
     presetsComboLabel = new JLabel(title + ":");
     presetsPanel.add(presetsComboLabel, gbc);
 
-    List<Object> entries = Arrays
-            .asList((Object[]) BackupFilesPresetEntry.backupfilesPresetEntries);
+    List<Object> entries = Arrays.asList(
+            (Object[]) BackupFilesPresetEntry.backupfilesPresetEntries);
     List<String> tooltips = Arrays.asList(
             BackupFilesPresetEntry.backupfilesPresetEntryDescriptions);
     backupfilesPresetsCombo = JvSwingUtils.buildComboWithTooltips(entries,
@@ -2336,7 +2337,8 @@ public class GPreferences extends JPanel
         {
           if (customiseCheckbox.isSelected())
           {
-            // got here by clicking on customiseCheckbox so don't change the values
+            // got here by clicking on customiseCheckbox so don't change the
+            // values
             backupfilesCustomOptionsSetEnabled();
           }
           else
@@ -2415,13 +2417,11 @@ public class GPreferences extends JPanel
 
   private JPanel initBackupsTabFilenameExamplesPanel()
   {
-    String title = MessageManager
-            .getString("label.scheme_examples");
+    String title = MessageManager.getString("label.scheme_examples");
     TitledBorder tb = new TitledBorder(title);
     exampleFilesPanel.setBorder(tb);
     exampleFilesPanel.setLayout(new GridBagLayout());
 
-
     backupfilesExampleLabel.setEditable(false);
     backupfilesExampleLabel
             .setBackground(exampleFilesPanel.getBackground());
@@ -2482,8 +2482,7 @@ public class GPreferences extends JPanel
   }
 
   protected void setComboIntStringKey(
-          JComboBox<Object> backupfilesPresetsCombo2,
-          int key)
+          JComboBox<Object> backupfilesPresetsCombo2, int key)
   {
     for (int i = 0; i < backupfilesPresetsCombo2.getItemCount(); i++)
     {
@@ -2753,9 +2752,8 @@ public class GPreferences extends JPanel
 
     JPanel jp = new JPanel();
     jp.setLayout(new FlowLayout());
-    oldBackupFilesLabel
-            .setText(MessageManager
-                    .getString("label.autodelete_old_backup_files"));
+    oldBackupFilesLabel.setText(
+            MessageManager.getString("label.autodelete_old_backup_files"));
     oldBackupFilesLabel.setFont(LABEL_FONT);
     oldBackupFilesLabel.setHorizontalAlignment(SwingConstants.LEFT);
     jp.add(oldBackupFilesLabel);
@@ -2915,7 +2913,8 @@ public class GPreferences extends JPanel
 
     }
 
-    // add some extra empty lines to pad out the example files box. ugh, please tell
+    // add some extra empty lines to pad out the example files box. ugh, please
+    // tell
     // me how to do this better
     int remainingLines = lowersurround + uppersurround + 1 - lineNumber;
     if (remainingLines > 0)
@@ -2994,8 +2993,7 @@ public class GPreferences extends JPanel
   private void backupfilesKeepAllSetEnabled(boolean tryEnabled)
   {
     boolean enabled = tryEnabled && enableBackupFiles.isSelected()
-            && customiseCheckbox.isSelected()
-            && suffixTemplate.getText()
+            && customiseCheckbox.isSelected() && suffixTemplate.getText()
                     .indexOf(BackupFiles.NUM_PLACEHOLDER) > -1;
     keepfilesPanel.setEnabled(enabled);
     backupfilesKeepAll.setEnabled(enabled);
@@ -3320,4 +3318,3 @@ public class GPreferences extends JPanel
 
   }
 }
-
index aa4cd6c..64b3a9c 100644 (file)
@@ -29,8 +29,6 @@ import java.awt.Font;
 import java.awt.Rectangle;
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -109,7 +107,6 @@ import jalview.gui.AlignFrame;
 import jalview.gui.AlignViewport;
 import jalview.gui.AlignmentPanel;
 import jalview.gui.AppVarna;
-import jalview.gui.ChimeraViewFrame;
 import jalview.gui.Desktop;
 import jalview.gui.JvOptionPane;
 import jalview.gui.OOMWarning;
@@ -761,8 +758,8 @@ public class Jalview2XML
       // create backupfiles object and get new temp filename destination
       boolean doBackup = BackupFiles.getEnabled();
       BackupFiles backupfiles = doBackup ? new BackupFiles(jarFile) : null;
-      FileOutputStream fos = new FileOutputStream(doBackup ? 
-              backupfiles.getTempFilePath() : jarFile);
+      FileOutputStream fos = new FileOutputStream(
+              doBackup ? backupfiles.getTempFilePath() : jarFile);
 
       JarOutputStream jout = new JarOutputStream(fos);
       List<AlignFrame> frames = new ArrayList<>();
@@ -1092,8 +1089,8 @@ public class Jalview2XML
             if (frames[f] instanceof StructureViewerBase)
             {
               StructureViewerBase viewFrame = (StructureViewerBase) frames[f];
-              matchedFile = saveStructureViewer(ap, jds, pdb, entry, viewIds,
-                      matchedFile, viewFrame);
+              matchedFile = saveStructureViewer(ap, jds, pdb, entry,
+                      viewIds, matchedFile, viewFrame);
               /*
                * Only store each structure viewer's state once in the project
                * jar. First time through only (storeDS==false)
@@ -1111,9 +1108,8 @@ public class Jalview2XML
                 }
                 else
                 {
-                  Cache.log.error("Failed to save viewer state for "
-                          +
-                          viewerType);
+                  Cache.log.error(
+                          "Failed to save viewer state for " + viewerType);
                 }
               }
             }
@@ -1357,9 +1353,8 @@ public class Jalview2XML
 
             if (colourScheme instanceof jalview.schemes.UserColourScheme)
             {
-              jGroup.setColour(
-                      setUserColourScheme(colourScheme, userColours,
-                              object));
+              jGroup.setColour(setUserColourScheme(colourScheme,
+                      userColours, object));
             }
             else
             {
@@ -1542,11 +1537,13 @@ public class Jalview2XML
              * save any filter for the feature type
              */
             FeatureMatcherSetI filter = fr.getFeatureFilter(featureType);
-            if (filter != null)  {
-              Iterator<FeatureMatcherI> filters = filter.getMatchers().iterator();
+            if (filter != null)
+            {
+              Iterator<FeatureMatcherI> filters = filter.getMatchers()
+                      .iterator();
               FeatureMatcherI firstFilter = filters.next();
-              setting.setMatcherSet(Jalview2XML.marshalFilter(
-                      firstFilter, filters, filter.isAnded()));
+              setting.setMatcherSet(Jalview2XML.marshalFilter(firstFilter,
+                      filters, filter.isAnded()));
             }
 
             /*
@@ -1595,8 +1592,7 @@ public class Jalview2XML
 
             setting.setDisplay(
                     av.getFeaturesDisplayed().isVisible(featureType));
-            float rorder = fr
-                    .getOrder(featureType);
+            float rorder = fr.getOrder(featureType);
             if (rorder > -1)
             {
               setting.setOrder(rorder);
@@ -1620,7 +1616,7 @@ public class Jalview2XML
           Group g = new Group();
           g.setName(grp);
           g.setDisplay(((Boolean) fr.checkGroupVisibility(grp, false))
-                          .booleanValue());
+                  .booleanValue());
           // fs.addGroup(g);
           fs.getGroup().add(g);
           groupsAdded.addElement(grp);
@@ -2377,7 +2373,8 @@ public class Jalview2XML
   {
     if (calcIdParam.getVersion().equals("1.0"))
     {
-      final String[] calcIds = calcIdParam.getServiceURL().toArray(new String[0]);
+      final String[] calcIds = calcIdParam.getServiceURL()
+              .toArray(new String[0]);
       Jws2Instance service = Jws2Discoverer.getDiscoverer()
               .getPreferredServiceFor(calcIds);
       if (service != null)
@@ -2538,8 +2535,8 @@ public class Jalview2XML
         }
         if (ref.hasMap())
         {
-          Mapping mp = createVamsasMapping(ref.getMap(), parentseq,
-                  jds, recurse);
+          Mapping mp = createVamsasMapping(ref.getMap(), parentseq, jds,
+                  recurse);
           dbref.setMapping(mp);
         }
         vamsasSeq.getDBRef().add(dbref);
@@ -2663,12 +2660,12 @@ public class Jalview2XML
     return id;
   }
 
-  jalview.schemes.UserColourScheme getUserColourScheme(
-          JalviewModel jm, String id)
+  jalview.schemes.UserColourScheme getUserColourScheme(JalviewModel jm,
+          String id)
   {
     List<UserColours> uc = jm.getUserColours();
     UserColours colours = null;
-/*
+    /*
     for (int i = 0; i < uc.length; i++)
     {
       if (uc[i].getId().equals(id))
@@ -2677,7 +2674,7 @@ public class Jalview2XML
         break;
       }
     }
-*/
+    */
     for (UserColours c : uc)
     {
       if (c.getId().equals(id))
@@ -2705,10 +2702,9 @@ public class Jalview2XML
       newColours = new java.awt.Color[23];
       for (int i = 0; i < 23; i++)
       {
-        newColours[i] = new java.awt.Color(Integer.parseInt(
-                colours.getUserColourScheme().getColour().get(i + 24)
-                        .getRGB(),
-                16));
+        newColours[i] = new java.awt.Color(
+                Integer.parseInt(colours.getUserColourScheme().getColour()
+                        .get(i + 24).getRGB(), 16));
       }
       ucs.setLowerCaseColours(newColours);
     }
@@ -2777,54 +2773,69 @@ public class Jalview2XML
     return af;
   }
 
-       @SuppressWarnings("unused")
-       private jarInputStreamProvider createjarInputStreamProvider(final Object ofile) throws MalformedURLException {
+  @SuppressWarnings("unused")
+  private jarInputStreamProvider createjarInputStreamProvider(
+          final Object ofile) throws MalformedURLException
+  {
 
-               // BH 2018 allow for bytes already attached to File object
-               try {
-                       String file = (ofile instanceof File ? ((File) ofile).getCanonicalPath() : ofile.toString());
+    // BH 2018 allow for bytes already attached to File object
+    try
+    {
+      String file = (ofile instanceof File
+              ? ((File) ofile).getCanonicalPath()
+              : ofile.toString());
       byte[] bytes = Platform.isJS() ? Platform.getFileBytes((File) ofile)
               : null;
-                       URL url = null;
-                       errorMessage = null;
-                       uniqueSetSuffix = null;
-                       seqRefIds = null;
-                       viewportsAdded.clear();
-                       frefedSequence = null;
-
-    if (HttpUtils.startsWithHttpOrHttps(file))
-    {
-      url = new URL(file);
-    }
-    final URL _url = url;
-    return new jarInputStreamProvider()
-    {
-
-                               @Override
-                               public JarInputStream getJarInputStream() throws IOException {
-                                       if (bytes != null) {
-//                                             System.out.println("Jalview2XML: opening byte jarInputStream for bytes.length=" + bytes.length);
-                                               return new JarInputStream(new ByteArrayInputStream(bytes));
-                                       }
-                                       if (_url != null) {
-//                                             System.out.println("Jalview2XML: opening url jarInputStream for " + _url);
-                                               return new JarInputStream(_url.openStream());
-                                       } else {
-//                                             System.out.println("Jalview2XML: opening file jarInputStream for " + file);
-                                               return new JarInputStream(new FileInputStream(file));
-                                       }
-                               }
-
-                               @Override
-                               public String getFilename() {
-                                       return file;
-                               }
-                       };
-               } catch (IOException e) {
-                       e.printStackTrace();
-                       return null;
-               }
-       }
+      URL url = null;
+      errorMessage = null;
+      uniqueSetSuffix = null;
+      seqRefIds = null;
+      viewportsAdded.clear();
+      frefedSequence = null;
+
+      if (HttpUtils.startsWithHttpOrHttps(file))
+      {
+        url = new URL(file);
+      }
+      final URL _url = url;
+      return new jarInputStreamProvider()
+      {
+
+        @Override
+        public JarInputStream getJarInputStream() throws IOException
+        {
+          if (bytes != null)
+          {
+            // System.out.println("Jalview2XML: opening byte jarInputStream for
+            // bytes.length=" + bytes.length);
+            return new JarInputStream(new ByteArrayInputStream(bytes));
+          }
+          if (_url != null)
+          {
+            // System.out.println("Jalview2XML: opening url jarInputStream for "
+            // + _url);
+            return new JarInputStream(_url.openStream());
+          }
+          else
+          {
+            // System.out.println("Jalview2XML: opening file jarInputStream for
+            // " + file);
+            return new JarInputStream(new FileInputStream(file));
+          }
+        }
+
+        @Override
+        public String getFilename()
+        {
+          return file;
+        }
+      };
+    } catch (IOException e)
+    {
+      e.printStackTrace();
+      return null;
+    }
+  }
 
   /**
    * Recover jalview session from a jalview project archive. Caller may
@@ -2871,8 +2882,8 @@ public class Jalview2XML
           XMLStreamReader streamReader = XMLInputFactory.newInstance()
                   .createXMLStreamReader(jin);
           javax.xml.bind.Unmarshaller um = jc.createUnmarshaller();
-          JAXBElement<JalviewModel> jbe = um
-                  .unmarshal(streamReader, JalviewModel.class);
+          JAXBElement<JalviewModel> jbe = um.unmarshal(streamReader,
+                  JalviewModel.class);
           JalviewModel object = jbe.getValue();
 
           if (true) // !skipViewport(object))
@@ -3260,7 +3271,8 @@ public class Jalview2XML
   AlignFrame loadFromObject(JalviewModel jalviewModel, String file,
           boolean loadTreesAndStructures, jarInputStreamProvider jprovider)
   {
-    SequenceSet vamsasSet = jalviewModel.getVamsasModel().getSequenceSet().get(0);
+    SequenceSet vamsasSet = jalviewModel.getVamsasModel().getSequenceSet()
+            .get(0);
     List<Sequence> vamsasSeqs = vamsasSet.getSequence();
 
     // JalviewModelSequence jms = object.getJalviewModelSequence();
@@ -3319,11 +3331,10 @@ public class Jalview2XML
           if (tmpSeq.getStart() != jseq.getStart()
                   || tmpSeq.getEnd() != jseq.getEnd())
           {
-            System.err.println(
-                    String.format("Warning JAL-2154 regression: updating start/end for sequence %s from %d/%d to %d/%d",
-                            tmpSeq.getName(), tmpSeq.getStart(),
-                            tmpSeq.getEnd(), jseq.getStart(),
-                            jseq.getEnd()));
+            System.err.println(String.format(
+                    "Warning JAL-2154 regression: updating start/end for sequence %s from %d/%d to %d/%d",
+                    tmpSeq.getName(), tmpSeq.getStart(), tmpSeq.getEnd(),
+                    jseq.getStart(), jseq.getEnd()));
           }
         }
         else
@@ -3606,8 +3617,8 @@ public class Jalview2XML
               else
               {
                 // defer to later
-                frefedSequence.add(
-                        newAlcodMapRef(map.getDnasq(), cf, mapping));
+                frefedSequence
+                        .add(newAlcodMapRef(map.getDnasq(), cf, mapping));
               }
             }
           }
@@ -3815,8 +3826,7 @@ public class Jalview2XML
         jaa.setCalcId(annotation.getCalcId());
         if (annotation.getProperty().size() > 0)
         {
-          for (Annotation.Property prop : annotation
-                  .getProperty())
+          for (Annotation.Property prop : annotation.getProperty())
           {
             jaa.setProperty(prop.getName(), prop.getValue());
           }
@@ -3897,9 +3907,9 @@ public class Jalview2XML
         sg.setShowNonconserved(safeBoolean(jGroup.isShowUnconserved()));
         sg.thresholdTextColour = safeInt(jGroup.getTextColThreshold());
         // attributes with a default in the schema are never null
-          sg.setShowConsensusHistogram(jGroup.isShowConsensusHistogram());
-          sg.setshowSequenceLogo(jGroup.isShowSequenceLogo());
-          sg.setNormaliseSequenceLogo(jGroup.isNormaliseSequenceLogo());
+        sg.setShowConsensusHistogram(jGroup.isShowConsensusHistogram());
+        sg.setshowSequenceLogo(jGroup.isShowSequenceLogo());
+        sg.setNormaliseSequenceLogo(jGroup.isNormaliseSequenceLogo());
         sg.setIgnoreGapsConsensus(jGroup.isIgnoreGapsinConsensus());
         if (jGroup.getConsThreshold() != null
                 && jGroup.getConsThreshold().intValue() != 0)
@@ -3943,8 +3953,9 @@ public class Jalview2XML
         if (addAnnotSchemeGroup)
         {
           // reconstruct the annotation colourscheme
-          sg.setColourScheme(constructAnnotationColour(
-                  jGroup.getAnnotationColours(), null, al, jalviewModel, false));
+          sg.setColourScheme(
+                  constructAnnotationColour(jGroup.getAnnotationColours(),
+                          null, al, jalviewModel, false));
         }
       }
     }
@@ -4150,8 +4161,8 @@ public class Jalview2XML
    * @param av
    * @param ap
    */
-  protected void loadTrees(JalviewModel jm, Viewport view,
-          AlignFrame af, AlignViewport av, AlignmentPanel ap)
+  protected void loadTrees(JalviewModel jm, Viewport view, AlignFrame af,
+          AlignViewport av, AlignmentPanel ap)
   {
     // TODO result of automated refactoring - are all these parameters needed?
     try
@@ -4259,8 +4270,8 @@ public class Jalview2XML
           for (int s = 0; s < structureStateCount; s++)
           {
             // check to see if we haven't already created this structure view
-            final StructureState structureState = pdbid
-                    .getStructureState().get(s);
+            final StructureState structureState = pdbid.getStructureState()
+                    .get(s);
             String sviewid = (structureState.getViewId() == null) ? null
                     : structureState.getViewId() + uniqueSetSuffix;
             jalview.datamodel.PDBEntry jpdb = new jalview.datamodel.PDBEntry();
@@ -4328,8 +4339,8 @@ public class Jalview2XML
             colourByViewer &= structureState.isColourByJmol();
             jmoldat.setColourByViewer(colourByViewer);
 
-            if (jmoldat.getStateData().length() < structureState
-                    .getValue()/*Content()*/.length())
+            if (jmoldat.getStateData().length() < structureState.getValue()
+                    /*Content()*/.length())
             {
               jmoldat.setStateData(structureState.getValue());// Content());
             }
@@ -4407,8 +4418,7 @@ public class Jalview2XML
     } catch (IllegalArgumentException | NullPointerException e)
     {
       // TODO JAL-3619 show error dialog / offer an alternative viewer
-      Cache.log.error(
-              "Invalid structure viewer type: " + type);
+      Cache.log.error("Invalid structure viewer type: " + type);
     }
   }
 
@@ -4608,23 +4618,23 @@ public class Jalview2XML
   }
 
   AlignFrame loadViewport(String file, List<JSeq> JSEQ,
-          List<SequenceI> hiddenSeqs, AlignmentI al,
-          JalviewModel jm, Viewport view, String uniqueSeqSetId,
-          String viewId, List<JvAnnotRow> autoAlan)
+          List<SequenceI> hiddenSeqs, AlignmentI al, JalviewModel jm,
+          Viewport view, String uniqueSeqSetId, String viewId,
+          List<JvAnnotRow> autoAlan)
   {
     AlignFrame af = null;
     af = new AlignFrame(al, safeInt(view.getWidth()),
-            safeInt(view.getHeight()), uniqueSeqSetId, viewId) 
-//    {
-//     
-//     @Override
-//     protected void processKeyEvent(java.awt.event.KeyEvent e) {
-//             System.out.println("Jalview2XML   AF " + e);
-//             super.processKeyEvent(e);
-//             
-//     }
-//     
-//    }
+            safeInt(view.getHeight()), uniqueSeqSetId, viewId)
+    // {
+    //
+    // @Override
+    // protected void processKeyEvent(java.awt.event.KeyEvent e) {
+    // System.out.println("Jalview2XML AF " + e);
+    // super.processKeyEvent(e);
+    //
+    // }
+    //
+    // }
     ;
 
     af.setFileName(file, FileFormat.Jalview);
@@ -4702,9 +4712,8 @@ public class Jalview2XML
 
     viewport.setColourText(safeBoolean(view.isShowColourText()));
 
-    viewport
-            .setConservationSelected(
-                    safeBoolean(view.isConservationSelected()));
+    viewport.setConservationSelected(
+            safeBoolean(view.isConservationSelected()));
     viewport.setIncrement(safeInt(view.getConsThreshold()));
     viewport.setShowJVSuffix(safeBoolean(view.isShowFullId()));
     viewport.setRightAlignIds(safeBoolean(view.isRightAlignIds()));
@@ -4780,9 +4789,8 @@ public class Jalview2XML
     af.changeColour(cs);
     viewport.setColourAppliesToAllGroups(true);
 
-    viewport
-            .setShowSequenceFeatures(
-                    safeBoolean(view.isShowSequenceFeatures()));
+    viewport.setShowSequenceFeatures(
+            safeBoolean(view.isShowSequenceFeatures()));
 
     viewport.setCentreColumnLabels(view.isCentreColumnLabels());
     viewport.setIgnoreGapsConsensus(view.isIgnoreGapsinConsensus(), null);
@@ -4806,13 +4814,13 @@ public class Jalview2XML
               .getFeatureRenderer();
       FeaturesDisplayed fdi;
       viewport.setFeaturesDisplayed(fdi = new FeaturesDisplayed());
-      String[] renderOrder = new String[jm.getFeatureSettings()
-              .getSetting().size()];
+      String[] renderOrder = new String[jm.getFeatureSettings().getSetting()
+              .size()];
       Map<String, FeatureColourI> featureColours = new Hashtable<>();
       Map<String, Float> featureOrder = new Hashtable<>();
 
-      for (int fs = 0; fs < jm.getFeatureSettings()
-              .getSetting().size(); fs++)
+      for (int fs = 0; fs < jm.getFeatureSettings().getSetting()
+              .size(); fs++)
       {
         Setting setting = jm.getFeatureSettings().getSetting().get(fs);
         String featureType = setting.getType();
@@ -4824,8 +4832,8 @@ public class Jalview2XML
                 .getMatcherSet();
         if (filters != null)
         {
-          FeatureMatcherSetI filter = Jalview2XML
-                  .parseFilter(featureType, filters);
+          FeatureMatcherSetI filter = Jalview2XML.parseFilter(featureType,
+                  filters);
           if (!filter.isEmpty())
           {
             fr.setFeatureFilter(featureType, filter);
@@ -4857,8 +4865,7 @@ public class Jalview2XML
           float max = setting.getMax() == null ? 1f
                   : setting.getMax().floatValue();
           FeatureColourI gc = new FeatureColour(maxColour, minColour,
-                  maxColour,
-                  noValueColour, min, max);
+                  maxColour, noValueColour, min, max);
           if (setting.getAttributeName().size() > 0)
           {
             gc.setAttributeName(setting.getAttributeName().toArray(
@@ -4892,8 +4899,7 @@ public class Jalview2XML
         }
         else
         {
-          featureColours.put(featureType,
-                  new FeatureColour(maxColour));
+          featureColours.put(featureType, new FeatureColour(maxColour));
         }
         renderOrder[fs] = featureType;
         if (setting.getOrder() != null)
@@ -5366,6 +5372,7 @@ public class Jalview2XML
       }
     }
   }
+
   /**
    * 
    * @param vamsasSeq
@@ -6114,8 +6121,8 @@ public class Jalview2XML
    * @param af
    * @param jprovider
    */
-  protected void createStructureViewer(
-          ViewerType viewerType, final Entry<String, StructureViewerModel> viewerData,
+  protected void createStructureViewer(ViewerType viewerType,
+          final Entry<String, StructureViewerModel> viewerData,
           AlignFrame af, jarInputStreamProvider jprovider)
   {
     final StructureViewerModel viewerModel = viewerData.getValue();
@@ -6129,8 +6136,7 @@ public class Jalview2XML
     {
       String viewerJarEntryName = getViewerJarEntryName(
               viewerModel.getViewId());
-      sessionFilePath = copyJarEntry(jprovider,
-              viewerJarEntryName,
+      sessionFilePath = copyJarEntry(jprovider, viewerJarEntryName,
               "viewerSession", ".tmp");
     }
     final String sessionPath = sessionFilePath;
@@ -6150,8 +6156,7 @@ public class Jalview2XML
             addNewStructureViewer(sview);
           } catch (OutOfMemoryError ex)
           {
-            new OOMWarning("Restoring structure view for "
-                    + viewerType,
+            new OOMWarning("Restoring structure view for " + viewerType,
                     (OutOfMemoryError) ex.getCause());
             if (sview != null && sview.isVisible())
             {
@@ -6211,8 +6216,7 @@ public class Jalview2XML
           String reformatedOldFilename = oldfilenam.replaceAll("/", "\\\\");
           filedat = oldFiles.get(new File(reformatedOldFilename));
         }
-        rewritten
-                .append(Platform.escapeBackslashes(filedat.getFilePath()));
+        rewritten.append(Platform.escapeBackslashes(filedat.getFilePath()));
         rewritten.append("\"");
         cp = ecp + 1; // advance beyond last \" and set cursor so we can
                       // look for next file statement.
@@ -6284,8 +6288,8 @@ public class Jalview2XML
    * @param fcol
    * @return
    */
-  public static Colour marshalColour(
-          String featureType, FeatureColourI fcol)
+  public static Colour marshalColour(String featureType,
+          FeatureColourI fcol)
   {
     Colour col = new Colour();
     if (fcol.isSimpleColour())
@@ -6346,7 +6350,7 @@ public class Jalview2XML
           boolean and)
   {
     jalview.xml.binding.jalview.FeatureMatcherSet result = new jalview.xml.binding.jalview.FeatureMatcherSet();
-  
+
     if (filters.hasNext())
     {
       /*
@@ -6396,7 +6400,7 @@ public class Jalview2XML
       }
       result.setMatchCondition(matcherModel);
     }
-  
+
     return result;
   }
 
@@ -6407,8 +6411,7 @@ public class Jalview2XML
    * @param matcherSetModel
    * @return
    */
-  public static FeatureMatcherSetI parseFilter(
-          String featureType,
+  public static FeatureMatcherSetI parseFilter(String featureType,
           jalview.xml.binding.jalview.FeatureMatcherSet matcherSetModel)
   {
     FeatureMatcherSetI result = new FeatureMatcherSet();
@@ -6423,7 +6426,7 @@ public class Jalview2XML
                       featureType, e.getMessage()));
       // return as much as was parsed up to the error
     }
-  
+
     return result;
   }
 
@@ -6438,8 +6441,7 @@ public class Jalview2XML
    * @throws IllegalStateException
    *           if AND and OR conditions are mixed
    */
-  protected static void parseFilterConditions(
-          FeatureMatcherSetI matcherSet,
+  protected static void parseFilterConditions(FeatureMatcherSetI matcherSet,
           jalview.xml.binding.jalview.FeatureMatcherSet matcherSetModel,
           boolean and)
   {
@@ -6461,7 +6463,7 @@ public class Jalview2XML
       else if (filterBy == FilterBy.BY_SCORE)
       {
         matchCondition = FeatureMatcher.byScore(cond, pattern);
-  
+
       }
       else if (filterBy == FilterBy.BY_ATTRIBUTE)
       {
@@ -6471,7 +6473,7 @@ public class Jalview2XML
         matchCondition = FeatureMatcher.byAttribute(cond, pattern,
                 attNames);
       }
-  
+
       /*
        * note this throws IllegalStateException if AND-ing to a 
        * previously OR-ed compound condition, or vice versa
@@ -6514,13 +6516,13 @@ public class Jalview2XML
   public static FeatureColourI parseColour(Colour colourModel)
   {
     FeatureColourI colour = null;
-  
+
     if (colourModel.getMax() != null)
     {
       Color mincol = null;
       Color maxcol = null;
       Color noValueColour = null;
-  
+
       try
       {
         mincol = new Color(Integer.parseInt(colourModel.getMinRGB(), 16));
@@ -6529,7 +6531,7 @@ public class Jalview2XML
       {
         Cache.log.warn("Couldn't parse out graduated feature color.", e);
       }
-  
+
       NoValueColour noCol = colourModel.getNoValueColour();
       if (noCol == NoValueColour.MIN)
       {
@@ -6539,7 +6541,7 @@ public class Jalview2XML
       {
         noValueColour = maxcol;
       }
-  
+
       colour = new FeatureColour(maxcol, mincol, maxcol, noValueColour,
               safeFloat(colourModel.getMin()),
               safeFloat(colourModel.getMax()));
@@ -6578,7 +6580,7 @@ public class Jalview2XML
       Color color = new Color(Integer.parseInt(colourModel.getRGB(), 16));
       colour = new FeatureColour(color);
     }
-  
+
     return colour;
   }
 }