From: gmungoc Date: Tue, 29 Nov 2016 09:07:25 +0000 (+0000) Subject: JAL-2344 FileFormat.isStructureFile replaces X-Git-Tag: Release_2_10_3b1~398 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=775f6ea659bce2510739e5a5f8bd3f156662d6df;p=jalview.git JAL-2344 FileFormat.isStructureFile replaces StructureFile.isStructureFile --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 3644b28..8ca9085 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -75,7 +75,6 @@ import jalview.io.JalviewFileChooser; import jalview.io.JalviewFileView; import jalview.io.JnetAnnotationMaker; import jalview.io.NewickFile; -import jalview.io.StructureFile; import jalview.io.TCoffeeScoreFile; import jalview.jbgui.GAlignFrame; import jalview.schemes.Blosum62ColourScheme; @@ -147,7 +146,6 @@ import javax.swing.JInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JMenu; import javax.swing.JMenuItem; -import javax.swing.JOptionPane; import javax.swing.JRadioButtonMenuItem; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; @@ -4899,13 +4897,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { type = null; } - if (type != null) + if (type != null && type.isStructureFile()) { - if (FileFormat.PDB.equals(type) || FileFormat.MMCif.equals(type)) - { - filesmatched.add(new Object[] { file, protocol, mtch }); - continue; - } + filesmatched.add(new Object[] { file, protocol, mtch }); + continue; } } // File wasn't named like one of the sequences or wasn't a PDB file. diff --git a/src/jalview/io/StructureFile.java b/src/jalview/io/StructureFile.java index d39ab38..7fe17c8 100644 --- a/src/jalview/io/StructureFile.java +++ b/src/jalview/io/StructureFile.java @@ -42,14 +42,8 @@ import MCview.PDBChain; public abstract class StructureFile extends AlignFile { - private String id; - public enum StructureFileType - { - PDB, MMCIF, MMTF - }; - private PDBEntry.Type dbRefType; /** @@ -488,20 +482,4 @@ public abstract class StructureFile extends AlignFile { this.pdbIdAvailable = pdbIdAvailable; } - - public static boolean isStructureFile(String fileType) - { - if (fileType == null) - { - return false; - } - for (StructureFileType sfType : StructureFileType.values()) - { - if (sfType.name().equalsIgnoreCase(fileType)) - { - return true; - } - } - return false; - } }