From: gmungoc Date: Fri, 10 Nov 2017 13:45:50 +0000 (+0000) Subject: JAL-2791 tailored message if find fails on selection region X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-2791selectVisibleFeatures;p=jalview.git JAL-2791 tailored message if find fails on selection region --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 5d9bdff..47b0c6c 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1010,7 +1010,8 @@ label.toggled = Toggled label.marked = Marked label.containing = containing label.not_containing = not containing -label.no_feature_of_type_found = No features of type {0} found. +label.no_feature_of_type_found = No features of type {0} found +label.no_feature_found_selection = No features of type {0} found in selection label.submission_params = Submission {0} label.empty_alignment_job = Empty Alignment Job label.add_new_sbrs_service = Add a new Simple Bioinformatics Rest Service diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index e8fd411..3b8d343 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -935,7 +935,8 @@ label.toggled = Invertida label.marked = Marcada label.containing = conteniendo label.not_containing = no conteniendo -label.no_feature_of_type_found = No se han encontrado características del tipo {0}. +label.no_feature_of_type_found = No se han encontrado características del tipo {0} +label.no_feature_found_selection = No se han encontrado características del tipo {0} en la región seleccionada label.submission_params = Envío {0} label.empty_alignment_job = Trabajo de alineamiento vacío label.add_new_sbrs_service = Añadir un nuevo SBRS diff --git a/src/jalview/controller/AlignViewController.java b/src/jalview/controller/AlignViewController.java index 7bb295e..70e4ef7 100644 --- a/src/jalview/controller/AlignViewController.java +++ b/src/jalview/controller/AlignViewController.java @@ -164,9 +164,10 @@ public class AlignViewController implements AlignViewControllerI // JBPNote this routine could also mark rows, not just columns. // need a decent query structure to allow all types of feature searches BitSet bs = new BitSet(); - SequenceCollectionI sqcol = (viewport.getSelectionGroup() == null - || extendCurrent) ? viewport.getAlignment() - : viewport.getSelectionGroup(); + boolean searchSelection = viewport.getSelectionGroup() != null + && !extendCurrent; + SequenceCollectionI sqcol = searchSelection ? viewport + .getSelectionGroup() : viewport.getAlignment(); int nseq = findColumnsWithFeature(featureType, sqcol, bs); @@ -202,9 +203,10 @@ public class AlignViewController implements AlignViewControllerI } else { - avcg.setStatus(MessageManager - .formatMessage("label.no_feature_of_type_found", new String[] - { featureType })); + String key = searchSelection ? "label.no_feature_found_selection" + : "label.no_feature_of_type_found"; + avcg.setStatus(MessageManager.formatMessage(key, + new String[] { featureType })); if (!extendCurrent) { cs.clear();