X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=0745b853e5f22cb0eb62eb1feb66f57a813bce8e;hb=a9177efb4097815d9a8031aa22700c61a7d6260a;hp=ae145399d9705df7ecb7226e8fe03e09fa284555;hpb=25e2a6f59681e1e7d9602a451fbcf3a2b414a49a;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index ae14539..0745b85 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -95,6 +95,7 @@ import jalview.api.analysis.SimilarityParamsI; import jalview.bin.Cache; import jalview.bin.Console; import jalview.bin.Jalview; +import jalview.bin.groovy.JalviewObjectI; import jalview.commands.CommandI; import jalview.commands.EditCommand; import jalview.commands.EditCommand.Action; @@ -4817,7 +4818,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * Object[] { String,SequenceI} */ ArrayList filesmatched = new ArrayList<>(); - ArrayList filesnotmatched = new ArrayList<>(); + ArrayList filesnotmatched = new ArrayList<>(); for (int i = 0; i < files.size(); i++) { // BH 2018 @@ -4863,9 +4864,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } mtch = idm.findAllIdMatches(pdbfn); } + FileFormatI type = null; if (mtch != null) { - FileFormatI type; try { type = new IdentifyFile().identify(file, protocol); @@ -4881,7 +4882,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } // File wasn't named like one of the sequences or wasn't a PDB // file. - filesnotmatched.add(file); + filesnotmatched.add(new Object[] { file, protocol, type }); } } int assocfiles = 0; @@ -4935,7 +4936,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, */ for (Object[] o : filesmatched) { - filesnotmatched.add(o[0]); + filesnotmatched.add(new Object[] { o[0], o[1] }); } } } @@ -4957,9 +4958,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { return; } - for (Object fn : filesnotmatched) + for (Object[] fn : filesnotmatched) { - loadJalviewDataFile(fn, null, null, null); + loadJalviewDataFile(fn[0], (DataSourceType) fn[1], + (FileFormatI) fn[2], null); } } @@ -5055,7 +5057,19 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { format = new IdentifyFile().identify(file, sourceType); } - if (FileFormat.ScoreMatrix == format) + if (FileFormat.FeatureSettings == format) + { + if (featureSettings != null) + { + featureSettings.load(file, sourceType); + } + else + { + FeatureSettings.loadFeatureSettingsFile(getFeatureRenderer(), + fileObject, sourceType); + } + } + else if (FileFormat.ScoreMatrix == format) { ScoreMatrixFile sm = new ScoreMatrixFile( new FileParse(file, sourceType)); @@ -5841,6 +5855,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } } alignPanel.validateAnnotationDimensions(true); + // TODO this triggers relayout of annotation panel - otherwise annotation + // label height is different to panel height + alignPanel.fontChanged(); alignPanel.alignmentChanged(); } @@ -5969,6 +5986,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { try { + console.setVariable(JalviewObjectI.currentAlFrameName, this); console.runScript(); } catch (Exception ex) {