JAL-2791 tailored message if find fails on selection region bug/JAL-2791selectVisibleFeatures
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 10 Nov 2017 13:45:50 +0000 (13:45 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 10 Nov 2017 13:45:50 +0000 (13:45 +0000)
resources/lang/Messages.properties
resources/lang/Messages_es.properties
src/jalview/controller/AlignViewController.java

index 5d9bdff..47b0c6c 100644 (file)
@@ -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
index e8fd411..3b8d343 100644 (file)
@@ -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
index 7bb295e..70e4ef7 100644 (file)
@@ -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();