From f269ceeb37293f592c4916dd91cff9c4fdd3f874 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Thu, 27 Oct 2016 15:24:18 +0100 Subject: [PATCH] JAL-2280 Improvement to enable drag'n'drop association of mmCIF file structures to sequences --- resources/lang/Messages.properties | 4 ++-- resources/lang/Messages_es.properties | 4 ++-- src/jalview/gui/AlignFrame.java | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index bcbc24b..864e34a 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -382,8 +382,8 @@ label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = label.translation_failed = Translation Failed label.error_when_translating_sequences_submit_bug_report = Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace. label.implementation_error = Implementation error: -label.automatically_associate_pdb_files_with_sequences_same_name = Do you want to automatically associate the {0} PDB files with sequences in the alignment that have the same name? -label.automatically_associate_pdb_files_by_name = Automatically Associate PDB files by name +label.automatically_associate_structure_files_with_sequences_same_name = Do you want to automatically associate the {0} structure file(s) with sequences in the alignment that have the same name? +label.automatically_associate_structure_files_by_name = Automatically Associate Structure files by name label.ignore_unmatched_dropped_files_info = Do you want to ignore the {0} files whose names did not match any sequence IDs ? label.ignore_unmatched_dropped_files = Ignore unmatched dropped files? label.view_name_original = Original diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 4112d19..754d94d 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -351,8 +351,8 @@ label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = label.translation_failed = Translation Failed label.error_when_translating_sequences_submit_bug_report = Desafortunadamente, algo fue mal a la hora de traducir tus secuencias.\nPor favor, revisa la consola Jalview java \ny presenta un informe de error que incluya el seguimiento. label.implementation_error = Error de implementación: -label.automatically_associate_pdb_files_with_sequences_same_name = Quieres asociar automáticamente los {0} ficheros PDB con las secuencias del alineamiento que tengan el mismo nombre? -label.automatically_associate_pdb_files_by_name = Asociar los ficheros PDB por nombre automáticamente +label.automatically_associate_structure_files_with_sequences_same_name = Quieres asociar automáticamente los {0} ficheros structure con las secuencias del alineamiento que tengan el mismo nombre? +label.automatically_associate_structure_files_by_name = Asociar los ficheros structure por nombre automáticamente label.ignore_unmatched_dropped_files_info = Quieres ignorar los {0} ficheros cuyos nombres no coincidan con ningún IDs de las secuencias ? label.ignore_unmatched_dropped_files = Ignorar los ficheros sin coincidencias? label.enter_view_name = Introduzca un nombre para la vista diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 80ee82d..e8b865b 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -4885,7 +4885,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } if (type != null) { - if (type.equalsIgnoreCase("PDB")) + if (type.equalsIgnoreCase("PDB") + || type.equalsIgnoreCase("mmCIF")) { filesmatched.add(new Object[] { file, protocol, mtch }); continue; @@ -4905,14 +4906,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, this, MessageManager .formatMessage( - "label.automatically_associate_pdb_files_with_sequences_same_name", + "label.automatically_associate_structure_files_with_sequences_same_name", new Object[] { Integer .valueOf( filesmatched .size()) .toString() }), MessageManager - .getString("label.automatically_associate_pdb_files_by_name"), + .getString("label.automatically_associate_structure_files_by_name"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { -- 1.7.10.2