Merge branch 'merge/JAL-3628+JAL-3608+JAL-3609+JAL-3541+Release_2_11_1_Branch' into...
authorJim Procter <jprocter@issues.jalview.org>
Wed, 5 Aug 2020 14:47:31 +0000 (15:47 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 5 Aug 2020 14:47:31 +0000 (15:47 +0100)
1  2 
resources/lang/Messages.properties
resources/lang/Messages_es.properties
src/jalview/bin/Jalview.java

@@@ -377,7 -377,7 +377,7 @@@ label.example = Exampl
  label.example_param = Example: {0}
  label.select_file_format_before_saving = You must select a file format before saving!
  label.file_format_not_specified = File format not specified
- label.couldnt_save_file = Couldn't save file: {0}
+ label.couldnt_save_file = Couldn''t save file: {0}
  label.error_saving_file = Error Saving File
  label.remove_from_default_list = Remove from default list?
  label.remove_user_defined_colour = Remove user defined colour
@@@ -406,11 -406,11 +406,11 @@@ label.pdb_entries_couldnt_be_retrieved 
  label.couldnt_load_file = Couldn't load file
  label.couldnt_find_pdb_id_in_file = Couldn't find a PDB id in the file supplied. Please enter an Id to identify this structure.
  label.no_pdb_id_in_file = No PDB Id in File
- label.couldnt_read_pasted_text = Couldn't read the pasted text {0}
+ label.couldnt_read_pasted_text = Couldn''t read the pasted text {0}
  label.error_parsing_text = Error parsing text
  label.input_alignment_from_url = Input Alignment From URL
  label.input_alignment = Input Alignment
- label.couldnt_import_as_vamsas_session = Couldn't import {0} as a new vamsas session.
+ label.couldnt_import_as_vamsas_session = Couldn''t import {0} as a new vamsas session.
  label.vamsas_document_import_failed = Vamsas Document Import Failed
  label.couldnt_locate = Could not locate {0}
  label.url_not_found = URL not found
@@@ -855,7 -855,7 +855,7 @@@ label.invalid_name = Invalid nam
  label.set_proxy_settings = Please set up your proxy settings in the 'Connections' tab of the Preferences window
  label.proxy_authorization_failed = Proxy Authorization Failed
  label.internal_jalview_error = Internal Jalview Error
- label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn't be located.
+ label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn''t be located.
  label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service\!
  label.msa_service_is_unknown = The Multiple Sequence Alignment Service named {0} is unknown
  label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service\!
@@@ -985,7 -985,7 +985,7 @@@ error.cannot_set_arguments_to_jabaws_pa
  error.implementation_error_runner_config_not_available = Implementation Error: Runner Config not available for a JABAWS service of type {0} ({1})
  error.implementation_error_cannot_handle_jaba_param = Implementation Error: Cannot handle Jaba parameter object {0}
  error.implementation_error_attempt_to_delete_service_preset = Implementation error: Attempt to delete a service preset!
- error.implementation_error_cannot_locate_oldname_presetname = Implementation error: Can't locate either oldname ({0}) or presetName ({1}in the datastore!"
+ error.implementation_error_cannot_locate_oldname_presetname = Implementation error: Can''t locate either oldname ({0}) or presetName ({1}in the datastore!"
  error.implementation_error_jabaws_param_set_only_handled_by = Implementation error: JabaWsParamSets can only be handled by JabaParamStore
  error.cannot_set_source_file_for = Cannot set source file for {0}
  error.mismatch_service_instance_preset = Probable mismatch between service instance and preset!
@@@ -993,7 -993,7 +993,7 @@@ error.cannot_set_params_for_ws_preset 
  error.implementation_error_can_only_instantiate_jaba_param_sets = Implementation error: Can only instantiate Jaba parameter sets
  error.no_aacon_service_found = No AACon service found
  error.implementation_error_couldnt_copy_value_constraint = Implementation error: could not copy ValueConstrain!
- error.couldnt_encode_as_utf8 = Couldn't encode {0} as UTF-8.
+ error.couldnt_encode_as_utf8 = Couldn''t encode {0} as UTF-8.
  error.tree_inputtype_not_yet_implemented = Tree InputType not yet implemented
  error.implementation_error_need_to_have_httpresponse = Implementation Error: need to have an HttpResponse to process
  error.dbrefsource_implementation_exception =DBRefSource Implementation Exception
@@@ -1049,18 -1049,18 +1049,18 @@@ error.implementation_error_reset_called
  exception.number_of_residues_in_query_sequence_differ_from_prediction = Number of residues in {0} supposed query sequence ({1}\n{2})\ndiffer from number of prediction sites in prediction ({3})
  label.mapped = mapped
  exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: Entry ({0}) has an unexpected number of columns
- exception.couldnt_parse_concise_annotation_for_prediction = Couldn't parse concise annotation for prediction profile.\n{0}
+ exception.couldnt_parse_concise_annotation_for_prediction = Couldn''t parse concise annotation for prediction profile.\n{0}
  exception.newfile = NewickFile\: {0}\n
  label.no_tree_read_in = No Tree read in
- exception.rnaml_couldnt_access_datasource = Couldn't access datasource ({0})
- exception.ranml_couldnt_process_data = Couldn't process data as RNAML file ({0})
+ exception.rnaml_couldnt_access_datasource = Couldn''t access datasource ({0})
+ exception.ranml_couldnt_process_data = Couldn''t process data as RNAML file ({0})
  exception.ranml_invalid_file = Invalid RNAML file ({0})
  exception.ranml_problem_parsing_data = Problem parsing data as RNAML ({0})
  exception.pfam_no_sequences_found = No sequences found (PFAM input)
  exception.stockholm_invalid_format = This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'
  exception.couldnt_parse_sequence_line = Could not parse sequence line: {0}
  exception.unknown_annotation_detected = Unknown annotation detected: {0} {1}
- exception.couldnt_store_sequence_mappings = Couldn't store sequence mappings for {0}
+ exception.couldnt_store_sequence_mappings = Couldn''t store sequence mappings for {0}
  exception.matrix_too_many_iteration = Too many iterations in {0} (max is {1})
  exception.browser_not_found = Exception in finding browser: {0}
  exception.browser_unable_to_locate = Unable to locate browser: {0}
@@@ -1071,6 -1071,7 +1071,6 @@@ exception.unable_to_create_internet_con
  exception.invocation_target_calling_url = InvocationTargetException while calling openURL: {0}
  exception.illegal_access_calling_url = IllegalAccessException while calling openURL: {0}
  exception.interrupted_launching_browser = InterruptedException while launching browser: {0}
 -exception.ebiembl_retrieval_failed_on = EBI EMBL XML retrieval failed on {0}:{1}
  exception.no_pdb_records_for_chain = No PDB Records for {0} chain {1}
  exception.unexpected_handling_rnaml_translation_for_pdb = Unexpected exception when handling RNAML translation of PDB data
  exception.couldnt_recover_sequence_properties_for_alignment = Couldn't recover sequence properties for alignment
@@@ -1093,7 -1094,7 +1093,7 @@@ warn.service_not_supported = Service no
  warn.input_is_too_big = Input is too big!
  warn.invalid_job_param_set = Invalid job parameter set!
  warn.oneseq_msainput_selection = The current selection only contains a single sequence. Do you want to submit all sequences for alignment instead ?   
- info.job_couldnt_be_run_server_doesnt_support_program = Job could not be run because the server doesn't support this program.\n{0}
+ info.job_couldnt_be_run_server_doesnt_support_program = Job could not be run because the server doesn''t support this program.\n{0}
  info.job_couldnt_be_run_exceeded_hard_limit = Job could not be run because it exceeded a hard limit on the server.\n{0}
  info.job_couldnt_be_run_incorrect_param_setting = Job could not be run because some of the parameter settings are not supported by the server.\n{0}\nPlease check to make sure you have used the correct parameter set for this service\!\n
  info.no_jobs_ran = No jobs ran
@@@ -1345,6 -1346,7 +1345,7 @@@ label.backupfiles_confirm_save_file = C
  label.backupfiles_confirm_save_file_backupfiles_roll_wrong = Something possibly went wrong with the backups of this file.
  label.backupfiles_confirm_save_new_saved_file_ok = The new saved file seems okay.
  label.backupfiles_confirm_save_new_saved_file_not_ok = The new saved file might not be okay.
+ label.continue_operation = Continue operation?
  label.backups = Backups
  label.backup = Backup
  label.backup_files = Backup Files
@@@ -1411,3 -1413,7 +1412,7 @@@ label.include_linked_features = Includ
  label.include_linked_tooltip = Include visible {0} features<br>converted to local sequence coordinates
  label.features_not_shown = {0} feature(s) not shown
  label.no_features_to_sort_by = No features to sort by
+ label.log_level = Log level
+ label.log_level_tooltip = Temporarily set the log level for this console
+ label.copy_to_clipboard = Copy to clipboard
+ label.copy_to_clipboard_tooltip = Copy all of the log text in this console to the system clipboard
@@@ -995,6 -995,7 +995,6 @@@ exception.unable_to_create_internet_con
  exception.invocation_target_calling_url = InvocationTargetException mientras se invocaba openURL: {0}
  exception.illegal_access_calling_url = IllegalAccessException mientras se invocaba openURL: {0}
  exception.interrupted_launching_browser = InterruptedException mientras se lanzaba el navegador: {0}
 -exception.ebiembl_retrieval_failed_on = La recuperación de datos EBI EMBL XML ha fallado en {0}:{1}
  exception.no_pdb_records_for_chain = No se han encontrado registros {0} para la cadena {1}
  exception.unexpected_handling_rnaml_translation_for_pdb = Excepcion inesperada cuando se traducían a RNAML los datos PDB
  exception.couldnt_recover_sequence_properties_for_alignment = No es posible recuperar las propiedades de la secuencia para el alineamiento
@@@ -1346,6 -1347,7 +1346,7 @@@ label.backupfiles_confirm_save_file = C
  label.backupfiles_confirm_save_file_backupfiles_roll_wrong = Posiblemente algo está mal con los archivos de respaldos.
  label.backupfiles_confirm_save_new_saved_file_ok = El nuevo archivo guardado parece estar bien.
  label.backupfiles_confirm_save_new_saved_file_not_ok = El nuevo archivo guardado podría no estar bien.
+ label.continue_operation = ¿Continuar operación?
  label.backups = Respaldos
  label.backup = Respaldo
  label.backup_files = Archivos de respaldos
@@@ -1412,3 -1414,7 +1413,7 @@@ label.include_linked_features = Inclui
  label.include_linked_tooltip = Incluir características de {0}<br>convertidas a coordenadas de secuencia local
  label.features_not_shown = {0} característica(s) no mostradas
  label.no_features_to_sort_by = No hay características para ordenar
+ label.log_level = Nivel del registro
+ label.log_level_tooltip = Establezca temporalmente el nivel de registro para esta consola
+ label.copy_to_clipboard = Copiar en el portapapeles
+ label.copy_to_clipboard_tooltip = Copie todo el texto de registro en esta consola al portapapeles del sistema
@@@ -297,90 -297,7 +297,7 @@@ public class Jalvie
  
      desktop = null;
  
-     // property laf = "crossplatform", "system", "gtk", "metal" or "mac"
-     // If not set (or chosen laf fails), use the normal SystemLaF and if on Mac,
-     // try Quaqua/Vaqua.
-     String lafProp = System.getProperty("laf");
-     String lafSetting = Cache.getDefault("PREFERRED_LAF", null);
-     String laf = "none";
-     if (lafProp != null)
-     {
-       laf = lafProp;
-     }
-     else if (lafSetting != null)
-     {
-       laf = lafSetting;
-     }
-     boolean lafSet = false;
-     switch (laf)
-     {
-     case "crossplatform":
-       lafSet = setCrossPlatformLookAndFeel();
-       if (!lafSet)
-       {
-         System.err.println("Could not set requested laf=" + laf);
-       }
-       break;
-     case "system":
-       lafSet = setSystemLookAndFeel();
-       if (!lafSet)
-       {
-         System.err.println("Could not set requested laf=" + laf);
-       }
-       break;
-     case "gtk":
-       lafSet = setGtkLookAndFeel();
-     {
-       System.err.println("Could not set requested laf=" + laf);
-     }
-       break;
-     case "metal":
-       lafSet = setMetalLookAndFeel();
-     {
-       System.err.println("Could not set requested laf=" + laf);
-     }
-       break;
-     case "nimbus":
-       lafSet = setNimbusLookAndFeel();
-     {
-       System.err.println("Could not set requested laf=" + laf);
-     }
-       break;
-     case "quaqua":
-       lafSet = setQuaquaLookAndFeel();
-     {
-       System.err.println("Could not set requested laf=" + laf);
-     }
-       break;
-     case "vaqua":
-       lafSet = setVaquaLookAndFeel();
-     {
-       System.err.println("Could not set requested laf=" + laf);
-     }
-       break;
-     case "mac":
-       lafSet = setMacLookAndFeel();
-       if (!lafSet)
-       {
-         System.err.println("Could not set requested laf=" + laf);
-       }
-       break;
-     case "none":
-       break;
-     default:
-       System.err.println("Requested laf=" + laf + " not implemented");
-     }
-     if (!lafSet)
-     {
-       setSystemLookAndFeel();
-       if (Platform.isLinux()) {
-         setMetalLookAndFeel();
-       }
-       if (Platform.isAMac())
-       {
-         setMacLookAndFeel();
-       }
-     }
+     setLookAndFeel();
  
      /*
       * configure 'full' SO model if preferences say to, else use the default (SO
          JalviewTaskbar.setTaskbar(this);
        } catch (Exception e)
        {
-         System.out.println("Cannot set Taskbar");
+         Cache.log.info("Cannot set Taskbar");
+         Cache.log.error(e.getMessage());
          // e.printStackTrace();
        } catch (Throwable t)
        {
-         System.out.println("Cannot set Taskbar");
+         Cache.log.info("Cannot set Taskbar");
+         Cache.log.error(t.getMessage());
          // t.printStackTrace();
        }
  
      }
    }
  
+   private static void setLookAndFeel()
+   {
+     // property laf = "crossplatform", "system", "gtk", "metal", "nimbus" or
+     // "mac"
+     // If not set (or chosen laf fails), use the normal SystemLaF and if on Mac,
+     // try Quaqua/Vaqua.
+     String lafProp = System.getProperty("laf");
+     String lafSetting = Cache.getDefault("PREFERRED_LAF", null);
+     String laf = "none";
+     if (lafProp != null)
+     {
+       laf = lafProp;
+     }
+     else if (lafSetting != null)
+     {
+       laf = lafSetting;
+     }
+     boolean lafSet = false;
+     switch (laf)
+     {
+     case "crossplatform":
+       lafSet = setCrossPlatformLookAndFeel();
+       if (!lafSet)
+       {
+         Cache.log.error("Could not set requested laf=" + laf);
+       }
+       break;
+     case "system":
+       lafSet = setSystemLookAndFeel();
+       if (!lafSet)
+       {
+         Cache.log.error("Could not set requested laf=" + laf);
+       }
+       break;
+     case "gtk":
+       lafSet = setGtkLookAndFeel();
+       if (!lafSet)
+       {
+         Cache.log.error("Could not set requested laf=" + laf);
+       }
+       break;
+     case "metal":
+       lafSet = setMetalLookAndFeel();
+       if (!lafSet)
+       {
+         Cache.log.error("Could not set requested laf=" + laf);
+       }
+       break;
+     case "nimbus":
+       lafSet = setNimbusLookAndFeel();
+       if (!lafSet)
+       {
+         Cache.log.error("Could not set requested laf=" + laf);
+       }
+       break;
+     case "quaqua":
+       lafSet = setQuaquaLookAndFeel();
+       if (!lafSet)
+       {
+         Cache.log.error("Could not set requested laf=" + laf);
+       }
+       break;
+     case "vaqua":
+       lafSet = setVaquaLookAndFeel();
+       if (!lafSet)
+       {
+         Cache.log.error("Could not set requested laf=" + laf);
+       }
+       break;
+     case "mac":
+       lafSet = setMacLookAndFeel();
+       if (!lafSet)
+       {
+         Cache.log.error("Could not set requested laf=" + laf);
+       }
+       break;
+     case "none":
+       break;
+     default:
+       Cache.log.error("Requested laf=" + laf + " not implemented");
+     }
+     if (!lafSet)
+     {
+       setSystemLookAndFeel();
+       if (Platform.isLinux())
+       {
+         setMetalLookAndFeel();
+       }
+       if (Platform.isAMac())
+       {
+         setMacLookAndFeel();
+       }
+     }
+   }
    private static boolean setCrossPlatformLookAndFeel()
    {
      boolean set = false;
        set = true;
      } catch (Exception ex)
      {
-       System.err.println("Unexpected Look and Feel Exception");
-       ex.printStackTrace();
+       Cache.log.error("Unexpected Look and Feel Exception");
+       Cache.log.error(ex.getMessage());
+       Cache.log.debug(Cache.getStackTraceString(ex));
      }
      return set;
    }
        set = true;
      } catch (Exception ex)
      {
-       System.err.println("Unexpected Look and Feel Exception");
-       ex.printStackTrace();
+       Cache.log.error("Unexpected Look and Feel Exception");
+       Cache.log.error(ex.getMessage());
+       Cache.log.debug(Cache.getStackTraceString(ex));
      }
      return set;
    }
        set = true;
      } catch (Exception ex)
      {
-       System.err.println("Unexpected Look and Feel Exception");
-       ex.printStackTrace();
+       Cache.log.error("Unexpected Look and Feel Exception");
+       Cache.log.error(ex.getMessage());
+       Cache.log.debug(Cache.getStackTraceString(ex));
      }
      return set;
    }
                      + "-jabaws URL\tSpecify URL for Jabaws services (e.g. for a local installation).\n"
                      + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
                      + "-groovy FILE\tExecute groovy script in FILE, after all other arguments have been processed (if FILE is the text 'STDIN' then the file will be read from STDIN)\n"
 +                    + "-jvmmempc=PERCENT\tOnly available with standalone executable jar or jalview.bin.Launcher. Limit maximum heap size (memory) to PERCENT% of total physical memory detected. This defaults to 90 if total physical memory can be detected. See https://www.jalview.org/help/html/memory.html for more details.\n"
 +                    + "-jvmmemmax=MAXMEMORY\tOnly available with standalone executable jar or jalview.bin.Launcher. Limit maximum heap size (memory) to MAXMEMORY. MAXMEMORY can be specified in bytes, kilobytes(k), megabytes(m), gigabytes(g) or if you're lucky enough, terabytes(t). This defaults to 32g if total physical memory can be detected, or to 8g if total physical memory cannot be detected. See https://www.jalview.org/help/html/memory.html for more details.\n"
                      + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n");
    }