From 48e68905336d8ee17ee6b3903d80b36bac8c56cf Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 30 Jun 2020 12:12:09 +0100 Subject: [PATCH] JAL-3446 unused imports removed --- src/jalview/analysis/CrossRef.java | 10 ++-- src/jalview/analysis/Dna.java | 13 +++-- src/jalview/appletgui/AnnotationPanel.java | 23 ++++----- src/jalview/appletgui/TitledPanel.java | 4 -- src/jalview/bin/Cache.java | 25 +++++---- src/jalview/datamodel/PDBEntry.java | 5 +- src/jalview/ext/ensembl/EnsemblFeatures.java | 18 +++---- src/jalview/ext/ensembl/EnsemblInfo.java | 8 ++- src/jalview/ext/ensembl/EnsemblXref.java | 10 ++-- src/jalview/gui/RestInputParamEditDialog.java | 14 +++--- src/jalview/gui/SliderPanel.java | 13 +++-- src/jalview/gui/SplashScreen.java | 1 - src/jalview/gui/StructureChooser.java | 35 +++++++------ src/jalview/gui/UserQuestionnaireCheck.java | 4 +- src/jalview/gui/WsPreferences.java | 13 +++-- src/jalview/io/AlignmentFileReaderI.java | 2 - src/jalview/io/AlignmentFileWriterI.java | 2 - src/jalview/io/packed/ParsePackedSet.java | 13 +++-- src/jalview/jbgui/GAlignFrame.java | 29 +++++------ src/jalview/jbgui/GCutAndPasteTransfer.java | 9 ++-- src/jalview/jbgui/GUserDefinedColours.java | 7 ++- src/jalview/util/ShortcutKeyMaskExWrapper.java | 5 -- src/jalview/ws/SequenceFetcherFactory.java | 56 --------------------- src/jalview/ws/dbsources/EmblXmlSource.java | 39 +++++++------- src/jalview/ws/dbsources/Uniprot.java | 36 +++++++------ src/jalview/ws/jws1/Discoverer.java | 11 ++-- src/jalview/ws/utils/UrlDownloadClient.java | 12 +---- src/javajs/async/Assets.java | 1 - src/org/json/JSONObject.java | 1 - src/swingjs/api/js/HTML5Video.java | 1 - test/jalview/analysis/AlignmentGenerator.java | 13 ++--- test/jalview/analysis/AlignmentUtilsTests.java | 24 ++++----- test/jalview/analysis/CrossRefTest.java | 18 +++---- test/jalview/datamodel/SequenceTest.java | 14 +++--- test/jalview/fts/service/pdb/PDBFTSPanelTest.java | 4 +- test/jalview/gui/SeqCanvasTest.java | 27 +++++----- test/jalview/gui/StructureChooserTest.java | 16 +++--- 37 files changed, 203 insertions(+), 333 deletions(-) delete mode 100644 src/jalview/ws/SequenceFetcherFactory.java diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index b70e9f7..1044802 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -20,6 +20,10 @@ */ package jalview.analysis; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; @@ -32,12 +36,6 @@ import jalview.datamodel.SequenceI; import jalview.util.DBRefUtils; import jalview.util.MapList; import jalview.ws.SequenceFetcher; -import jalview.ws.SequenceFetcherFactory; -import jalview.ws.seqfetcher.ASequenceFetcher; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; /** * Functions for cross-referencing sequence databases. diff --git a/src/jalview/analysis/Dna.java b/src/jalview/analysis/Dna.java index 8bf0c24..3fbcee2 100644 --- a/src/jalview/analysis/Dna.java +++ b/src/jalview/analysis/Dna.java @@ -20,6 +20,12 @@ */ package jalview.analysis; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; + import jalview.api.AlignViewportI; import jalview.datamodel.AlignedCodon; import jalview.datamodel.AlignedCodonFrame; @@ -28,7 +34,6 @@ import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; import jalview.datamodel.DBRefEntry; -import jalview.datamodel.DBRefSource; import jalview.datamodel.FeatureProperties; import jalview.datamodel.GraphLine; import jalview.datamodel.Mapping; @@ -41,12 +46,6 @@ import jalview.util.DBRefUtils; import jalview.util.MapList; import jalview.util.ShiftList; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; - public class Dna { private static final String STOP_ASTERIX = "*"; diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 3dae998..f89b67c 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -20,18 +20,6 @@ */ package jalview.appletgui; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.Annotation; -import jalview.datamodel.SequenceI; -import jalview.renderer.AnnotationRenderer; -import jalview.renderer.AwtRenderPanelI; -import jalview.schemes.ResidueProperties; -import jalview.util.Comparison; -import jalview.util.MessageManager; -import jalview.util.Platform; -import jalview.viewmodel.ViewportListenerI; -import jalview.viewmodel.ViewportRanges; - import java.awt.Color; import java.awt.Dimension; import java.awt.Font; @@ -51,6 +39,17 @@ import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.beans.PropertyChangeEvent; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.Annotation; +import jalview.datamodel.SequenceI; +import jalview.renderer.AnnotationRenderer; +import jalview.renderer.AwtRenderPanelI; +import jalview.schemes.ResidueProperties; +import jalview.util.Comparison; +import jalview.util.MessageManager; +import jalview.viewmodel.ViewportListenerI; +import jalview.viewmodel.ViewportRanges; + public class AnnotationPanel extends Panel implements AwtRenderPanelI, AdjustmentListener, ActionListener, MouseListener, MouseMotionListener, ViewportListenerI diff --git a/src/jalview/appletgui/TitledPanel.java b/src/jalview/appletgui/TitledPanel.java index feeaf83..dec6573 100644 --- a/src/jalview/appletgui/TitledPanel.java +++ b/src/jalview/appletgui/TitledPanel.java @@ -20,13 +20,9 @@ */ package jalview.appletgui; -import java.awt.Frame; import java.awt.Graphics; import java.awt.Insets; -import java.awt.Label; import java.awt.Panel; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; public class TitledPanel extends Panel { diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 69f5f63..09004f4 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -20,21 +20,8 @@ */ package jalview.bin; -import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI; -import jalview.datamodel.PDBEntry; -import jalview.gui.UserDefinedColours; -import jalview.schemes.ColourSchemeLoader; -import jalview.schemes.ColourSchemes; -import jalview.schemes.UserColourScheme; -import jalview.structure.StructureImportSettings; -import jalview.urls.IdOrgSettings; -import jalview.util.ColorUtils; -import jalview.util.Platform; -import jalview.ws.sifts.SiftsSettings; - import java.awt.Color; import java.io.BufferedReader; -import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; @@ -55,6 +42,18 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.SimpleLayout; +import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI; +import jalview.datamodel.PDBEntry; +import jalview.gui.UserDefinedColours; +import jalview.schemes.ColourSchemeLoader; +import jalview.schemes.ColourSchemes; +import jalview.schemes.UserColourScheme; +import jalview.structure.StructureImportSettings; +import jalview.urls.IdOrgSettings; +import jalview.util.ColorUtils; +import jalview.util.Platform; +import jalview.ws.sifts.SiftsSettings; + /** * Stores and retrieves Jalview Application Properties Lists and fields within * list entries are separated by '|' symbols unless otherwise stated (|) clauses diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index d39e9f1..a7e5afe 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -20,13 +20,12 @@ */ package jalview.datamodel; -import jalview.util.CaseInsensitiveString; -import jalview.ws.params.InvalidArgumentException; - import java.util.Collections; import java.util.Enumeration; import java.util.Hashtable; +import jalview.util.CaseInsensitiveString; + public class PDBEntry { diff --git a/src/jalview/ext/ensembl/EnsemblFeatures.java b/src/jalview/ext/ensembl/EnsemblFeatures.java index e28cc7f..ab35829 100644 --- a/src/jalview/ext/ensembl/EnsemblFeatures.java +++ b/src/jalview/ext/ensembl/EnsemblFeatures.java @@ -20,16 +20,6 @@ */ package jalview.ext.ensembl; -import jalview.datamodel.Alignment; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.Sequence; -import jalview.datamodel.SequenceFeature; -import jalview.datamodel.SequenceI; -import jalview.io.gff.SequenceOntologyI; -import jalview.util.JSONUtils; -import jalview.util.Platform; - -import java.io.BufferedReader; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; @@ -40,6 +30,14 @@ import java.util.Map; import org.json.simple.parser.ParseException; +import jalview.datamodel.Alignment; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceFeature; +import jalview.datamodel.SequenceI; +import jalview.io.gff.SequenceOntologyI; +import jalview.util.JSONUtils; + /** * A client for fetching and processing Ensembl feature data in GFF format by * calling the overlap REST service diff --git a/src/jalview/ext/ensembl/EnsemblInfo.java b/src/jalview/ext/ensembl/EnsemblInfo.java index 97ad242..85f421d 100644 --- a/src/jalview/ext/ensembl/EnsemblInfo.java +++ b/src/jalview/ext/ensembl/EnsemblInfo.java @@ -20,11 +20,6 @@ */ package jalview.ext.ensembl; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.DBRefSource; -import jalview.util.JSONUtils; - -import java.io.BufferedReader; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; @@ -36,6 +31,9 @@ import java.util.Set; import org.json.simple.parser.ParseException; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.DBRefSource; + public class EnsemblInfo extends EnsemblRestClient { diff --git a/src/jalview/ext/ensembl/EnsemblXref.java b/src/jalview/ext/ensembl/EnsemblXref.java index eedfe97..9b58e58 100644 --- a/src/jalview/ext/ensembl/EnsemblXref.java +++ b/src/jalview/ext/ensembl/EnsemblXref.java @@ -20,12 +20,6 @@ */ package jalview.ext.ensembl; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.DBRefEntry; -import jalview.util.DBRefUtils; -import jalview.util.JSONUtils; - -import java.io.BufferedReader; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; @@ -36,6 +30,10 @@ import java.util.Map; import org.json.simple.parser.ParseException; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.DBRefEntry; +import jalview.util.DBRefUtils; + /** * A class to fetch cross-references from Ensembl by calling the /xrefs REST * service diff --git a/src/jalview/gui/RestInputParamEditDialog.java b/src/jalview/gui/RestInputParamEditDialog.java index 8ae5408..34d456f 100644 --- a/src/jalview/gui/RestInputParamEditDialog.java +++ b/src/jalview/gui/RestInputParamEditDialog.java @@ -20,20 +20,18 @@ */ package jalview.gui; -import jalview.jbgui.GRestInputParamEditDialog; -import jalview.ws.params.InvalidArgumentException; -import jalview.ws.params.OptionI; -import jalview.ws.params.ParameterI; -import jalview.ws.rest.InputType; -import jalview.ws.rest.RestServiceDescription; - import java.util.ArrayList; import java.util.Hashtable; -import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.event.ListSelectionEvent; +import jalview.jbgui.GRestInputParamEditDialog; +import jalview.ws.params.InvalidArgumentException; +import jalview.ws.params.OptionI; +import jalview.ws.params.ParameterI; +import jalview.ws.rest.InputType; +import jalview.ws.rest.RestServiceDescription; import net.miginfocom.swing.MigLayout; public class RestInputParamEditDialog extends GRestInputParamEditDialog diff --git a/src/jalview/gui/SliderPanel.java b/src/jalview/gui/SliderPanel.java index 7effb0f..a577b69 100755 --- a/src/jalview/gui/SliderPanel.java +++ b/src/jalview/gui/SliderPanel.java @@ -20,13 +20,6 @@ */ package jalview.gui; -import jalview.analysis.Conservation; -import jalview.datamodel.SequenceGroup; -import jalview.jbgui.GSliderPanel; -import jalview.renderer.ResidueShaderI; -import jalview.util.MessageManager; - -import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.beans.PropertyVetoException; @@ -39,6 +32,12 @@ import javax.swing.event.ChangeListener; import javax.swing.event.InternalFrameAdapter; import javax.swing.event.InternalFrameEvent; +import jalview.analysis.Conservation; +import jalview.datamodel.SequenceGroup; +import jalview.jbgui.GSliderPanel; +import jalview.renderer.ResidueShaderI; +import jalview.util.MessageManager; + /** * DOCUMENT ME! * diff --git a/src/jalview/gui/SplashScreen.java b/src/jalview/gui/SplashScreen.java index bfa714a..83346fc 100755 --- a/src/jalview/gui/SplashScreen.java +++ b/src/jalview/gui/SplashScreen.java @@ -30,7 +30,6 @@ import java.awt.MediaTracker; import java.awt.Toolkit; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.net.URL; import javax.swing.JInternalFrame; import javax.swing.JLayeredPane; diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index c30d8c7..47c9a00 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -21,24 +21,6 @@ package jalview.gui; -import jalview.api.structures.JalviewStructureDisplayI; -import jalview.bin.Cache; -import jalview.bin.Jalview; -import jalview.datamodel.DBRefEntry; -import jalview.datamodel.DBRefSource; -import jalview.datamodel.PDBEntry; -import jalview.datamodel.SequenceI; -import jalview.fts.api.FTSData; -import jalview.fts.api.FTSDataColumnI; -import jalview.fts.api.FTSRestClientI; -import jalview.fts.core.FTSRestRequest; -import jalview.fts.core.FTSRestResponse; -import jalview.fts.service.pdb.PDBFTSRestClient; -import jalview.io.DataSourceType; -import jalview.jbgui.GStructureChooser; -import jalview.structure.StructureSelectionManager; -import jalview.util.MessageManager; - import java.awt.event.ItemEvent; import java.util.ArrayList; import java.util.Collection; @@ -56,6 +38,23 @@ import javax.swing.JTable; import javax.swing.SwingUtilities; import javax.swing.table.AbstractTableModel; +import jalview.api.structures.JalviewStructureDisplayI; +import jalview.bin.Cache; +import jalview.bin.Jalview; +import jalview.datamodel.DBRefEntry; +import jalview.datamodel.DBRefSource; +import jalview.datamodel.PDBEntry; +import jalview.datamodel.SequenceI; +import jalview.fts.api.FTSData; +import jalview.fts.api.FTSDataColumnI; +import jalview.fts.api.FTSRestClientI; +import jalview.fts.core.FTSRestRequest; +import jalview.fts.core.FTSRestResponse; +import jalview.fts.service.pdb.PDBFTSRestClient; +import jalview.io.DataSourceType; +import jalview.jbgui.GStructureChooser; +import jalview.util.MessageManager; + /** * Provides the behaviors for the Structure chooser Panel * diff --git a/src/jalview/gui/UserQuestionnaireCheck.java b/src/jalview/gui/UserQuestionnaireCheck.java index e12586a..2f6a5c2 100644 --- a/src/jalview/gui/UserQuestionnaireCheck.java +++ b/src/jalview/gui/UserQuestionnaireCheck.java @@ -20,13 +20,11 @@ */ package jalview.gui; -import jalview.util.MessageManager; - import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; -import javax.swing.JOptionPane; +import jalview.util.MessageManager; public class UserQuestionnaireCheck implements Runnable { diff --git a/src/jalview/gui/WsPreferences.java b/src/jalview/gui/WsPreferences.java index b97a25e..8b5e664 100644 --- a/src/jalview/gui/WsPreferences.java +++ b/src/jalview/gui/WsPreferences.java @@ -20,12 +20,6 @@ */ package jalview.gui; -import jalview.bin.Cache; -import jalview.jbgui.GWsPreferences; -import jalview.util.MessageManager; -import jalview.ws.jws2.Jws2Discoverer; -import jalview.ws.rest.RestServiceDescription; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -37,13 +31,18 @@ import java.util.List; import java.util.Vector; import javax.swing.JLabel; -import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableCellRenderer; +import jalview.bin.Cache; +import jalview.jbgui.GWsPreferences; +import jalview.util.MessageManager; +import jalview.ws.jws2.Jws2Discoverer; +import jalview.ws.rest.RestServiceDescription; + public class WsPreferences extends GWsPreferences { diff --git a/src/jalview/io/AlignmentFileReaderI.java b/src/jalview/io/AlignmentFileReaderI.java index c3e148d..1c42896 100644 --- a/src/jalview/io/AlignmentFileReaderI.java +++ b/src/jalview/io/AlignmentFileReaderI.java @@ -20,8 +20,6 @@ */ package jalview.io; -import jalview.api.AlignExportSettingsI; -import jalview.api.AlignmentViewPanel; import jalview.api.FeatureSettingsModelI; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; diff --git a/src/jalview/io/AlignmentFileWriterI.java b/src/jalview/io/AlignmentFileWriterI.java index 2049032..7497005 100644 --- a/src/jalview/io/AlignmentFileWriterI.java +++ b/src/jalview/io/AlignmentFileWriterI.java @@ -22,8 +22,6 @@ package jalview.io; import jalview.api.AlignExportSettingsI; import jalview.api.AlignmentViewPanel; -import jalview.api.FeatureSettingsModelI; -import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; public interface AlignmentFileWriterI diff --git a/src/jalview/io/packed/ParsePackedSet.java b/src/jalview/io/packed/ParsePackedSet.java index d40446d..2b95081 100644 --- a/src/jalview/io/packed/ParsePackedSet.java +++ b/src/jalview/io/packed/ParsePackedSet.java @@ -20,7 +20,12 @@ */ package jalview.io.packed; -import jalview.api.FeatureColourI; +import java.io.BufferedReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + import jalview.datamodel.AlignmentI; import jalview.io.AppletFormatAdapter; import jalview.io.FileFormatI; @@ -29,12 +34,6 @@ import jalview.io.FormatAdapter; import jalview.io.IdentifyFile; import jalview.io.packed.DataProvider.JvDataType; -import java.io.BufferedReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - public class ParsePackedSet { diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 38ad437..6c6d123 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -20,23 +20,8 @@ */ package jalview.jbgui; -import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; -import jalview.analysis.GeneticCodeI; -import jalview.analysis.GeneticCodes; -import jalview.api.SplitContainerI; -import jalview.bin.Cache; -import jalview.gui.JvSwingUtils; -import jalview.gui.PaintRefresher; -import jalview.gui.Preferences; -import jalview.gui.TreePanel; -import jalview.io.FileFormats; -import jalview.schemes.ResidueColourScheme; -import jalview.util.MessageManager; -import jalview.util.Platform; - import java.awt.BorderLayout; import java.awt.Color; -import java.awt.Component; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -46,9 +31,7 @@ import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import javax.swing.BorderFactory; @@ -67,6 +50,18 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.MenuEvent; import javax.swing.event.MenuListener; +import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; +import jalview.analysis.GeneticCodeI; +import jalview.analysis.GeneticCodes; +import jalview.api.SplitContainerI; +import jalview.bin.Cache; +import jalview.gui.JvSwingUtils; +import jalview.gui.Preferences; +import jalview.io.FileFormats; +import jalview.schemes.ResidueColourScheme; +import jalview.util.MessageManager; +import jalview.util.Platform; + @SuppressWarnings("serial") public class GAlignFrame extends JInternalFrame { diff --git a/src/jalview/jbgui/GCutAndPasteTransfer.java b/src/jalview/jbgui/GCutAndPasteTransfer.java index bd3e8dc..83394cf 100755 --- a/src/jalview/jbgui/GCutAndPasteTransfer.java +++ b/src/jalview/jbgui/GCutAndPasteTransfer.java @@ -20,13 +20,8 @@ */ package jalview.jbgui; -import jalview.gui.JvSwingUtils; -import jalview.util.MessageManager; -import jalview.util.Platform; - import java.awt.BorderLayout; import java.awt.Font; -import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; @@ -40,6 +35,10 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; +import jalview.gui.JvSwingUtils; +import jalview.util.MessageManager; +import jalview.util.Platform; + /** * DOCUMENT ME! * diff --git a/src/jalview/jbgui/GUserDefinedColours.java b/src/jalview/jbgui/GUserDefinedColours.java index 359f787..4b10546 100755 --- a/src/jalview/jbgui/GUserDefinedColours.java +++ b/src/jalview/jbgui/GUserDefinedColours.java @@ -20,10 +20,6 @@ */ package jalview.jbgui; -import jalview.bin.Jalview; -import jalview.gui.JvSwingUtils; -import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -45,6 +41,9 @@ import javax.swing.JTextField; import javax.swing.SwingConstants; import javax.swing.colorchooser.AbstractColorChooserPanel; +import jalview.gui.JvSwingUtils; +import jalview.util.MessageManager; + /** * DOCUMENT ME! * diff --git a/src/jalview/util/ShortcutKeyMaskExWrapper.java b/src/jalview/util/ShortcutKeyMaskExWrapper.java index 5b26f3d..4c33cf8 100644 --- a/src/jalview/util/ShortcutKeyMaskExWrapper.java +++ b/src/jalview/util/ShortcutKeyMaskExWrapper.java @@ -20,11 +20,6 @@ */ package jalview.util; -import java.awt.GraphicsEnvironment; -import java.awt.Toolkit; -import java.awt.event.KeyEvent; -import java.lang.reflect.Method; - public class ShortcutKeyMaskExWrapper { // diff --git a/src/jalview/ws/SequenceFetcherFactory.java b/src/jalview/ws/SequenceFetcherFactory.java deleted file mode 100644 index 25144fc..0000000 --- a/src/jalview/ws/SequenceFetcherFactory.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors - * - * This file is part of Jalview. - * - * Jalview is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 - * of the License, or (at your option) any later version. - * - * Jalview is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Jalview. If not, see . - * The Jalview Authors are detailed in the 'AUTHORS' file. - */ -package jalview.ws; - -import jalview.ws.seqfetcher.ASequenceFetcher; - -public class SequenceFetcherFactory -{ - // BH the two methods in this class merged into SequenceFetcher -} -//public class SequenceFetcherFactory -//{ -// -// private static SequenceFetcher instance; -// -// /** -// * Returns a new SequenceFetcher object, or a mock object if one has been set -// * -// * @return -// */ -// public static ASequenceFetcher getSequenceFetcher() -// { -// return instance == null ? new SequenceFetcher() : instance; -// } -// -// /** -// * Set the instance object to use (intended for unit testing with mock -// * objects). -// * -// * Be sure to reset to null in the tearDown method of any tests! -// * -// * @param sf -// */ -// public static void setSequenceFetcher(SequenceFetcher sf) -// { -// instance = sf; -// } -//} diff --git a/src/jalview/ws/dbsources/EmblXmlSource.java b/src/jalview/ws/dbsources/EmblXmlSource.java index 19366e0..5198026 100644 --- a/src/jalview/ws/dbsources/EmblXmlSource.java +++ b/src/jalview/ws/dbsources/EmblXmlSource.java @@ -20,6 +20,25 @@ */ package jalview.ws.dbsources; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Hashtable; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.stream.FactoryConfigurationError; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; + import jalview.analysis.SequenceIdMatcher; import jalview.bin.Cache; import jalview.datamodel.Alignment; @@ -40,29 +59,9 @@ import jalview.ws.ebi.EBIFetchClient; import jalview.xml.binding.embl.EntryType; import jalview.xml.binding.embl.EntryType.Feature; import jalview.xml.binding.embl.EntryType.Feature.Qualifier; -import jalview.xml.binding.jalview.JalviewModel; import jalview.xml.binding.embl.ROOT; import jalview.xml.binding.embl.XrefType; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.text.ParseException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.stream.FactoryConfigurationError; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; - public abstract class EmblXmlSource extends EbiFileRetrievedProxy { /* diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index 6fc913b..fa6c3c7 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -20,6 +20,23 @@ */ package jalview.ws.dbsources; +import java.io.InputStream; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.List; +import java.util.Vector; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.stream.FactoryConfigurationError; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; + +import com.stevesoft.pat.Regex; + import jalview.bin.Cache; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; @@ -29,12 +46,10 @@ import jalview.datamodel.PDBEntry; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; -import jalview.gui.Preferences; import jalview.schemes.ResidueProperties; import jalview.util.Platform; import jalview.util.StringUtils; import jalview.ws.seqfetcher.DbSourceProxyImpl; -import jalview.xml.binding.embl.ROOT; import jalview.xml.binding.uniprot.DbReferenceType; import jalview.xml.binding.uniprot.Entry; import jalview.xml.binding.uniprot.FeatureType; @@ -42,23 +57,6 @@ import jalview.xml.binding.uniprot.LocationType; import jalview.xml.binding.uniprot.PositionType; import jalview.xml.binding.uniprot.PropertyType; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.ArrayList; -import java.util.List; -import java.util.Vector; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.stream.FactoryConfigurationError; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; - -import com.stevesoft.pat.Regex; - /** * This class queries the Uniprot database for sequence data, unmarshals the * returned XML, and converts it to Jalview Sequence records (including attached diff --git a/src/jalview/ws/jws1/Discoverer.java b/src/jalview/ws/jws1/Discoverer.java index 6aa3f48..59843f2 100644 --- a/src/jalview/ws/jws1/Discoverer.java +++ b/src/jalview/ws/jws1/Discoverer.java @@ -20,15 +20,8 @@ */ package jalview.ws.jws1; -import jalview.bin.ApplicationSingletonProvider; -import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI; -import jalview.gui.AlignmentPanel; -import jalview.gui.JvOptionPane; -import jalview.util.MessageManager; - import java.net.URL; import java.util.Hashtable; -import java.util.List; import java.util.StringTokenizer; import java.util.Vector; @@ -37,6 +30,10 @@ import ext.vamsas.IRegistryServiceLocator; import ext.vamsas.RegistryServiceSoapBindingStub; import ext.vamsas.ServiceHandle; import ext.vamsas.ServiceHandles; +import jalview.bin.ApplicationSingletonProvider; +import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI; +import jalview.gui.JvOptionPane; +import jalview.util.MessageManager; public class Discoverer implements Runnable, ApplicationSingletonI { diff --git a/src/jalview/ws/utils/UrlDownloadClient.java b/src/jalview/ws/utils/UrlDownloadClient.java index 227fe23..7d45313 100644 --- a/src/jalview/ws/utils/UrlDownloadClient.java +++ b/src/jalview/ws/utils/UrlDownloadClient.java @@ -21,18 +21,10 @@ package jalview.ws.utils; -import jalview.util.Platform; - import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; -import java.net.URL; -import java.nio.channels.Channels; -import java.nio.channels.ReadableByteChannel; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; + +import jalview.util.Platform; public class UrlDownloadClient { diff --git a/src/javajs/async/Assets.java b/src/javajs/async/Assets.java index 3650544..05614ce 100644 --- a/src/javajs/async/Assets.java +++ b/src/javajs/async/Assets.java @@ -1,6 +1,5 @@ package javajs.async; -import java.awt.Toolkit; import java.io.File; import java.io.IOException; import java.io.InputStream; diff --git a/src/org/json/JSONObject.java b/src/org/json/JSONObject.java index 42d34de..f0b5512 100644 --- a/src/org/json/JSONObject.java +++ b/src/org/json/JSONObject.java @@ -32,7 +32,6 @@ import java.io.Closeable; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; -import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/src/swingjs/api/js/HTML5Video.java b/src/swingjs/api/js/HTML5Video.java index a47732a..073f1ed 100644 --- a/src/swingjs/api/js/HTML5Video.java +++ b/src/swingjs/api/js/HTML5Video.java @@ -3,7 +3,6 @@ package swingjs.api.js; import java.awt.Container; import java.awt.Dimension; import java.awt.Frame; -import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; diff --git a/test/jalview/analysis/AlignmentGenerator.java b/test/jalview/analysis/AlignmentGenerator.java index 9d3877c..1ddcfb4 100644 --- a/test/jalview/analysis/AlignmentGenerator.java +++ b/test/jalview/analysis/AlignmentGenerator.java @@ -20,20 +20,17 @@ */ package jalview.analysis; -import jalview.datamodel.Alignment; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.Sequence; -import jalview.datamodel.SequenceI; -import jalview.gui.JvOptionPane; -import jalview.io.FastaFile; - import java.io.File; import java.io.FileNotFoundException; import java.io.PrintStream; import java.util.Arrays; import java.util.Random; -import org.testng.annotations.BeforeClass; +import jalview.datamodel.Alignment; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceI; +import jalview.io.FastaFile; /** * Generates, and outputs in Fasta format, a random peptide or nucleotide alignment for given diff --git a/test/jalview/analysis/AlignmentUtilsTests.java b/test/jalview/analysis/AlignmentUtilsTests.java index 9eec241..b45547e 100644 --- a/test/jalview/analysis/AlignmentUtilsTests.java +++ b/test/jalview/analysis/AlignmentUtilsTests.java @@ -27,7 +27,16 @@ import static org.testng.AssertJUnit.assertNull; import static org.testng.AssertJUnit.assertSame; import static org.testng.AssertJUnit.assertTrue; -import jalview.analysis.AlignmentUtils.DnaVariant; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; @@ -41,7 +50,6 @@ import jalview.datamodel.SearchResultsI; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; -import jalview.datamodel.features.SequenceFeatures; import jalview.gui.JvOptionPane; import jalview.io.AppletFormatAdapter; import jalview.io.DataSourceType; @@ -51,18 +59,6 @@ import jalview.io.FormatAdapter; import jalview.io.gff.SequenceOntologyI; import jalview.util.MapList; import jalview.util.MappingUtils; -import jalview.ws.params.InvalidArgumentException; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; public class AlignmentUtilsTests { diff --git a/test/jalview/analysis/CrossRefTest.java b/test/jalview/analysis/CrossRefTest.java index 0123551..9a0d610 100644 --- a/test/jalview/analysis/CrossRefTest.java +++ b/test/jalview/analysis/CrossRefTest.java @@ -28,6 +28,14 @@ import static org.testng.AssertJUnit.assertNull; import static org.testng.AssertJUnit.assertSame; import static org.testng.AssertJUnit.assertTrue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping; import jalview.datamodel.Alignment; @@ -41,16 +49,6 @@ import jalview.gui.JvOptionPane; import jalview.util.DBRefUtils; import jalview.util.MapList; import jalview.ws.SequenceFetcher; -import jalview.ws.SequenceFetcherFactory; -import jalview.ws.params.InvalidArgumentException; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; public class CrossRefTest { diff --git a/test/jalview/datamodel/SequenceTest.java b/test/jalview/datamodel/SequenceTest.java index 129d7b3..7238d27 100644 --- a/test/jalview/datamodel/SequenceTest.java +++ b/test/jalview/datamodel/SequenceTest.java @@ -28,14 +28,6 @@ import static org.testng.AssertJUnit.assertNull; import static org.testng.AssertJUnit.assertSame; import static org.testng.AssertJUnit.assertTrue; -import jalview.analysis.AlignmentGenerator; -import jalview.commands.EditCommand; -import jalview.commands.EditCommand.Action; -import jalview.datamodel.PDBEntry.Type; -import jalview.gui.JvOptionPane; -import jalview.util.MapList; -import jalview.ws.params.InvalidArgumentException; - import java.io.File; import java.util.ArrayList; import java.util.Arrays; @@ -49,6 +41,12 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +import jalview.analysis.AlignmentGenerator; +import jalview.commands.EditCommand; +import jalview.commands.EditCommand.Action; +import jalview.datamodel.PDBEntry.Type; +import jalview.gui.JvOptionPane; +import jalview.util.MapList; import junit.extensions.PA; public class SequenceTest diff --git a/test/jalview/fts/service/pdb/PDBFTSPanelTest.java b/test/jalview/fts/service/pdb/PDBFTSPanelTest.java index 224a712..a5b26f1 100644 --- a/test/jalview/fts/service/pdb/PDBFTSPanelTest.java +++ b/test/jalview/fts/service/pdb/PDBFTSPanelTest.java @@ -23,9 +23,6 @@ package jalview.fts.service.pdb; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; -import jalview.gui.JvOptionPane; - -import javax.swing.JComboBox; import javax.swing.JInternalFrame; import org.testng.annotations.AfterMethod; @@ -33,6 +30,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +import jalview.gui.JvOptionPane; import junit.extensions.PA; public class PDBFTSPanelTest diff --git a/test/jalview/gui/SeqCanvasTest.java b/test/jalview/gui/SeqCanvasTest.java index 34e88ad..cd37b61 100644 --- a/test/jalview/gui/SeqCanvasTest.java +++ b/test/jalview/gui/SeqCanvasTest.java @@ -20,27 +20,26 @@ */ package jalview.gui; -import jalview.bin.Cache; -import jalview.bin.Jalview; -import jalview.datamodel.AlignmentI; -import jalview.io.DataSourceType; -import jalview.datamodel.SearchResults; -import jalview.datamodel.SearchResultsI; -import jalview.io.FileLoader; -import jalview.util.Platform; -import jalview.viewmodel.ViewportRanges; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.assertTrue; import java.awt.Font; import java.awt.FontMetrics; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.assertTrue; +import jalview.bin.Cache; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SearchResults; +import jalview.datamodel.SearchResultsI; +import jalview.io.DataSourceType; +import jalview.io.FileLoader; +import jalview.util.Platform; +import jalview.viewmodel.ViewportRanges; import junit.extensions.PA; public class SeqCanvasTest diff --git a/test/jalview/gui/StructureChooserTest.java b/test/jalview/gui/StructureChooserTest.java index 073bde8..42c8826 100644 --- a/test/jalview/gui/StructureChooserTest.java +++ b/test/jalview/gui/StructureChooserTest.java @@ -24,15 +24,6 @@ import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertTrue; -import jalview.datamodel.DBRefEntry; -import jalview.datamodel.DBRefSource; -import jalview.datamodel.PDBEntry; -import jalview.datamodel.Sequence; -import jalview.datamodel.SequenceI; -import jalview.fts.api.FTSData; -import jalview.jbgui.GStructureChooser.FilterOption; -import jalview.ws.params.InvalidArgumentException; - import java.util.Collection; import java.util.Vector; @@ -41,6 +32,13 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +import jalview.datamodel.DBRefEntry; +import jalview.datamodel.DBRefSource; +import jalview.datamodel.PDBEntry; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceI; +import jalview.fts.api.FTSData; +import jalview.jbgui.GStructureChooser.FilterOption; import junit.extensions.PA; public class StructureChooserTest -- 1.7.10.2