JAL-1355
authordarolmar <darolmar@gmail.com>
Tue, 23 Sep 2014 14:34:33 +0000 (16:34 +0200)
committerdarolmar <darolmar@gmail.com>
Tue, 23 Sep 2014 14:34:33 +0000 (16:34 +0200)
165 files changed:
resources/lang/Messages.properties
src/MCview/PDBViewer.java
src/MCview/PDBfile.java
src/com/stevesoft/pat/Pattern.java
src/com/stevesoft/pat/Regex.java
src/com/stevesoft/pat/Replacer.java
src/com/stevesoft/pat/Transformer.java
src/com/stevesoft/pat/wrap/RandomAccessFileWrap.java
src/ext/vamsas/IRegistryServiceLocator.java
src/ext/vamsas/JpredServiceLocator.java
src/ext/vamsas/MuscleWSServiceLocator.java
src/ext/vamsas/SeqSearchServiceLocator.java
src/jalview/analysis/AlignSeq.java
src/jalview/analysis/AlignmentSorter.java
src/jalview/analysis/Rna.java
src/jalview/appletgui/APopupMenu.java
src/jalview/appletgui/AlignFrame.java
src/jalview/appletgui/AnnotationColourChooser.java
src/jalview/appletgui/AppletJmol.java
src/jalview/appletgui/EmbmenuFrame.java
src/jalview/appletgui/FeatureRenderer.java
src/jalview/appletgui/FeatureSettings.java
src/jalview/appletgui/RedundancyPanel.java
src/jalview/appletgui/SeqPanel.java
src/jalview/appletgui/SliderPanel.java
src/jalview/appletgui/UserDefinedColours.java
src/jalview/bin/Jalview.java
src/jalview/bin/JalviewLite.java
src/jalview/binding/Annotation.java
src/jalview/binding/FeatureSettings.java
src/jalview/binding/JGroup.java
src/jalview/binding/JSeq.java
src/jalview/binding/JalviewModelSequence.java
src/jalview/binding/JalviewUserColours.java
src/jalview/binding/Pdbentry.java
src/jalview/binding/PdbentryItem.java
src/jalview/binding/SequenceSet.java
src/jalview/binding/VAMSAS.java
src/jalview/controller/AlignViewController.java
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/AlignmentOrder.java
src/jalview/datamodel/AlignmentView.java
src/jalview/datamodel/CigarBase.java
src/jalview/datamodel/SeqCigar.java
src/jalview/ext/jmol/JalviewJmolBinding.java
src/jalview/ext/jmol/PDBFileWithJmol.java
src/jalview/ext/paradise/Annotate3D.java
src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/AnnotationColourChooser.java
src/jalview/gui/AnnotationExporter.java
src/jalview/gui/AnnotationPanel.java
src/jalview/gui/AppJmol.java
src/jalview/gui/BlogReader.java
src/jalview/gui/ChimeraViewFrame.java
src/jalview/gui/Console.java
src/jalview/gui/CutAndPasteHtmlTransfer.java
src/jalview/gui/CutAndPasteTransfer.java
src/jalview/gui/Desktop.java
src/jalview/gui/FeatureRenderer.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/FontChooser.java
src/jalview/gui/IdPanel.java
src/jalview/gui/JDatabaseTree.java
src/jalview/gui/Jalview2XML.java
src/jalview/gui/Jalview2XML_V1.java
src/jalview/gui/OOMWarning.java
src/jalview/gui/OptsAndParamsPage.java
src/jalview/gui/PCAPanel.java
src/jalview/gui/Preferences.java
src/jalview/gui/RedundancyPanel.java
src/jalview/gui/SeqPanel.java
src/jalview/gui/SequenceFetcher.java
src/jalview/gui/SliderPanel.java
src/jalview/gui/TextColourChooser.java
src/jalview/gui/TreeCanvas.java
src/jalview/gui/TreePanel.java
src/jalview/gui/UserDefinedColours.java
src/jalview/gui/VamsasApplication.java
src/jalview/gui/WebserviceInfo.java
src/jalview/gui/WsJobParameters.java
src/jalview/gui/WsParamSetManager.java
src/jalview/gui/WsPreferences.java
src/jalview/io/AlignFile.java
src/jalview/io/AppletFormatAdapter.java
src/jalview/io/FileLoader.java
src/jalview/io/FileParse.java
src/jalview/io/HTMLOutput.java
src/jalview/io/JPredFile.java
src/jalview/io/JalviewFileChooser.java
src/jalview/io/JnetAnnotationMaker.java
src/jalview/io/NewickFile.java
src/jalview/io/PfamFile.java
src/jalview/io/RnamlFile.java
src/jalview/io/StockholmFile.java
src/jalview/io/VamsasAppDatastore.java
src/jalview/io/WSWUBlastClient.java
src/jalview/io/vamsas/DatastoreItem.java
src/jalview/io/vamsas/Rangetype.java
src/jalview/jbgui/GAlignFrame.java
src/jalview/jbgui/GSequenceLink.java
src/jalview/math/Matrix.java
src/jalview/schemabinding/version2/AlcodonFrame.java
src/jalview/schemabinding/version2/Annotation.java
src/jalview/schemabinding/version2/Feature.java
src/jalview/schemabinding/version2/FeatureSettings.java
src/jalview/schemabinding/version2/JGroup.java
src/jalview/schemabinding/version2/JSeq.java
src/jalview/schemabinding/version2/JalviewModelSequence.java
src/jalview/schemabinding/version2/JalviewUserColours.java
src/jalview/schemabinding/version2/MapListType.java
src/jalview/schemabinding/version2/Pdbentry.java
src/jalview/schemabinding/version2/PdbentryItem.java
src/jalview/schemabinding/version2/Pdbids.java
src/jalview/schemabinding/version2/Sequence.java
src/jalview/schemabinding/version2/SequenceSet.java
src/jalview/schemabinding/version2/VAMSAS.java
src/jalview/schemabinding/version2/Viewport.java
src/jalview/schemabinding/version2/WebServiceParameterSet.java
src/jalview/schemes/ResidueColourScheme.java
src/jalview/structure/StructureSelectionManager.java
src/jalview/util/AWTConsole.java
src/jalview/util/BrowserLauncher.java
src/jalview/util/GroupUrlLink.java
src/jalview/ws/AWSThread.java
src/jalview/ws/DBRefFetcher.java
src/jalview/ws/DasSequenceFeatureFetcher.java
src/jalview/ws/EnfinEnvision2OneWay.java
src/jalview/ws/dbsources/EmblXmlSource.java
src/jalview/ws/dbsources/Pdb.java
src/jalview/ws/dbsources/das/datamodel/DasSequenceSource.java
src/jalview/ws/dbsources/das/datamodel/JalviewSource.java
src/jalview/ws/ebi/EBIFetchClient.java
src/jalview/ws/jws1/Annotate3D.java
src/jalview/ws/jws1/JPredClient.java
src/jalview/ws/jws1/JPredThread.java
src/jalview/ws/jws1/MsaWSThread.java
src/jalview/ws/jws1/SeqSearchWSClient.java
src/jalview/ws/jws1/SeqSearchWSThread.java
src/jalview/ws/jws1/WS1Client.java
src/jalview/ws/jws2/JabaParamStore.java
src/jalview/ws/jws2/JabaPreset.java
src/jalview/ws/jws2/JabawsCalcWorker.java
src/jalview/ws/jws2/JabawsMsaInterfaceAlignCalcWorker.java
src/jalview/ws/jws2/Jws2Client.java
src/jalview/ws/jws2/MsaWSThread.java
src/jalview/ws/jws2/ParameterUtils.java
src/jalview/ws/jws2/SequenceAnnotationWSClient.java
src/jalview/ws/jws2/dm/AAConSettings.java
src/jalview/ws/jws2/dm/JabaOption.java
src/jalview/ws/jws2/dm/JabaValueConstrain.java
src/jalview/ws/jws2/dm/JabaWsParamSet.java
src/jalview/ws/jws2/jabaws2/Jws2Instance.java
src/jalview/ws/rest/HttpResultSet.java
src/jalview/ws/rest/RestClient.java
src/jalview/ws/rest/RestJobThread.java
src/jalview/ws/rest/params/JobConstant.java
src/jalview/ws/rest/params/SeqGroupIndexVector.java
src/jalview/ws/rest/params/Tree.java
src/jalview/ws/seqfetcher/ASequenceFetcher.java
src/org/jibble/epsgraphics/EpsDocument.java
src/org/jibble/epsgraphics/EpsGraphics2D.java
src/uk/ac/ebi/www/WSWUBlastServiceLocator.java
src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java

index 8727627..5c0c9c5 100644 (file)
@@ -58,7 +58,7 @@ action.by_id = by Id
 action.by_length = by Length\r
 action.by_group = by Group\r
 action.remove = Remove\r
-action.remove_redundancy = Remove Redundancy...\r
+action.remove_redundancy = Remove Redundancy\r
 action.pairwise_alignment = Pairwise Alignments...\r
 action.by_rna_helixes = by RNA Helices\r
 action.user_defined = User Defined...\r
@@ -308,7 +308,7 @@ label.to_file = to File
 label.to_textbox = to Textbox\r
 label.jalview = Jalview\r
 label.csv_spreadsheet = CSV (Spreadsheet)\r
-label.status =  [Status]\r
+label.status = Status\r
 label.channels = Channels\r
 label.channel_title_item_count = {0} ({1})\r
 label.blog_item_published_on_date = {0} {1} \r
@@ -455,8 +455,8 @@ label.settings_for_type = Settings for {0}
 label.view_full_application = View in Full Application\r
 label.load_associated_tree = Load Associated Tree ...\r
 label.load_features_annotations = Load Features/Annotations ...\r
-label.export_features = Export Features ...\r
-label.export_annotations = Export Annotations ...\r
+label.export_features = Export Features\r
+label.export_annotations = Export Annotations\r
 label.jalview_copy = Copy (Jalview Only)\r
 label.jalview_cut = Cut (Jalview Only)\r
 label.to_upper_case = To Upper Case\r
@@ -647,7 +647,7 @@ label.edit_sequence_name_description = Edit Sequence Name/Description
 label.spaces_converted_to_backslashes = Spaces have been converted to _\r
 label.no_spaces_allowed_sequence_name = No spaces allowed in Sequence Name\r
 label.select_outline_colour = Select Outline Colour\r
-label.web_browser_not_found_unix = Unixers\: Couldn't find default web browser.\nAdd the full path to your browser in Preferences."\r
+label.web_browser_not_found_unix = Unixers: Couldn't find default web browser.\nAdd the full path to your browser in Preferences."\r
 label.web_browser_not_found = Web browser not found\r
 label.select_pdb_file_for = Select a PDB file for {0}\r
 label.html = HTML\r
@@ -806,7 +806,309 @@ label.set_proxy_settings = Please set up your proxy settings in the 'Connections
 label.proxy_authorization_failed = Proxy Authorization Failed\r
 label.internal_jalview_error = Internal Jalview Error\r
 label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn't be located.\r
-label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service!\r
+label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service\!\r
 label.msa_service_is_unknown = The Multiple Sequence Alignment Service named {0} is unknown\r
-label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service!\r
+label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service\!\r
 label.seq_search_service_is_unknown = The Sequence Search Service named {0} is unknown\r
+label.feature_type = Feature Type\r
+label.display = Display\r
+label.service_url = Service URL\r
+label.copied_sequences = Copied sequences\r
+label.cut_sequences = Cut Sequences\r
+label.conservation_colour_increment = Conservation Colour Increment ({0})\r
+label.percentage_identity_thereshold = Percentage Identity Thereshold ({0})\r
+label.error_unsupported_owwner_user_colour_scheme = Unsupported owner for User Colour scheme dialog\r
+label.save_alignment_to_file = Save Alignment to file\r
+label.save_features_to_file = Save Features to File\r
+label.save_annotation_to_file = Save Annotation to File\r
+label.no_features_on_alignment = No features found on alignment\r
+label.save_pdb_file = Save PDB File\r
+label.save_text_to_file = Save Text to File\r
+label.save_state = Save State\r
+label.restore_state = Restore State\r
+label.saving_jalview_project = Saving jalview project {0}\r
+label.loading_jalview_project = Loading jalview project {0}\r
+label.save_vamsas_document_archive = Save Vamsas Document Archive\r
+label.saving_vamsas_doc = Saving VAMSAS Document to {0}\r
+label.load_feature_colours = Load Feature Colours\r
+label.save_feature_colours = Save Feature Colour Scheme\r
+label.dataset_for = {0} Dataset for {1}\r
+label.select_startup_file = Select startup file\r
+label.select_default_browser = Select default web browser\r
+label.save_tree_as_newick = Save tree as newick file\r
+label.create_eps_from_tree = Create EPS file from tree\r
+label.create_png_from_tree = Create PNG image from tree\r
+label.save_colour_scheme = Save colour scheme\r
+label.edit_params_for = Edit parameters for {0}\r
+label.choose_filename_for_param_file = Choose a filename for this parameter file\r
+label.save_as_html = Save as HTML\r
+label.recently_opened = Recently Opened\r
+label.blasting_for_unidentified_sequence_jobs_running = BLASTing for unidentified sequences - {0}  jobs running.\r
+label.tree_from = Tree from {0}\r
+label.webservice_job_title = {0} using {1}\r
+label.select_visible_region_of = selected {0} region of {1}\r
+label.visible = Visible\r
+label.select_unselect_visible_regions_from = select and unselected {0} regions from {1}\r
+label.visible_region_of = visible region of\r
+label.webservice_job_title_on = {0} using {1} on {2}\r
+label.updating_vamsas_session = Updating vamsas session\r
+label.loading_file = Loading File: {0}\r
+label.edit_params = Edit {0}\r
+error.not_implemented = Not implemented\r
+error.no_such_method_as_clone1_for = No such method as clone1 for {0}\r
+error.null_from_clone1 = Null from clone1!\r
+error.implementation_error_sortbyfeature = Implementation Error - sortByFeature method must be one of FEATURE_SCORE, FEATURE_LABEL or FEATURE_DENSITY.\r
+error.not_yet_implemented = Not yet implemented\r
+error.unknown_type_dna_or_pep = Unknown Type {0} - dna or pep are the only allowed values.\r
+error.implementation_error_dont_know_thereshold_annotationcolourgradient = Implementation error: don't know about threshold setting for current AnnotationColourGradient.\r
+error.implementation_error_embeddedpopup_not_null = Implementation error - embeddedPopup must be non-null\r
+error.invalid_colour_for_mycheckbox = Invalid color for MyCheckBox\r
+error.implementation_error_unrecognised_render_object_for_features_type = Implementation Error: Unrecognised render object {0} for features of type {1}\r
+error.implementation_error_unsupported_feature_colour_object = Implementation error: Unsupported feature colour object.\r
+error.invalid_separator_parameter = Invalid separator parameter - must be non-zero length\r
+error.alignment_cigararray_not_implemented = Alignment(CigarArray) not yet implemented\r
+error.weak_sequencei_equivalence_not_yet_implemented = Weak sequenceI equivalence not yet implemented.\r
+error.implementation_error_can_only_make_alignmnet_from_cigararray = Implementation Error - can only make an alignment view from a CigarArray of sequences.\r
+error.empty_view_cannot_be_updated = empty view cannot be updated.\r
+error.mismatch_between_number_of_sequences_in_block = Mismatch between number of sequences in block {0} ({1}) and the original view ({2})\r
+error.padding_not_yet_implemented = Padding not yet implemented\r
+error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view = Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks={0})\r
+error.unknown_seq_cigar_operation = Unknown SeqCigar operation '{0}'\r
+error.implementation_bug_parse_cigar_string = Implementation bug in parseCigarString\r
+error.implementation_error_invalid_operation_string = Implementation error. Invalid operation string.\r
+error.invalid_range_string = Invalid range string (must be zero or positive number)\r
+error.implementation_error_delete_range_out_of_bounds = Implementation Error: deleteRange out of bounds: start must be non-negative and less than end.\r
+error.implementation_error = Implementation error\r
+error.implementation_error_unknown_operation = Implementation Error! Unknown operation '{0}'\r
+error.implementation_error_unexpected_null_from_get_sequence_and_deletions = Implementation Error - unexpected null from getSequenceAndDeletions\r
+error.implementation_error_set_seq_null = Implementation Error - _setSeq(null,...)\r
+error.implementation_error_s = Implementation Error: _s= {0}\r
+error.implementation_error_seqcigar_possible = SeqCigar: Possible implementation error: sequence is longer than dataset sequence\r
+error.implmentation_bug_seq_null = Implementation Bug. Null seq\r
+error.implementation_bug_cigar_operation_list_range_list = Implementation Bug. Cigar Operation list!= range list\r
+error.not_yet_implemented_cigar_object_from_cigar_string = NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence.\r
+error.implementation_bug_cigar_operation = Implementation Bug. Cigar Operation '{0}' '{1}' not one of '{2}', '{3}', or '{4}'.\r
+error.implementation_error_for_new_cigar = Implementation error for new Cigar(SequenceI)\r
+error.implementation_error_cigar_seq_no_operations = Implementation error: {0}'th sequence Cigar has no operations.\r
+error.implementation_error_jmol_getting_data = Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016\r
+error.implementation_error_no_pdbentry_from_index = Implementation error - no corresponding pdbentry (for index {0}) to add sequences mappings to\r
+error.jmol_version_not_compatible_with_jalview_version = Jmol version {0} is not compatible with this version of Jalview. Report this problem at issues.jalview.org\r
+error.not_implemented_remove = Remove: Not implemented\r
+error.not_implemented_clone = Clone: Not implemented\r
+error.implementation_error_chimera_getting_data = Implementation error - Chimera seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016\r
+error.call_setprogressbar_before_registering_handler = call setProgressBar before registering the progress bar's handler.\r
+label.cancelled_params = Cancelled {0}\r
+error.implementation_error_cannot_show_view_alignment_frame = Implementation error: cannot show a view from another alignment in an AlignFrame.\r
+error.implementation_error_dont_know_about_thereshold_setting = Implementation error: don't know about threshold setting for current AnnotationColourGradient.\r
+error.eps_generation_not_implemented = EPS Generation not yet implemented\r
+error.png_generation_not_implemented = PNG Generation not yet implemented\r
+error.try_join_vamsas_session_another = Trying to join a vamsas session when another is already connected\r
+error.invalid_vamsas_session_id = Invalid vamsas session id\r
+error.implementation_error_cannot_create_groovyshell = Implementation Error. Cannot create groovyShell without Groovy on the classpath!\r
+label.groovy_support_failed = Jalview Groovy Support Failed\r
+label.couldnt_create_groovy_shell = Couldn't create the groovy Shell. Check the error log for the details of what went wrong.\r
+error.unsupported_version_calcIdparam = Unsupported Version for calcIdparam {0}\r
+error.implementation_error_cant_reorder_tree = Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode.\r
+error.invalid_value_for_option = Invalid value {0} for option {1}\r
+error.implementation_error_cannot_import_vamsas_doc = Implementation Error - cannot import existing vamsas document into an existing session, Yet!\r
+label.vamsas_doc_couldnt_be_opened_as_new_session = VAMSAS Document could not be opened as a new session - please choose another\r
+error.implementation_error_vamsas_operation_not_init = Impementation error! Vamsas Operations when client not initialised and connected\r
+error.jalview_no_connected_vamsas_session = Jalview not connected to Vamsas session\r
+error.implementation_error_cannot_recover_vamsas_object_mappings = IMPLEMENTATION ERROR: Cannot recover vamsas object mappings - no backup was made\r
+error.setstatus_called_non_existent_job_pane = setStatus called for non-existent job pane {0}\r
+error.implementation_error_cannot_find_marshaller_for_param_set =Implementation error: Can't find a marshaller for the parameter set\r
+error.implementation_error_old_jalview_object_not_bound =IMPLEMENTATION ERROR: old jalview object is not bound ! ({0})\r
+error.implementation_error_vamsas_doc_class_should_bind_to_type = Implementation Error: Vamsas Document Class {0} should bind to a {1} (found a {2})\r
+error.implementation_error_jalview_class_should_bind_to_type = Implementation Error: Jalview Class {0} should bind to a {1} (found a {2})\r
+error.invalid_vamsas_rangetype_cannot_resolve_lists = Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!\r
+error.implementation_error_maplist_is_null = Implementation error. MapList is null for initMapType.\r
+error.implementation_error_cannot_have_null_alignment = Implementation error: Cannot have null alignment property key\r
+error.implementation_error_null_fileparse = Implementation error. Null FileParse in copy constructor\r
+error.implementation_error_cannot_map_alignment_sequences = IMPLEMENTATION ERROR: Cannot map an alignment of sequences from different datasets into a single alignment in the vamsas document.\r
+error.implementation_error_cannot_duplicate_colour_scheme = Serious implementation error: cannot duplicate colourscheme {0}\r
+error.implementation_error_structure_selection_manager_null = Implementation error. Structure selection manager's context is 'null'\r
+exception.ssm_context_is_null = SSM context is null\r
+error.idstring_seqstrings_only_one_per_sequence = idstrings and seqstrings contain one string each per sequence\r
+error.cannot_have_mixed_length_replacement_vectors = Cannot have mixed length replacement vectors. Replacement vector for {0} is {1} strings long, and have already seen a {2} length vector.\r
+error.cannot_have_zero_length_vector_replacement_strings = Cannot have zero length vector of replacement strings - either 1 value or n values.\r
+error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = Implementation Error! Multiple single sequence prediction jobs are not yet supported\r
+error.implementation_error_invalid_msa_index_for_job =Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object!\r
+error.implementation_error_startjob_called = Implementation error - StartJob(JpredJob) called on {0}\r
+error.multiple_jnet_subjob_merge_not_implemented = Multiple JNet subjob merging not yet implemented\r
+label.job_never_ran = Job never ran - input returned to user.\r
+error.implementation_error_minlen_must_be_greater_zero = Implementation error: minlen must be zero or more\r
+error.implementation_error_msawbjob_called = Implementation error - StartJob(MsaWSJob) called on a WSJobInstance {0}\r
+error.implementation_error_cannot_attach_ws_menu_entry = IMPLEMENTATION ERROR: cannot attach WS Menu Entry without service handle reference!\r
+error.parameter_migration_not_implemented_yet = Parameter migration not implemented yet\r
+error.implementation_error_cannot_set_jaba_option = Implementation error: cannot set Jaba Option to a value outside its allowed value range!\r
+error.implementation_error_valuetype_doesnt_support_jabaws_type = IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type : {0}\r
+error.cannot_create_jabaws_param_set = Cannot create a JabaWSParamSet from non-JabaWS parameters\r
+error.cannot_set_arguments_to_jabaws_param_set = Cannot set arguments to a JabaWSParamSet that are not JabaWS arguments\r
+error.implementation_error_runner_config_not_available = Implementation Error: Runner Config not available for a JABAWS service of type {0} ({1})\r
+error.implementation_error_cannot_handle_jaba_param = Implementation Error: Cannot handle Jaba parameter object {0}\r
+error.implementation_error_attempt_to_delete_service_preset = Implementation error: Attempt to delete a service preset!\r
+error.implementation_error_cannot_locate_oldname_presetname = Implementation error: Can't locate either oldname ({0}) or presetName ({1}in the datastore!"\r
+error.implementation_error_jabaws_param_set_only_handled_by = Implementation error: JabaWsParamSets can only be handled by JabaParamStore\r
+error.cannot_set_source_file_for = Cannot set source file for {0}\r
+error.mismatch_service_instance_preset = Probable mismatch between service instance and preset!\r
+error.cannot_set_params_for_ws_preset = Cannot set Parameters for a Jaba Web service's preset\r
+error.implementation_error_can_only_instantiate_jaba_param_sets = Implementation error: Can only instantiate Jaba parameter sets\r
+error.no_aacon_service_found = No AACon service found\r
+error.implementation_error_couldnt_copy_value_constraint = Implementation error: could not copy ValueConstrain!\r
+error.couldnt_encode_as_utf8 = Couldn't encode '{0}' as UTF-8.\r
+error.tree_inputtype_not_yet_implemented = Tree InputType not yet implemented\r
+error.implementation_error_need_to_have_httpresponse = Implementation Error: need to have an HttpResponse to process\r
+error.dbrefsource_implementation_exception =DBRefSource Implementation Exception\r
+error.implementation_error_dbinstance_must_implement_interface = Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given{0})\r
+error.implementation_error_must_init_dbsources =Implementation error. Must initialise dbSources\r
+label.view_controller_toggled_marked = {0} {1} columns {2} containing features of type {3}  across {4} sequence(s)\r
+label.toggled = Toggled\r
+label.marked = Marked\r
+label.not = not\r
+label.no_feature_of_type_found = No features of type {0} found.\r
+label.submission_params = Submission {0}\r
+label.empty_alignment_job = Empty Alignment Job\r
+label.add_new_sbrs_service = Add a new Simple Bioinformatics Rest Service\r
+label.edit_sbrs_entry = Edit Simple Bioinformatics Rest Service entry\r
+label.pca_recalculating = Recalculating PCA\r
+label.pca_calculating = Calculating PCA\r
+label.select_foreground_colour = Choose foreground colour\r
+label.select_colour_for_text = Select Colour for Text\r
+label.adjunst_foreground_text_colour_thereshold = Adjust Foreground Text Colour Threshold\r
+label.select_subtree_colour = Select Sub-Tree Colour\r
+label.create_new_sequence_features = Create New Sequence Feature(s)\r
+label.amend_delete_features = Amend/Delete Features for {0}\r
+exception.out_of_bounds_for_file = Out of bounds for file: i={0}, Final Buffer: i0={1} iend={2}\r
+exception.null_string_given_to_regex_search = Null String Given to Regex.search\r
+exception.null_string_like_given_to_regex_search = Null StringLike Given to Regex.search\r
+exception.null_string_given_to_regex_reverse_search = Null String Given to Regex.reverseSearch\r
+exception.null_string_like_given_to_regex_reverse_search = Null StringLike Given to Regex.reverseSearch\r
+exception.null_string_like_given_to_regex_search_from = Null String Given to Regex.searchFrom\r
+exception.null_string_like_given_to_regex_search_region = Null String Given to Regex.searchRegion\r
+exception.replace_null_regex_pointer = Replacer has null Regex pointer\r
+exception.bad_pattern_to_regex_perl_code = bad pattern to Regex.perlCode: {0}\r
+exception.no_stub_implementation_for_interface = There is no stub implementation for the interface: {0}\r
+exception.cannot_set_endpoint_address_unknown_port = Cannot set Endpoint Address for Unknown Port {0}\r
+exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis = Querying matching opening parenthesis for non-closing parenthesis character {0}\r
+exception.mismatched_unseen_closing_char = Mismatched (unseen) closing character {0}\r
+exception.mismatched_closing_char = Mismatched closing character {0}\r
+exception.mismatched_opening_char = Mismatched opening character {0} at {1}\r
+exception.invalid_datasource_couldnt_obtain_reader = Invalid datasource. Could not obtain Reader\r
+exception.index_value_not_in_range = {0}: Index value '{1}' not in range [0..{2}]\r
+exception.unterminated_cigar_string = Unterminated cigar string\r
+exception.unexpected_operation_cigar_string_pos = Unexpected operation '{0}' in cigar string (position {1} in '{2}'\r
+exception.couldnt_parse_responde_from_annotated3d_server = Couldn't parse response from Annotate3d server\r
+exception.application_test_npe = Application test: throwing an NullPointerException It should arrive at the console\r
+exception.overwriting_vamsas_id_binding = Overwriting vamsas id binding\r
+exception.overwriting_jalview_id_binding = Overwriting jalview id binding\r
+error.implementation_error_unknown_file_format_string = Implementation error: Unknown file format string\r
+exception.failed_to_resolve_gzip_stream = Failed to resolve GZIP stream\r
+exception.problem_opening_file_also_tried = Problem opening {0} (also tried {1}) : {2}\r
+exception.problem_opening_file = Problem opening {0} : {1}\r
+exception.failed_to_read_data_from_source = Failed to read data from source: {0}\r
+exception.no_init_source_stream = Unitialised Source Stream\r
+exception.invalid_source_stream = Invalid Source Stream: {0}\r
+error.implementation_error_reset_called_for_invalid_source = Implementation Error: Reset called for invalid source.\r
+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})\r
+label.mapped = mapped\r
+exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: Entry ({0}) has an unexpected number of columns\r
+exception.couldnt_parse_concise_annotation_for_prediction = Couldn't parse concise annotation for prediction profile.\n{0}\r
+exception.newfile = NewickFile\: {0}\n\r
+label.no_tree_read_in = No Tree read in\r
+exception.rnaml_couldnt_access_datasource = Couldn't access datasource ({0})\r
+exception.ranml_couldnt_process_data = Couldn't process data as RNAML file ({0})\r
+exception.ranml_invalid_file = Invalid RNAML file ({0})\r
+exception.ranml_problem_parsing_data = Problem parsing data as RNAML ({0})\r
+exception.pfam_no_sequences_found = No sequences found (PFAM input)\r
+exception.stockholm_invalid_format = This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'\r
+exception.couldnt_parse_sequence_line = Could not parse sequence line: {0}\r
+exception.error_parsing_line = Error parsing {0}\r
+exception.unknown_annotation_detected = Unknown annotation detected: {0} {1}\r
+exception.couldnt_store_sequence_mappings = Couldn't store sequence mappings for {0}\r
+exception.matrix_too_many_iteration = Too many iterations in {0} (max is {1})\r
+exception.browser_not_found = Exception in finding browser: {0}\r
+exception.browser_unable_to_locate = Unable to locate browser: {0}\r
+exception.invocation_target_exception_creating_aedesc = InvocationTargetException while creating AEDesc: {0}\r
+exception.illegal_access_building_apple_evt= IllegalAccessException while building AppleEvent: {0}\r
+exception.instantiation_creating_aedesc = InstantiationException while creating AEDesc: {0}\r
+exception.unable_to_launch_url = Unable to launch URL: {0}\r
+exception.unable_to_create_internet_config = Unable to create an Internet Config instance: {0}\r
+exception.invocation_target_calling_url = InvocationTargetException while calling openURL: {0}\r
+exception.illegal_access_calling_url = IllegalAccessException while calling openURL: {0}\r
+exception.interrupted_launching_browser = InterruptedException while launching browser: {0}\r
+exception.das_source_doesnt_support_sequence_command = Source {0} does not support the sequence command.\r
+exception.invalid_das_source = Invalid das source: {0}\r
+exception.ebiembl_retrieval_failed_on = EBI EMBL XML retrieval failed on {0}:{1}\r
+label.no_embl_record_found = # No EMBL record retrieved for {0}:{1}\r
+label.embl_successfully_parsed = # Successfully parsed the {0} queries into an Alignment\r
+exception.no_pdb_records_for_chain = No PDB Records for {0} chain {1}\r
+exception.unexpected_handling_rnaml_translation_for_pdb = Unexpected exception when handling RNAML translation of PDB data\r
+exception.couldnt_recover_sequence_properties_for_alignment = Couldn't recover sequence properties for alignment\r
+exception.unknown_format_for_file = Unknown format {0} for file \: \n{1}\r
+label.remove_gaps = Remove Gaps\r
+exception.couldnt_recover_sequence_props_for_jnet_query = Couldn't recover sequence properties for JNet Query sequence!\r
+exception.server_timeout_try_later = Server timed out - try again later\n\r
+exception.web_service_returned_null_try_later= Server at {0} returned null object, it probably cannot be contacted. Try again later.\r
+exception.cannot_contact_service_endpoint_at = Cannot contact service endpoint at {0}\r
+error.implementation_error_cannot_find_service_url_in_given_set = Implementation error: Cannot find service url in the given url set!\r
+error.implementation_error_cannot_find_service_url_in_given_set_param_store = Implementation error: Cannot find service url in the given url set for this service parameter store ({0}}\r
+exception.jobsubmission_invalid_params_set = Invalid parameter set. Check Jalview implementation\r
+exception.notvaliddata_group_contains_less_than_min_seqs = Group contains less than {0} sequences.\r
+exception.outofmemory_loading_pdb_file = Out of memory loading PDB File\r
+exception.eps_coudnt_write_output_file = Could not write to the output file: {0}\r
+exception.eps_method_not_supported = Method not currently supported by EpsGraphics2D version {0}\r
+exception.eps_unable_to_get_inverse_matrix = Unable to get inverse of matrix: {0}\r
+warn.job_cannot_be_cancelled_close_window = This job cannot be cancelled.\nJust close the window.\r
+warn.service_not_supported = Service not supported!\r
+warn.input_is_too_big = Input is too big!\r
+warn.invalid_job_param_set = Invalid job parameter set!\r
+info.job_couldnt_be_run_server_doesnt_support_program = Job could not be run because the server doesn't support this program.\n{0}\r
+info.job_couldnt_be_run_exceeded_hard_limit = Job could not be run because it exceeded a hard limit on the server.\n{0}\r
+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\r
+info.no_jobs_ran = No jobs ran\r
+info.failed_to_submit_prediction = Failed to submit the prediction:\n{0} {1}\r
+info.invalid_jnet_job_result_data ={0}\n{1}\nInvalid JNet job result data!\n{2}\r
+info.failed_to_submit_sequences_for_alignment = Failed to submit sequences for alignment.\nIt is most likely that there is a problem with the server.\nJust close the window\n\r
+info.alignment_object_method_notes = \nAlignment Object Method Notes\n\r
+info.server_exception = \n{0} Server exception!\n{1}\r
+status.processing_commandline_args = Processing commandline arguments...\r
+status.das_features_being_retrived = DAS features being retrieved...\r
+status.searching_for_sequences_from = Searching for sequences from {0}\r
+status.finished_searching_for_sequences_from = Finished searching for sequences from {0}\r
+label.eps_file = EPS file\r
+label.png_image = PNG image\r
+status.saving_file = Saving {0}\r
+status.export_complete = Export complete.\r
+status.fetching_pdb = Fetching PDB {0}\r
+status.refreshing_news = Refreshing news\r
+status.importing_vamsas_session_from = Importing VAMSAS session from {0}\r
+status.opening_params = Opening {0}\r
+status.waiting_sequence_database_fetchers_init = Waiting for Sequence Database Fetchers to initialise\r
+status.init_sequence_database_fetchers = Initialising Sequence Database Fetchers\r
+status.fetching_sequence_queries_from = Fetching {0} sequence queries from {1}\r
+status.finshed_querying = Finished querying\r
+status.parsing_results = Parsing results.\r
+status.processing = Processing...\r
+status.refreshing_web_service_menus = Refreshing Web Service Menus\r
+status.collecting_job_results = Collecting job results.\r
+status.fetching_das_sequence_features = Fetching DAS Sequence Features\r
+status.no_das_sources_active = No DAS Sources Active\r
+status.das_feature_fetching_cancelled = DAS Feature Fetching Cancelled\r
+status.das_feature_fetching_complete = DAS Feature Fetching Complete\r
+status.fetching_db_refs = Fetching db refs\r
+label.font_doesnt_have_letters_defined = Font doesn't have letters defined\nso cannot be used\nwith alignment data\r
+label.error_loading_file_params = Error loading file {0}\r
+label.error_loading_jalview_file = Error loading Jalview file\r
+warn.out_of_memory_when_action = Out of memory when {0}!!\nSee help files for increasing Java Virtual Machine memory.\r
+warn.out_of_memory_loading_file = Out of memory loading file {0}!!\nSee help files for increasing Java Virtual Machine memory.\r
+label.out_of_memory = Out of memory\r
+label.invalid_id_column_width = Invalid ID Column width\r
+warn.user_defined_width_requirements = The user defined width for the\nannotation and sequence ID columns\nin exported figures must be\nat least 12 pixels wide.\r
+label.couldnt_create_sequence_fetcher = Couldn't create SequenceFetcher\r
+warn.couldnt_create_sequence_fetcher_client = Could not create the sequence fetcher client. Check error logs for details.\r
+warn.server_didnt_pass_validation = Service did not pass validation.\nCheck the Jalview Console for more details.\r
+warn.url_must_contain = Sequence URL must contain $SEQUENCE_ID$ or a regex $SEQUENCE_ID=/<regex>/=$\r
+info.validate_jabaws_server = Validate JabaWS Server ?\n(Look in console output for results)\r
+label.test_server = Test Server?\r
+info.you_want_jalview_to_find_uniprot_accessions = Do you want Jalview to find\nUniprot Accession ids for given sequence names?\r
+label.find_uniprot_accession_ids = Find Uniprot Accession Ids
\ No newline at end of file
index eb214ac..b4cb80c 100755 (executable)
@@ -671,7 +671,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
             jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save PDB File");
+    chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
index 302f3b2..e112b2a 100755 (executable)
@@ -240,7 +240,7 @@ public class PDBfile extends jalview.io.AlignFile
     } catch (OutOfMemoryError er)
     {
       System.out.println("OUT OF MEMORY LOADING PDB FILE");
-      throw new IOException("Out of memory loading PDB File");
+      throw new IOException(MessageManager.getString("exception.outofmemory_loading_pdb_file"));
     } catch (NumberFormatException ex)
     {
       if (line != null)
index 543391e..3a3462c 100755 (executable)
@@ -7,6 +7,8 @@
 //
 package com.stevesoft.pat;
 
+import jalview.util.MessageManager;
+
 import java.util.*;
 
 /**
@@ -259,7 +261,7 @@ public abstract class Pattern
    */
   Pattern clone1(Hashtable h)
   {
-    throw new Error("No such method as clone1 for " + getClass().getName());
+    throw new Error(MessageManager.formatMessage("error.no_such_method_as_clone1_for", new String[]{getClass().getName()}));
   }
 
   Pattern clone(Hashtable h)
@@ -272,7 +274,7 @@ public abstract class Pattern
     p = clone1(h);
     if (p == null)
     {
-      throw new Error("Null from clone1!");
+      throw new Error(MessageManager.getString("error.null_from_clone1"));
     }
     h.put(this, p);
     h.put(p, p);
index 04bb0da..861c33b 100755 (executable)
@@ -7,6 +7,8 @@
 //
 package com.stevesoft.pat;
 
+import jalview.util.MessageManager;
+
 import java.io.*;
 import java.util.*;
 
@@ -775,7 +777,7 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException("Null String Given to Regex.search");
+      throw new NullPointerException(MessageManager.getString("exception.null_string_given_to_regex_search"));
     }
     return _search(s, 0, s.length());
   }
@@ -784,8 +786,7 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (sl == null)
     {
-      throw new NullPointerException(
-              "Null StringLike Given to Regex.search");
+      throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_search"));
     }
     return _search(sl, 0, sl.length());
   }
@@ -794,8 +795,7 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              "Null String Given to Regex.reverseSearch");
+      throw new NullPointerException(MessageManager.getString("exception.null_string_given_to_regex_reverse_search"));
     }
     return _reverseSearch(s, 0, s.length());
   }
@@ -804,8 +804,7 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (sl == null)
     {
-      throw new NullPointerException(
-              "Null StringLike Given to Regex.reverseSearch");
+      throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_reverse_search"));
     }
     return _reverseSearch(sl, 0, sl.length());
   }
@@ -822,8 +821,7 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              "Null String Given to Regex.searchFrom");
+      throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_search_from"));
     }
     return _search(s, start, s.length());
   }
@@ -832,8 +830,7 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              "Null String Given to Regex.searchFrom");
+        throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_search_from"));
     }
     return _search(s, start, s.length());
   }
@@ -845,8 +842,7 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              "Null String Given to Regex.searchRegion");
+      throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_search_region"));
     }
     return _search(s, start, end);
   }
index 062a548..b886f6a 100755 (executable)
@@ -7,6 +7,8 @@
 //
 package com.stevesoft.pat;
 
+import jalview.util.MessageManager;
+
 import com.stevesoft.pat.wrap.*;
 
 /** Internally used class. */
@@ -178,7 +180,7 @@ public class Replacer
     lastMatchedTo = 0;
     if (rh.me == null)
     {
-      throw new NullPointerException("Replacer has null Regex pointer");
+      throw new NullPointerException(MessageManager.getString("exception.replace_null_regex_pointer"));
     }
     if (rh.me._search(s, start, end))
     {
index d770f08..84a3a46 100755 (executable)
@@ -7,6 +7,8 @@
 //
 package com.stevesoft.pat;
 
+import jalview.util.MessageManager;
+
 import com.stevesoft.pat.wrap.*;
 
 /**
@@ -149,7 +151,7 @@ public class Transformer
     Regex r = Regex.perlCode(rs);
     if (r == null)
     {
-      throw new NullPointerException("bad pattern to Regex.perlCode: " + rs);
+      throw new NullPointerException(MessageManager.formatMessage("exception.bad_pattern_to_regex_perl_code", new String[]{rs}));
     }
     add(r);
   }
index b4d38dc..f5b61ab 100755 (executable)
@@ -7,6 +7,8 @@
 //
 package com.stevesoft.pat.wrap;
 
+import jalview.util.MessageManager;
+
 import java.io.*;
 
 import com.stevesoft.pat.*;
@@ -84,13 +86,16 @@ public class RandomAccessFileWrap implements StringLike
     {
     }
 
-    throw new ArrayIndexOutOfBoundsException("Out of bounds for file:"
-            + " i=" + i + ", Final Buffer: i0=" + i0 + " iend=" + iend);
+    throw new ArrayIndexOutOfBoundsException(MessageManager.formatMessage("exception.out_of_bounds_for_file", new String[]{
+               Integer.valueOf(i).toString(),
+               Integer.valueOf(i0).toString(),
+               Integer.valueOf(iend).toString()
+    }));
   }
 
   public String toString()
   {
-    throw new Error("Not implemented");
+    throw new Error(MessageManager.getString("error.not_implemented"));
   }
 
   public int length()
index 6bd3af0..3473d4c 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package ext.vamsas;
 
+import jalview.util.MessageManager;
+
 public class IRegistryServiceLocator extends org.apache.axis.client.Service
         implements ext.vamsas.IRegistryService
 {
@@ -109,10 +111,7 @@ public class IRegistryServiceLocator extends org.apache.axis.client.Service
     {
       throw new javax.xml.rpc.ServiceException(t);
     }
-    throw new javax.xml.rpc.ServiceException(
-            "There is no stub implementation for the interface:  "
-                    + (serviceEndpointInterface == null ? "null"
-                            : serviceEndpointInterface.getName()));
+    throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
   }
 
   /**
@@ -169,8 +168,7 @@ public class IRegistryServiceLocator extends org.apache.axis.client.Service
     }
     else
     { // Unknown Port Name
-      throw new javax.xml.rpc.ServiceException(
-              " Cannot set Endpoint Address for Unknown Port" + portName);
+      throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
     }
   }
 
index 46566b9..79e9636 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package ext.vamsas;
 
+import jalview.util.MessageManager;
+
 public class JpredServiceLocator extends org.apache.axis.client.Service
         implements ext.vamsas.JpredService
 {
@@ -107,10 +109,7 @@ public class JpredServiceLocator extends org.apache.axis.client.Service
     {
       throw new javax.xml.rpc.ServiceException(t);
     }
-    throw new javax.xml.rpc.ServiceException(
-            "There is no stub implementation for the interface:  "
-                    + (serviceEndpointInterface == null ? "null"
-                            : serviceEndpointInterface.getName()));
+    throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
   }
 
   /**
@@ -167,8 +166,7 @@ public class JpredServiceLocator extends org.apache.axis.client.Service
     }
     else
     { // Unknown Port Name
-      throw new javax.xml.rpc.ServiceException(
-              " Cannot set Endpoint Address for Unknown Port" + portName);
+      throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
     }
   }
 
index a9ca1ed..9a580f8 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package ext.vamsas;
 
+import jalview.util.MessageManager;
+
 public class MuscleWSServiceLocator extends org.apache.axis.client.Service
         implements ext.vamsas.MuscleWSService
 {
@@ -115,10 +117,7 @@ public class MuscleWSServiceLocator extends org.apache.axis.client.Service
       throw new javax.xml.rpc.ServiceException(t);
     }
 
-    throw new javax.xml.rpc.ServiceException(
-            "There is no stub implementation for the interface:  "
-                    + ((serviceEndpointInterface == null) ? "null"
-                            : serviceEndpointInterface.getName()));
+    throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
   }
 
   /**
@@ -177,8 +176,7 @@ public class MuscleWSServiceLocator extends org.apache.axis.client.Service
     }
     else
     { // Unknown Port Name
-      throw new javax.xml.rpc.ServiceException(
-              " Cannot set Endpoint Address for Unknown Port" + portName);
+      throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
     }
   }
 
index cfe943c..75f46a3 100644 (file)
@@ -20,6 +20,8 @@
  */
 package ext.vamsas;
 
+import jalview.util.MessageManager;
+
 public class SeqSearchServiceLocator extends org.apache.axis.client.Service
         implements ext.vamsas.SeqSearchServiceService
 {
@@ -109,10 +111,7 @@ public class SeqSearchServiceLocator extends org.apache.axis.client.Service
     {
       throw new javax.xml.rpc.ServiceException(t);
     }
-    throw new javax.xml.rpc.ServiceException(
-            "There is no stub implementation for the interface:  "
-                    + (serviceEndpointInterface == null ? "null"
-                            : serviceEndpointInterface.getName()));
+    throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
   }
 
   /**
@@ -169,8 +168,7 @@ public class SeqSearchServiceLocator extends org.apache.axis.client.Service
     }
     else
     { // Unknown Port Name
-      throw new javax.xml.rpc.ServiceException(
-              " Cannot set Endpoint Address for Unknown Port" + portName);
+      throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
     }
   }
 
index ab6fae8..4460985 100755 (executable)
@@ -410,8 +410,7 @@ public class AlignSeq
     else
     {
       output.append("Wrong type = dna or pep only");
-      throw new Error("Unknown Type " + type2
-              + " - dna or pep are the only allowed values.");
+      throw new Error(MessageManager.formatMessage("error.unknown_type_dna_or_pep", new String[]{type2}));
     }
   }
 
index a993e26..b7cfbbd 100755 (executable)
@@ -757,8 +757,7 @@ public class AlignmentSorter
     if (method != FEATURE_SCORE && method != FEATURE_LABEL
             && method != FEATURE_DENSITY)
     {
-      throw new Error(
-              "Implementation Error - sortByFeature method must be one of FEATURE_SCORE, FEATURE_LABEL or FEATURE_DENSITY.");
+      throw new Error(MessageManager.getString("error.implementation_error_sortbyfeature"));
     }
     boolean ignoreScore = method != FEATURE_SCORE;
     StringBuffer scoreLabel = new StringBuffer();
@@ -938,7 +937,7 @@ public class AlignmentSorter
     {
       if (method == FEATURE_LABEL)
       {
-        throw new Error("Not yet implemented.");
+        throw new Error(MessageManager.getString("error.not_yet_implemented"));
       }
     }
     if (lastSortByFeatureScore == null
index 4c05ece..e4a0d76 100644 (file)
@@ -35,6 +35,7 @@ import java.util.Vector;
 
 import jalview.analysis.SecStrConsensus.SimpleBP;
 import jalview.datamodel.SequenceFeature;
+import jalview.util.MessageManager;
 
 public class Rna
 {
@@ -85,9 +86,7 @@ public class Rna
   {
     if (!isClosingParenthesis(closingParenthesis))
     {
-      throw new WUSSParseException(
-              "Querying matching opening parenthesis for non-closing parenthesis character "
-                      + closingParenthesis, -1);
+      throw new WUSSParseException(MessageManager.formatMessage("exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis", new String[]{new StringBuffer(closingParenthesis).toString()}), -1);
     }
 
     return closingToOpening.get(closingParenthesis);
@@ -132,16 +131,14 @@ public class Rna
 
         if (!stacks.containsKey(opening))
         {
-          throw new WUSSParseException(
-                  "Mismatched (unseen) closing character " + base, i);
+          throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_unseen_closing_char", new String[]{new StringBuffer(base).toString()}), i);
         }
 
         Stack<Integer> stack = stacks.get(opening);
         if (stack.isEmpty())
         {
           // error whilst parsing i'th position. pass back
-          throw new WUSSParseException("Mismatched closing character "
-                  + base, i);
+          throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_closing_char", new String[]{new StringBuffer(base).toString()}), i);
         }
         int temp = stack.pop();
 
@@ -154,8 +151,7 @@ public class Rna
       Stack<Integer> stack = stacks.get(opening);
       if (!stack.empty())
       {
-        throw new WUSSParseException("Mismatched opening character "
-                + opening + " at " + stack.pop(), i);
+        throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_opening_char", new String[]{new StringBuffer(opening).toString(),Integer.valueOf(stack.pop()).toString()}), i);
       }
     }
     return pairs;
index 64fed16..eba1200 100644 (file)
@@ -559,7 +559,7 @@ public class APopupMenu extends java.awt.PopupMenu implements
 
         if (dialog.accept)
         {
-          EditCommand editCommand = new EditCommand("Edit Sequences",
+          EditCommand editCommand = new EditCommand(MessageManager.getString("label.edit_sequences"),
                   EditCommand.REPLACE, dialog.getName().replace(' ',
                           ap.av.getGapCharacter()),
                   sg.getSequencesAsArray(ap.av.getHiddenRepSequences()),
index cc1703c..f267858 100644 (file)
@@ -1763,14 +1763,14 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
 
       if (newAlignment)
       {
-        String newtitle = new String("Copied sequences");
-        if (getTitle().startsWith("Copied sequences"))
+        String newtitle = MessageManager.getString("label.copied_sequences");
+        if (getTitle().startsWith(MessageManager.getString("label.copied_sequences")))
         {
           newtitle = getTitle();
         }
         else
         {
-          newtitle = newtitle.concat("- from " + getTitle());
+          newtitle = newtitle.concat(MessageManager.formatMessage("label.from_msname", new String[]{getTitle()}));
         }
         AlignFrame af = new AlignFrame(new Alignment(newSeqs),
                 viewport.applet, newtitle, false);
@@ -1805,7 +1805,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     }
 
     // !newAlignment
-    addHistoryItem(new EditCommand("Add sequences", EditCommand.PASTE,
+    addHistoryItem(new EditCommand(MessageManager.getString("label.add_sequences"), EditCommand.PASTE,
             seqs, 0, viewport.getAlignment().getWidth(),
             viewport.getAlignment()));
 
@@ -1855,7 +1855,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     /*
      * //ADD HISTORY ITEM
      */
-    addHistoryItem(new EditCommand("Cut Sequences", EditCommand.CUT, cut,
+    addHistoryItem(new EditCommand(MessageManager.getString("label.cut_sequences"), EditCommand.CUT, cut,
             sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
             viewport.getAlignment()));
 
@@ -2780,10 +2780,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
           MessageManager.getString("label.load_features_annotations"));
 
   MenuItem outputFeatures = new MenuItem(
-          MessageManager.getString("label.export_features"));
+          MessageManager.getString("label.export_features").concat("..."));
 
   MenuItem outputAnnotations = new MenuItem(
-          MessageManager.getString("label.export_annotations"));
+          MessageManager.getString("label.export_annotations").concat("..."));
 
   MenuItem closeMenuItem = new MenuItem(
           MessageManager.getString("action.close"));
@@ -3043,7 +3043,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     sortGroupMenuItem.setLabel(MessageManager.getString("action.by_group"));
     sortGroupMenuItem.addActionListener(this);
     removeRedundancyMenuItem.setLabel(MessageManager
-            .getString("action.remove_redundancy"));
+            .getString("action.remove_redundancy").concat("..."));
     removeRedundancyMenuItem.addActionListener(this);
     pairwiseAlignmentMenuItem.setLabel(MessageManager
             .getString("action.pairwise_alignment"));
index f85a073..c7b7c6c 100644 (file)
@@ -137,8 +137,7 @@ public class AnnotationColourChooser extends Panel implements
         threshold.select(1);
         break;
       default:
-        throw new Error(
-                "Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
+        throw new Error(MessageManager.getString("error.implementation_error_dont_know_thereshold_annotationcolourgradient"));
       }
       thresholdIsMin.setState(acg.thresholdIsMinMax);
       thresholdValue.setText("" + acg.getAnnotationThreshold());
index bf82bca..42fbd70 100644 (file)
@@ -139,7 +139,7 @@ public class AppletJmol extends EmbmenuFrame implements
           String[][] boundchains, boolean align, AlignmentPanel ap,
           String protocol)
   {
-    throw new Error("Not yet implemented.");
+    throw new Error(MessageManager.getString("error.not_yet_implemented"));
   }
 
   public AppletJmol(PDBEntry pdbentry, SequenceI[] seq, String[] chains,
@@ -315,8 +315,7 @@ public class AppletJmol extends EmbmenuFrame implements
           }
           if (freader == null)
           {
-            throw new Exception(
-                    "Invalid datasource. Could not obtain Reader.");
+            throw new Exception(MessageManager.getString("exception.invalid_datasource_couldnt_obtain_reader"));
           }
           jmb.viewer.openReader(pdbentry.getFile(), pdbentry.getId(),
                   freader);
index 6c0d3a9..3757415 100644 (file)
@@ -195,8 +195,7 @@ public class EmbmenuFrame extends Frame implements MouseListener
   {
     if (embeddedPopup == null)
     {
-      throw new Error(
-              "Implementation error - embeddedPopup must be non-null");
+      throw new Error(MessageManager.getString("error.implementation_error_embeddedpopup_not_null"));
     }
     if (overrideFonts)
     {
index aef8e31..11ca86a 100644 (file)
@@ -151,7 +151,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
       }
       else
       {
-        throw new Error("Invalid color for MyCheckBox");
+        throw new Error(MessageManager.getString("error.invalid_colour_for_mycheckbox"));
       }
       if (col != null)
       {
@@ -901,8 +901,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
         return ((GraduatedColor) fc).getMaxColor();
       }
     }
-    throw new Error("Implementation Error: Unrecognised render object "
-            + fc.getClass() + " for features of type " + featureType);
+    throw new Error(MessageManager.formatMessage("error.implementation_error_unrecognised_render_object_for_features_type", new String[]{fc.getClass(),featureType}));
   }
 
   /**
index f6e7772..cd11a35 100755 (executable)
@@ -592,8 +592,7 @@ public class FeatureSettings extends Panel implements ItemListener,
     }
     else
     {
-      throw new Error(
-              "Implementation error: Unsupported feature colour object.");
+      throw new Error(MessageManager.getString("error.implementation_error_unsupported_feature_colour_object"));
     }
     refreshTable();
   }
@@ -689,7 +688,7 @@ public class FeatureSettings extends Panel implements ItemListener,
       }
       else
       {
-        throw new Error("Invalid color for MyCheckBox");
+        throw new Error(MessageManager.getString("error.invalid_colour_for_mycheckbox"));
       }
       if (col != null)
       {
index f5e403f..216f45d 100644 (file)
@@ -196,7 +196,7 @@ public class RedundancyPanel extends SliderPanel implements Runnable,
         }
       }
 
-      EditCommand cut = new EditCommand("Remove Redundancy",
+      EditCommand cut = new EditCommand(MessageManager.getString("action.remove_redundancy"),
               EditCommand.CUT, deleted, 0, width, ap.av.getAlignment());
       AlignmentI alignment = ap.av.getAlignment();
       for (int i = 0; i < del.size(); i++)
index 5ba22b6..de4d979 100644 (file)
@@ -31,6 +31,7 @@ import jalview.schemes.*;
 import jalview.structure.SelectionSource;
 import jalview.structure.SequenceListener;
 import jalview.structure.StructureSelectionManager;
+import jalview.util.MessageManager;
 
 public class SeqPanel extends Panel implements MouseMotionListener,
         MouseListener, SequenceListener
@@ -945,15 +946,15 @@ public class SeqPanel extends Panel implements MouseMotionListener,
     StringBuffer message = new StringBuffer();
     if (groupEditing)
     {
-      message.append("Edit group:");
+      message.append(MessageManager.getString("action.edit_group")).append(":");
       if (editCommand == null)
       {
-        editCommand = new EditCommand("Edit Group");
+        editCommand = new EditCommand(MessageManager.getString("action.edit_group"));
       }
     }
     else
     {
-      message.append("Edit sequence: " + seq.getName());
+      message.append(MessageManager.getString("label.edit_sequence")).append(" " + seq.getName());
       String label = seq.getName();
       if (label.length() > 10)
       {
@@ -961,7 +962,7 @@ public class SeqPanel extends Panel implements MouseMotionListener,
       }
       if (editCommand == null)
       {
-        editCommand = new EditCommand("Edit " + label);
+        editCommand = new EditCommand(MessageManager.formatMessage("label.edit_params", new String[]{label}));
       }
     }
 
index 14fab4e..220a7fb 100644 (file)
@@ -59,8 +59,7 @@ public class SliderPanel extends Panel implements ActionListener,
       sp.cs = cs;
     }
 
-    conservationSlider.setTitle("Conservation Colour Increment  (" + source
-            + ")");
+    conservationSlider.setTitle(MessageManager.formatMessage("label.conservation_colour_increment", new String[]{source}));
     if (ap.av.getAlignment().getGroups() != null)
     {
       sp.setAllGroupsCheckEnabled(true);
@@ -114,7 +113,7 @@ public class SliderPanel extends Panel implements ActionListener,
       pid = (SliderPanel) PIDSlider.getComponent(0);
       pid.cs = cs;
     }
-    PIDSlider.setTitle("Percentage Identity Threshold (" + source + ")");
+    PIDSlider.setTitle(MessageManager.formatMessage("label.percentage_identity_thereshold", new String[]{source}));
 
     if (ap.av.getAlignment().getGroups() != null)
     {
index 0b18688..afa6419 100644 (file)
@@ -187,7 +187,7 @@ public class UserDefinedColours extends Panel implements ActionListener,
     setTargetColour(colour);
 
     okcancelPanel.setBounds(new Rectangle(0, 113, 400, 35));
-    frame.setTitle("User Defined Colours - " + label);
+    frame.setTitle(MessageManager.getString("label.user_defined_colours") + " - " + label);
     frame.setSize(420, 200);
   }
 
@@ -206,7 +206,7 @@ public class UserDefinedColours extends Panel implements ActionListener,
       // // not 1.1 compatible!
       // dialog = new Dialog(((JVDialog)alignframe), title, true);
       // } else {
-      throw new Error("Unsupported owner for User Colour scheme dialog.");
+      throw new Error(MessageManager.getString("label.error_unsupported_owwner_user_colour_scheme"));
     }
 
     dialog.add(this);
index b6d6d3f..046d132 100755 (executable)
@@ -44,6 +44,7 @@ import java.util.*;
 import javax.swing.*;
 
 import jalview.gui.*;
+import jalview.util.MessageManager;
 import jalview.util.Platform;
 
 /**
@@ -340,7 +341,7 @@ public class Jalview
     {
       if (!headless)
       {
-        desktop.setProgressBar("Processing commandline arguments...",
+        desktop.setProgressBar(MessageManager.getString("status.processing_commandline_args"),
                 progress = System.currentTimeMillis());
       }
       System.out.println("Opening file: " + file);
@@ -1058,7 +1059,7 @@ class FeatureFetcher
           running++;
         }
 
-        af.setProgressBar("DAS features being retrieved...", id);
+        af.setProgressBar(MessageManager.getString("status.das_features_being_retrived"), id);
         af.featureSettings_actionPerformed(null);
         af.featureSettings.fetchDasFeatures(dasSources, true);
         af.setProgressBar(null, id);
index 4e02984..ef1e16e 100644 (file)
@@ -1392,8 +1392,7 @@ public class JalviewLite extends Applet implements
       }
       else
       {
-        throw new Error(
-                "Invalid separator parameter - must be non-zero length");
+        throw new Error(MessageManager.getString("error.invalid_separator_parameter"));
       }
     }
     int r = 255;
index d1f28c0..463312f 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -156,10 +158,11 @@ public class Annotation implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationElementList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "getAnnotationElement: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._annotationElementList.size() - 1) + "]");
+      throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getAnnotationElement",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+      }));
     }
 
     return (jalview.binding.AnnotationElement) _annotationElementList
@@ -365,10 +368,11 @@ public class Annotation implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationElementList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "setAnnotationElement: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._annotationElementList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setAnnotationElement",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+        }));
     }
 
     this._annotationElementList.set(index, vAnnotationElement);
index 0564134..5cf43eb 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -110,9 +112,11 @@ public class FeatureSettings implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._settingList.size())
     {
-      throw new IndexOutOfBoundsException("getSetting: Index value '"
-              + index + "' not in range [0.."
-              + (this._settingList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getSetting",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._settingList.size() - 1)).toString()
+          }));         
     }
 
     return (jalview.binding.Setting) _settingList.get(index);
@@ -243,9 +247,11 @@ public class FeatureSettings implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._settingList.size())
     {
-      throw new IndexOutOfBoundsException("setSetting: Index value '"
-              + index + "' not in range [0.."
-              + (this._settingList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setSetting",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._settingList.size() - 1)).toString()
+        }));           
     }
 
     this._settingList.set(index, vSetting);
index 4a853ef..d2db3e8 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -345,8 +347,11 @@ public class JGroup implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._seqList.size())
     {
-      throw new IndexOutOfBoundsException("getSeq: Index value '" + index
-              + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getSeq",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._seqList.size() - 1)).toString()
+        })); 
     }
 
     return ((java.lang.Integer) _seqList.get(index)).intValue();
@@ -704,8 +709,11 @@ public class JGroup implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._seqList.size())
     {
-      throw new IndexOutOfBoundsException("setSeq: Index value '" + index
-              + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setSeq",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._seqList.size() - 1)).toString()
+          })); 
     }
 
     this._seqList.set(index, new java.lang.Integer(vSeq));
index 7b76f8a..7e2b7b1 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -242,9 +244,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._featuresList.size())
     {
-      throw new IndexOutOfBoundsException("getFeatures: Index value '"
-              + index + "' not in range [0.."
-              + (this._featuresList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getFeatures",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._featuresList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.binding.Features) _featuresList.get(index);
@@ -299,9 +303,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._pdbidsList.size())
     {
-      throw new IndexOutOfBoundsException("getPdbids: Index value '"
-              + index + "' not in range [0.."
-              + (this._pdbidsList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getPdbids",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._pdbidsList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.binding.Pdbids) _pdbidsList.get(index);
@@ -537,9 +543,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._featuresList.size())
     {
-      throw new IndexOutOfBoundsException("setFeatures: Index value '"
-              + index + "' not in range [0.."
-              + (this._featuresList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setFeatures",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._featuresList.size() - 1)).toString()
+        })); 
     }
 
     this._featuresList.set(index, vFeatures);
@@ -588,9 +596,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._pdbidsList.size())
     {
-      throw new IndexOutOfBoundsException("setPdbids: Index value '"
-              + index + "' not in range [0.."
-              + (this._pdbidsList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setPdbids",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._pdbidsList.size() - 1)).toString()
+          })); 
     }
 
     this._pdbidsList.set(index, vPdbids);
index d30ec14..97d68de 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -299,9 +301,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._JGroupList.size())
     {
-      throw new IndexOutOfBoundsException("getJGroup: Index value '"
-              + index + "' not in range [0.."
-              + (this._JGroupList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getJGroup",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._JGroupList.size() - 1)).toString()
+        }));
     }
 
     return (jalview.binding.JGroup) _JGroupList.get(index);
@@ -346,8 +350,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._JSeqList.size())
     {
-      throw new IndexOutOfBoundsException("getJSeq: Index value '" + index
-              + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getJSeq",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._JSeqList.size() - 1)).toString()
+          }));
     }
 
     return (jalview.binding.JSeq) _JSeqList.get(index);
@@ -392,8 +399,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("getTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getJgetTreeSeq",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._treeList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.binding.Tree) _treeList.get(index);
@@ -438,9 +448,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._userColoursList.size())
     {
-      throw new IndexOutOfBoundsException("getUserColours: Index value '"
-              + index + "' not in range [0.."
-              + (this._userColoursList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getUserColours",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._userColoursList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.binding.UserColours) _userColoursList.get(index);
@@ -486,9 +498,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._viewportList.size())
     {
-      throw new IndexOutOfBoundsException("getViewport: Index value '"
-              + index + "' not in range [0.."
-              + (this._viewportList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getViewport",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._viewportList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.binding.Viewport) _viewportList.get(index);
@@ -756,9 +770,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._JGroupList.size())
     {
-      throw new IndexOutOfBoundsException("setJGroup: Index value '"
-              + index + "' not in range [0.."
-              + (this._JGroupList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setJGroup",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._JGroupList.size() - 1)).toString()
+          })); 
     }
 
     this._JGroupList.set(index, vJGroup);
@@ -794,8 +810,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._JSeqList.size())
     {
-      throw new IndexOutOfBoundsException("setJSeq: Index value '" + index
-              + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setJSeq",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._JSeqList.size() - 1)).toString()
+        })); 
     }
 
     this._JSeqList.set(index, vJSeq);
@@ -831,8 +850,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("setTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setTree",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._treeList.size() - 1)).toString()
+          })); 
     }
 
     this._treeList.set(index, vTree);
@@ -869,9 +891,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._userColoursList.size())
     {
-      throw new IndexOutOfBoundsException("setUserColours: Index value '"
-              + index + "' not in range [0.."
-              + (this._userColoursList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setUserColours",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._userColoursList.size() - 1)).toString()
+        })); 
     }
 
     this._userColoursList.set(index, vUserColours);
@@ -909,9 +933,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._viewportList.size())
     {
-      throw new IndexOutOfBoundsException("setViewport: Index value '"
-              + index + "' not in range [0.."
-              + (this._viewportList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setViewport",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._viewportList.size() - 1)).toString()
+          })); 
     }
 
     this._viewportList.set(index, vViewport);
index 7473bc7..8b70bcf 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -120,9 +122,11 @@ public class JalviewUserColours implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._colourList.size())
     {
-      throw new IndexOutOfBoundsException("getColour: Index value '"
-              + index + "' not in range [0.."
-              + (this._colourList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getColour",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._colourList.size() - 1)).toString()
+        })); 
     }
 
     return (Colour) _colourList.get(index);
@@ -274,9 +278,11 @@ public class JalviewUserColours implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._colourList.size())
     {
-      throw new IndexOutOfBoundsException("setColour: Index value '"
-              + index + "' not in range [0.."
-              + (this._colourList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setColour",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._colourList.size() - 1)).toString()
+          })); 
     }
 
     this._colourList.set(index, vColour);
index 2ee5c96..9b7c1cf 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -131,9 +133,11 @@ public class Pdbentry implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._items.size())
     {
-      throw new IndexOutOfBoundsException("getPdbentryItem: Index value '"
-              + index + "' not in range [0.." + (this._items.size() - 1)
-              + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getPdbentryItem",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._items.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.binding.PdbentryItem) _items.get(index);
@@ -286,9 +290,11 @@ public class Pdbentry implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._items.size())
     {
-      throw new IndexOutOfBoundsException("setPdbentryItem: Index value '"
-              + index + "' not in range [0.." + (this._items.size() - 1)
-              + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setPdbentryItem",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._items.size() - 1)).toString()
+          })); 
     }
 
     this._items.set(index, vPdbentryItem);
index abd3fab..f24d281 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.binding;
 
+import jalview.util.MessageManager;
+
 /**
  * Class PdbentryItem.
  * 
@@ -103,9 +105,11 @@ public class PdbentryItem implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._propertyList.size())
     {
-      throw new IndexOutOfBoundsException("getProperty: Index value '"
-              + index + "' not in range [0.."
-              + (this._propertyList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getProperty",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._propertyList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.binding.Property) _propertyList.get(index);
@@ -182,9 +186,11 @@ public class PdbentryItem implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._propertyList.size())
     {
-      throw new IndexOutOfBoundsException("setProperty: Index value '"
-              + index + "' not in range [0.."
-              + (this._propertyList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setProperty",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._propertyList.size() - 1)).toString()
+          })); 
     }
 
     this._propertyList.set(index, vProperty);
index 85b4889..59151c8 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -186,9 +188,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationList.size())
     {
-      throw new IndexOutOfBoundsException("getAnnotation: Index value '"
-              + index + "' not in range [0.."
-              + (this._annotationList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getAnnotation",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._annotationList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.binding.Annotation) _annotationList.get(index);
@@ -244,9 +248,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceList.size())
     {
-      throw new IndexOutOfBoundsException("getSequence: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getSequence",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.binding.Sequence) _sequenceList.get(index);
@@ -441,9 +447,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationList.size())
     {
-      throw new IndexOutOfBoundsException("setAnnotation: Index value '"
-              + index + "' not in range [0.."
-              + (this._annotationList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setAnnotation",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._annotationList.size() - 1)).toString()
+        })); 
     }
 
     this._annotationList.set(index, vAnnotation);
@@ -492,9 +500,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceList.size())
     {
-      throw new IndexOutOfBoundsException("setSequence: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setSequence",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceList.size() - 1)).toString()
+          })); 
     }
 
     this._sequenceList.set(index, vSequence);
index 0d1f789..bd4ea40 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -195,9 +197,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alignmentList.size())
     {
-      throw new IndexOutOfBoundsException("getAlignment: Index value '"
-              + index + "' not in range [0.."
-              + (this._alignmentList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getAlignment",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._alignmentList.size() - 1)).toString()
+        })); 
     }
 
     return (Alignment) _alignmentList.get(index);
@@ -242,9 +246,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceSetList.size())
     {
-      throw new IndexOutOfBoundsException("getSequenceSet: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceSetList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getSequenceSet",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+          })); 
     }
 
     return (SequenceSet) _sequenceSetList.get(index);
@@ -289,8 +295,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("getTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getTree",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._treeList.size() - 1)).toString()
+        })); 
     }
 
     return (java.lang.String) _treeList.get(index);
@@ -482,9 +491,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alignmentList.size())
     {
-      throw new IndexOutOfBoundsException("setAlignment: Index value '"
-              + index + "' not in range [0.."
-              + (this._alignmentList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setAlignment",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._alignmentList.size() - 1)).toString()
+          })); 
     }
 
     this._alignmentList.set(index, vAlignment);
@@ -520,9 +531,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceSetList.size())
     {
-      throw new IndexOutOfBoundsException("setSequenceSet: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceSetList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setSequenceSet",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+        })); 
     }
 
     this._sequenceSetList.set(index, vSequenceSet);
@@ -558,8 +571,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("setTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setTree",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._treeList.size() - 1)).toString()
+          })); 
     }
 
     this._treeList.set(index, vTree);
index 077f9cd..dbc3524 100644 (file)
@@ -35,6 +35,7 @@ import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
 
 public class AlignViewController implements AlignViewControllerI
 {
@@ -276,16 +277,17 @@ public class AlignViewController implements AlignViewControllerI
       }
       viewport.setColumnSelection(cs);
       alignPanel.paintAlignment(true);
-      avcg.setStatus((toggle ? "Toggled " : "Marked ")
-              + (invert ? (alw - alStart) - bs.cardinality() : bs
-                      .cardinality()) + " columns "
-              + (invert ? "not " : "") + "containing features of type "
-              + featureType + " across " + nseq + " sequence(s)");
+      avcg.setStatus(MessageManager.formatMessage("label.view_controller_toggled_marked",
+                 new String[]{
+                               (toggle ? MessageManager.getString("label.toggled") : MessageManager.getString("label.marked")),
+                               (invert ? (Integer.valueOf((alw - alStart) - bs.cardinality()).toString()):(Integer.valueOf(bs.cardinality()).toString())),
+                               featureType, Integer.valueOf(nseq).toString()
+                       }));
       return true;
     }
     else
     {
-      avcg.setStatus("No features of type " + featureType + " found.");
+      avcg.setStatus(MessageManager.formatMessage("label.no_feature_of_type_found", new String[]{featureType}));
       if (!extendCurrent && cs != null)
       {
         cs.clear();
index ad7cdd2..98abfe2 100755 (executable)
@@ -112,7 +112,7 @@ public class Alignment implements AlignmentI
    */
   public static AlignmentI createAlignment(CigarArray compactAlignment)
   {
-    throw new Error("Alignment(CigarArray) not yet implemented");
+    throw new Error(MessageManager.getString("error.alignment_cigararray_not_implemented"));
     // this(compactAlignment.refCigars);
   }
 
index c0f9ab4..a17881e 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.datamodel;
 
+import jalview.util.MessageManager;
+
 import java.util.*;
 
 public class AlignmentOrder
@@ -217,7 +219,7 @@ public class AlignmentOrder
       {
         if (!identity)
         {
-          throw new Error("Weak sequenceI equivalence not yet implemented.");
+          throw new Error(MessageManager.getString("error.weak_sequencei_equivalence_not_yet_implemented"));
         }
         else
         {
@@ -284,7 +286,7 @@ public class AlignmentOrder
         }
         if (!identity)
         {
-          throw new Error("Weak sequenceI equivalence not yet implemented.");
+          throw new Error(MessageManager.getString("error.weak_sequencei_equivalence_not_yet_implemented"));
         }
         else
         {
index 6c4cfae..efb7c4a 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.datamodel;
 
+import jalview.util.MessageManager;
 import jalview.util.ShiftList;
 
 import java.io.PrintStream;
@@ -241,8 +242,7 @@ public class AlignmentView
   {
     if (!seqcigararray.isSeqCigarArray())
     {
-      throw new Error(
-              "Implementation Error - can only make an alignment view from a CigarArray of sequences.");
+      throw new Error(MessageManager.getString("error.implementation_error_can_only_make_alignmnet_from_cigararray"));
     }
     // contigs = seqcigararray.applyDeletions();
     contigs = seqcigararray.getDeletedRegions();
@@ -652,7 +652,7 @@ public class AlignmentView
   {
     if (sequences == null || width <= 0)
     {
-      throw new Error("empty view cannot be updated.");
+      throw new Error(MessageManager.getString("error.empty_view_cannot_be_updated"));
     }
     if (nvismsa == null)
     {
@@ -682,11 +682,7 @@ public class AlignmentView
               j++;
               if (mseq.length != sequences.length)
               {
-                throw new Error(
-                        "Mismatch between number of sequences in block "
-                                + j + " (" + mseq.length
-                                + ") and the original view ("
-                                + sequences.length + ")");
+                throw new Error(MessageManager.formatMessage("error.mismatch_between_number_of_sequences_in_block", new String[]{Integer.valueOf(j).toString(),Integer.valueOf(mseq.length).toString(),Integer.valueOf(sequences.length).toString() }));
               }
               swidth = mseq[0].getLength(); // JBPNote: could ensure padded
               // here.
@@ -839,7 +835,7 @@ public class AlignmentView
               else
               {
                 // place gaps.
-                throw new Error("Padding not yet implemented.");
+                throw new Error(MessageManager.getString("error.padding_not_yet_implemented"));
               }
             }
           }
@@ -852,9 +848,7 @@ public class AlignmentView
     {
       if (nvismsa.length != 1)
       {
-        throw new Error(
-                "Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks="
-                        + nvismsa.length);
+        throw new Error(MessageManager.formatMessage("error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view", new String[]{Integer.valueOf(nvismsa.length).toString()}));
       }
       if (nvismsa[0] != null)
       {
index 69826b6..d0ead87 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.datamodel;
 
+import jalview.util.MessageManager;
+
 import java.util.*;
 
 public abstract class CigarBase
@@ -144,7 +146,7 @@ public abstract class CigarBase
         endpos = alcursor;
         break;
       default:
-        throw new Error("Unknown SeqCigar operation '" + operation[i] + "'");
+        throw new Error(MessageManager.formatMessage("error.unknown_seq_cigar_operation", new String[]{new StringBuffer(operation[i]).toString()}));
       }
     }
     if (++delcount > 0)
@@ -223,7 +225,7 @@ public abstract class CigarBase
       } while (c >= '0' && c <= '9' && j < l);
       if (j >= l && c >= '0' && c <= '9')
       {
-        throw new Exception("Unterminated cigar string.");
+        throw new Exception(MessageManager.getString("exception.unterminated_cigar_string"));
       }
       try
       {
@@ -232,7 +234,7 @@ public abstract class CigarBase
         i = j;
       } catch (Exception e)
       {
-        throw new Error("Implementation bug in parseCigarString");
+        throw new Error(MessageManager.getString("error.implementation_bug_parse_cigar_string"));
       }
       if (c >= 'a' && c <= 'z')
       {
@@ -244,9 +246,11 @@ public abstract class CigarBase
       }
       else
       {
-        throw new Exception("Unexpected operation '" + c
-                + "' in cigar string (position " + i + " in '"
-                + cigarString + "'");
+        throw new Exception(MessageManager.formatMessage("exception.unexpected_operation_cigar_string_pos", new String[]{
+                       new StringBuffer(c).toString(),
+                       Integer.valueOf(i).toString(),
+                       cigarString
+        }));
       }
     }
     return new Object[]
@@ -269,7 +273,7 @@ public abstract class CigarBase
     }
     if (op != M && op != D && op != I)
     {
-      throw new Error("Implementation error. Invalid operation string.");
+      throw new Error(MessageManager.getString("error.implementation_error_invalid_operation_string"));
     }
     if (range == 0)
     {
@@ -277,8 +281,7 @@ public abstract class CigarBase
     }
     if (range < 0)
     {
-      throw new Error(
-              "Invalid range string (must be zero or positive number)");
+      throw new Error(MessageManager.getString("error.invalid_range_string"));
     }
     int lngth = 0;
     if (operation == null)
@@ -390,8 +393,7 @@ public abstract class CigarBase
     }
     if (start < 0 || start > end)
     {
-      throw new Error(
-              "Implementation Error: deleteRange out of bounds: start must be non-negative and less than end.");
+      throw new Error(MessageManager.getString("error.implementation_error_delete_range_out_of_bounds"));
     }
     // find beginning
     int cursor = 0; // mark the position for the current operation being edited.
@@ -463,10 +465,9 @@ public abstract class CigarBase
           }
           break;
         case D:
-          throw new Error("Implementation error."); // do nothing;
+          throw new Error(MessageManager.getString("error.implementation_error")); // do nothing;
         default:
-          throw new Error("Implementation Error! Unknown operation '"
-                  + oldops[o] + "'");
+          throw new Error(MessageManager.formatMessage("error.implementation_error_unknown_operation", new String[]{new StringBuffer(oldops[o]).toString()}));
         }
         rlength -= remain;
         remain = oldrange[++o]; // number of op characters left to edit
index ffe152b..8441609 100644 (file)
@@ -93,8 +93,7 @@ public class SeqCigar extends CigarSimple
             refseq.getSequenceAsString(start, end), GapChar);
     if (edit_result == null)
     {
-      throw new Error(
-              "Implementation Error - unexpected null from getSequenceAndDeletions");
+      throw new Error(MessageManager.getString("error.implementation_error_unexpected_null_from_get_sequence_and_deletions"));
     }
     int bounds[] = (int[]) edit_result[1];
     seq = new Sequence(refseq.getName(), (String) edit_result[0],
@@ -142,11 +141,11 @@ public class SeqCigar extends CigarSimple
     boolean hasgaps = false;
     if (seq == null)
     {
-      throw new Error("Implementation Error - _setSeq(null,...)");
+      throw new Error(MessageManager.getString("error.implementation_error_set_seq_null"));
     }
     if (_s < 0)
     {
-      throw new Error("Implementation Error: _s=" + _s);
+      throw new Error(MessageManager.formatMessage("error.implementation_error_s", new String[]{Integer.valueOf(_s).toString()}));
     }
     String seq_string = seq.getSequenceAsString();
     if (_e == 0 || _e < _s || _e > seq_string.length())
@@ -212,8 +211,7 @@ public class SeqCigar extends CigarSimple
     // Check offsets
     if (end > ds.getLength())
     {
-      throw new Error(
-              "SeqCigar: Possible implementation error: sequence is longer than dataset sequence");
+      throw new Error(MessageManager.getString("error.implementation_error_seqcigar_possible"));
       // end = ds.getLength();
     }
 
@@ -237,12 +235,11 @@ public class SeqCigar extends CigarSimple
     super();
     if (seq == null)
     {
-      throw new Error("Implementation Bug. Null seq !");
+      throw new Error(MessageManager.getString("error.implmentation_bug_seq_null"));
     }
     if (operation.length != range.length)
     {
-      throw new Error(
-              "Implementation Bug. Cigar Operation list!= range list");
+      throw new Error(MessageManager.getString("error.implementation_bug_cigar_operation_list_range_list"));
     }
 
     if (operation != null)
@@ -252,17 +249,14 @@ public class SeqCigar extends CigarSimple
 
       if (_setSeq(seq, false, 0, 0))
       {
-        throw new Error(
-                "NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence.");
+        throw new Error(MessageManager.getString("error.not_yet_implemented_cigar_object_from_cigar_string"));
       }
       for (int i = this.length, j = 0; j < operation.length; i++, j++)
       {
         char op = operation[j];
         if (op != M && op != I && op != D)
         {
-          throw new Error("Implementation Bug. Cigar Operation '" + j
-                  + "' '" + op + "' not one of '" + M + "', '" + I
-                  + "', or '" + D + "'.");
+          throw new Error(MessageManager.formatMessage("error.implementation_bug_cigar_operation", new String[]{Integer.valueOf(j).toString(),Integer.valueOf(op).toString(),Integer.valueOf(M).toString(),Integer.valueOf(I).toString(),Integer.valueOf(D).toString()}));
         }
         this.operation[i] = op;
         this.range[i] = range[j];
@@ -276,8 +270,7 @@ public class SeqCigar extends CigarSimple
       this.length = 0;
       if (_setSeq(seq, false, 0, 0))
       {
-        throw new Error(
-                "NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence.");
+        throw new Error(MessageManager.getString("error.not_yet_implemented_cigar_object_from_cigar_string"));
       }
     }
   }
@@ -384,7 +377,7 @@ public class SeqCigar extends CigarSimple
     super();
     if (seq == null)
     {
-      throw new Error("Implementation error for new Cigar(SequenceI)");
+      throw new Error(MessageManager.getString("error.implementation_error_for_new_cigar"));
     }
     _setSeq(seq, false, 0, 0);
     // there is still work to do
@@ -406,7 +399,7 @@ public class SeqCigar extends CigarSimple
     super();
     if (seq == null)
     {
-      throw new Error("Implementation error for new Cigar(SequenceI)");
+      throw new Error(MessageManager.getString("error.implementation_error_for_new_cigar"));
     }
     _setSeq(seq, false, start, end + 1);
     // there is still work to do
@@ -461,8 +454,7 @@ public class SeqCigar extends CigarSimple
       // endcol}, hidden regions {{start, end, col}})
       if (gs_regions[i] == null)
       {
-        throw new Error("Implementation error: " + i
-                + "'th sequence Cigar has no operations.");
+        throw new Error(MessageManager.formatMessage("error.implementation_error_cigar_seq_no_operations", new String[]{Integer.valueOf(i).toString()}));
       }
       g_seqs[i] = new StringBuffer((String) ((Object[]) gs_regions[i])[0]); // the
       // visible
index cadb205..9187912 100644 (file)
@@ -36,6 +36,7 @@ import jalview.structure.StructureListener;
 import jalview.structure.StructureMapping;
 import jalview.structure.StructureSelectionManager;
 import jalview.structures.models.SequenceStructureBindingModel;
+import jalview.util.MessageManager;
 
 import java.awt.Color;
 import java.awt.Container;
@@ -412,8 +413,7 @@ public abstract class JalviewJmolBinding extends SequenceStructureBindingModel i
         // Jmol callback has completed.
         if (mapping == null || mapping.length < 1)
         {
-          throw new Error(
-                  "Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016");
+          throw new Error(MessageManager.getString("error.implementation_error_jmol_getting_data"));
         }
         int lastPos = -1;
         for (int s = 0; s < sequence[pdbfnum].length; s++)
@@ -1574,9 +1574,7 @@ public abstract class JalviewJmolBinding extends SequenceStructureBindingModel i
   {
     if (pe < 0 || pe >= pdbentry.length)
     {
-      throw new Error(
-              "Implementation error - no corresponding pdbentry (for index "
-                      + pe + ") to add sequences mappings to");
+      throw new Error(MessageManager.formatMessage("error.implementation_error_no_pdbentry_from_index", new String[]{Integer.valueOf(pe).toString()}));
     }
     final String nullChain = "TheNullChain";
     Vector s = new Vector();
index 9672268..847453f 100644 (file)
@@ -42,6 +42,7 @@ import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 import jalview.io.AlignFile;
 import jalview.io.FileParse;
+import jalview.util.MessageManager;
 
 /**
  * Import and process PDB files with Jmol
@@ -95,10 +96,7 @@ public class PDBFileWithJmol extends AlignFile implements
         jmolApp.startViewer(viewer, null);
       } catch (ClassCastException x)
       {
-        throw new Error(
-                "Jmol version "
-                        + JmolViewer.getJmolVersion()
-                        + " is not compatible with this version of Jalview. Report this problem at issues.jalview.org",
+        throw new Error(MessageManager.formatMessage("error.jmol_version_not_compatible_with_jalview_version", new String[]{JmolViewer.getJmolVersion()}),
                 x);
       }
     }
index 4842033..3930fc0 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.ext.paradise;
 
+import jalview.util.MessageManager;
 import jalview.ws.HttpClientUtils;
 
 import java.io.IOException;
@@ -189,14 +190,14 @@ public class Annotate3D
         @Override
         public void remove()
         {
-          throw new Error("Remove: Not implemented");
+          throw new Error(MessageManager.getString("error.not_implemented_remove"));
 
         }
 
         @Override
         protected Object clone() throws CloneNotSupportedException
         {
-          throw new CloneNotSupportedException("Clone: Not implemented");
+          throw new CloneNotSupportedException(MessageManager.getString("error.not_implemented_clone"));
         }
 
         @Override
@@ -217,8 +218,7 @@ public class Annotate3D
       };
     } catch (Exception foo)
     {
-      throw new Exception(
-              "Couldn't parse response from Annotate3d server.", foo);
+      throw new Exception(MessageManager.getString("exception.couldnt_parse_responde_from_annotated3d_server"), foo);
     }
 
   }
index 11aa5c0..a39f355 100644 (file)
@@ -36,6 +36,7 @@ import jalview.structure.StructureListener;
 import jalview.structure.StructureMapping;
 import jalview.structure.StructureSelectionManager;
 import jalview.structures.models.SequenceStructureBindingModel;
+import jalview.util.MessageManager;
 
 import java.awt.Color;
 import java.awt.event.ComponentEvent;
@@ -476,8 +477,7 @@ public abstract class JalviewChimeraBinding extends
         // Jmol callback has completed.
         if (mapping == null || mapping.length < 1)
         {
-          throw new Error(
-                  "Implementation error - Chimera seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016");
+          throw new Error(MessageManager.getString("error.implementation_error_chimera_getting_data"));
         }
         int lastPos = -1;
         for (int s = 0; s < sequence[pdbfnum].length; s++)
@@ -1350,9 +1350,7 @@ public abstract class JalviewChimeraBinding extends
   {
     if (pe < 0 || pe >= pdbentry.length)
     {
-      throw new Error(
-              "Implementation error - no corresponding pdbentry (for index "
-                      + pe + ") to add sequences mappings to");
+      throw new Error(MessageManager.formatMessage("error.implementation_error_no_pdbentry_from_index", new String[]{Integer.valueOf(pe).toString()}));
     }
     final String nullChain = "TheNullChain";
     Vector s = new Vector();
index 0a686d2..6346870 100644 (file)
@@ -819,8 +819,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   {
     if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
     {
-      throw new Error(
-              "call setProgressBar before registering the progress bar's handler.");
+      throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
     }
     progressBarHandlers.put(new Long(id), handler);
     final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
@@ -836,10 +835,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
         public void actionPerformed(ActionEvent e)
         {
           handler.cancelActivity(id);
-          us.setProgressBar(
-                  "Cancelled "
-                          + ((JLabel) progressPanel.getComponent(0))
-                                  .getText(), id);
+          us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", new String[]{((JLabel) progressPanel.getComponent(0)).getText()}), id);
         }
       });
       progressPanel.add(cancel, BorderLayout.EAST);
@@ -1002,7 +998,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
             currentFileFormat, false);
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save Alignment to file");
+    chooser.setDialogTitle(MessageManager.getString("label.save_alignment_to_file"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
@@ -1947,7 +1943,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
         // /////
         // ADD HISTORY ITEM
         //
-        addHistoryItem(new EditCommand("Add sequences", EditCommand.PASTE,
+        addHistoryItem(new EditCommand(MessageManager.getString("label.add_sequences"), EditCommand.PASTE,
                 sequences, 0, alignment.getWidth(), alignment));
       }
       // Add any annotations attached to sequences
@@ -2206,7 +2202,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     /*
      * //ADD HISTORY ITEM
      */
-    addHistoryItem(new EditCommand("Cut Sequences", EditCommand.CUT, cut,
+    addHistoryItem(new EditCommand(MessageManager.getString("label.cut_sequences"), EditCommand.CUT, cut,
             sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
             viewport.getAlignment()));
 
@@ -2610,7 +2606,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     boolean addFirstIndex = false;
     if (viewTitle == null || viewTitle.trim().length() == 0)
     {
-      viewTitle = "View";
+      viewTitle = MessageManager.getString("action.view");
       addFirstIndex = true;
     }
     else
@@ -4602,7 +4598,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       public void run()
       {
         final long sttime = System.currentTimeMillis();
-        ths.setProgressBar("Searching for sequences from " + fsrc, sttime);
+        ths.setProgressBar(MessageManager.formatMessage("status.searching_for_sequences_from", new String[]{fsrc}), sttime);
         try
         {
           Alignment ds = ths.getViewport().getAlignment().getDataset(); // update
@@ -4656,7 +4652,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           jalview.bin.Cache.log.error("Error when finding crossreferences",
                   e);
         }
-        ths.setProgressBar("Finished searching for sequences from " + fsrc,
+        ths.setProgressBar(MessageManager.formatMessage("status.finished_searching_for_sequences_from", new String[]{fsrc}),
                 sttime);
       }
 
@@ -5687,8 +5683,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     if (!viewport.getSequenceSetId().equals(
             alignmentPanel.av.getSequenceSetId()))
     {
-      throw new Error(
-              "Implementation error: cannot show a view from another alignment in an AlignFrame.");
+      throw new Error(MessageManager.getString("error.implementation_error_cannot_show_view_alignment_frame"));
     }
     if (tabbedPane != null
             & alignPanels.indexOf(alignmentPanel) != tabbedPane
index 134019d..cdac5b4 100644 (file)
@@ -34,6 +34,7 @@ import jalview.datamodel.*;
 import jalview.jbgui.*;
 import jalview.schemes.*;
 import jalview.structure.StructureSelectionManager;
+import jalview.util.MessageManager;
 
 /**
  * DOCUMENT ME!
@@ -1119,9 +1120,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
             .getProperty("java.awt.headless").equals("true"));
     if (alignFrame != null && !headless)
     {
-      alignFrame.setProgressBar("Saving "
-              + (type == jalview.util.ImageMaker.PNG ? "PNG image"
-                      : "EPS file"), progress);
+      alignFrame.setProgressBar(MessageManager.formatMessage("status.saving_file", new String[]{(type == jalview.util.ImageMaker.PNG ? MessageManager.getString("label.png_image") : MessageManager.getString("label.eps_file"))}), progress);
     }
     try
     {
@@ -1208,7 +1207,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
     {
       if (alignFrame != null && !headless)
       {
-        alignFrame.setProgressBar("Export complete.", progress);
+        alignFrame.setProgressBar(MessageManager.getString("status.export_complete"), progress);
       }
     }
   }
index 39f3a13..7226eb0 100644 (file)
@@ -168,8 +168,7 @@ public class AnnotationColourChooser extends JPanel
         threshold.setSelectedIndex(2);
         break;
       default:
-        throw new Error(
-                "Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
+        throw new Error(MessageManager.getString("error.implementation_error_dont_know_about_thereshold_setting"));
       }
       thresholdIsMin.setSelected(acg.thresholdIsMinMax);
       thresholdValue.setText("" + acg.getAnnotationThreshold());
@@ -472,7 +471,7 @@ public class AnnotationColourChooser extends JPanel
   public void minColour_actionPerformed()
   {
     Color col = JColorChooser.showDialog(this,
-            "Select Colour for Minimum Value", minColour.getBackground());
+            MessageManager.getString("label.select_colour_minimum_value"), minColour.getBackground());
     if (col != null)
     {
       minColour.setBackground(col);
@@ -484,7 +483,7 @@ public class AnnotationColourChooser extends JPanel
   public void maxColour_actionPerformed()
   {
     Color col = JColorChooser.showDialog(this,
-            "Select Colour for Maximum Value", maxColour.getBackground());
+            MessageManager.getString("label.select_colour_maximum_value"), maxColour.getBackground());
     if (col != null)
     {
       maxColour.setBackground(col);
index 0975d24..315c3e2 100644 (file)
@@ -75,7 +75,7 @@ public class AnnotationExporter extends JPanel
     this.ap = ap;
     features = true;
     CSVFormat.setVisible(false);
-    frame.setTitle("Export Features");
+    frame.setTitle(MessageManager.getString("label.export_features"));
   }
 
   public void exportAnnotations(AlignmentPanel ap,
@@ -89,7 +89,7 @@ public class AnnotationExporter extends JPanel
     this.annotations = annotations;
     this.sequenceGroups = list;
     this.alignmentProperties = alProperties;
-    frame.setTitle("Export Annotations");
+    frame.setTitle(MessageManager.getString("label.export_annotations"));
   }
 
   public void toFile_actionPerformed(ActionEvent e)
@@ -98,15 +98,15 @@ public class AnnotationExporter extends JPanel
             jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle(features ? "Save Features to File"
-            : "Save Annotation to File");
+    chooser.setDialogTitle(features ? MessageManager.getString("label.save_features_to_file")
+            : MessageManager.getString("label.save_annotation_to_file"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
 
     if (value == JalviewFileChooser.APPROVE_OPTION)
     {
-      String text = "No features found on alignment";
+      String text = MessageManager.getString("label.no_features_on_alignment");
       if (features)
       {
         if (GFFFormat.isSelected())
@@ -153,7 +153,7 @@ public class AnnotationExporter extends JPanel
 
   public void toTextbox_actionPerformed(ActionEvent e)
   {
-    String text = "No features found on alignment";
+    String text = MessageManager.getString("label.no_features_on_alignment");
     if (features)
     {
       if (GFFFormat.isSelected())
index 4036347..30253bf 100755 (executable)
@@ -307,7 +307,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
     else if (evt.getActionCommand().equals(COLOUR))
     {
       Color col = JColorChooser.showDialog(this,
-              "Choose foreground colour", Color.black);
+              MessageManager.getString("label.select_foreground_colour"), Color.black);
 
       for (int i = 0; i < av.getColumnSelection().size(); i++)
       {
index bab8a2d..998db4b 100644 (file)
@@ -731,7 +731,7 @@ public class AppJmol extends GStructureViewer implements Runnable,
           long hdl = pdbid.hashCode() - System.currentTimeMillis();
           if (progressBar != null)
           {
-            progressBar.setProgressBar("Fetching PDB " + pdbid, hdl);
+            progressBar.setProgressBar(MessageManager.formatMessage("status.fetching_pdb", new String[]{pdbid}), hdl);
           }
           try
           {
@@ -747,7 +747,7 @@ public class AppJmol extends GStructureViewer implements Runnable,
           }
           if (progressBar != null)
           {
-            progressBar.setProgressBar("Finished.", hdl);
+            progressBar.setProgressBar(MessageManager.getString("label.state_completed"), hdl);
           }
           if (pdbseq != null)
           {
@@ -891,7 +891,7 @@ public class AppJmol extends GStructureViewer implements Runnable,
             jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save PDB File");
+    chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
@@ -1096,7 +1096,7 @@ public class AppJmol extends GStructureViewer implements Runnable,
   public void backGround_actionPerformed(ActionEvent actionEvent)
   {
     java.awt.Color col = JColorChooser.showDialog(this,
-            "Select Background Colour", null);
+            MessageManager.getString("label.select_backgroud_colour"), null);
     if (col != null)
     {
       jmb.setBackgroundColour(col);
index 0935d9f..c7835a5 100644 (file)
@@ -440,7 +440,7 @@ public class BlogReader extends JPanel
     topBottomSplitPane.setBottomComponent(bottomPanel);
     JScrollPane spTextDescription = new JScrollPane(textDescription);
     textDescription.setText("");
-    statusBar.setText(MessageManager.getString("label.status"));
+    statusBar.setText(new StringBuffer("[").append(MessageManager.getString("label.status")).append("]").toString());
     buttonRefresh.addActionListener(new ActionListener()
     {
 
index cf04ae8..236d094 100644 (file)
@@ -698,7 +698,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
           long hdl = pdbid.hashCode() - System.currentTimeMillis();
           if (progressBar != null)
           {
-            progressBar.setProgressBar("Fetching PDB " + pdbid, hdl);
+            progressBar.setProgressBar(MessageManager.formatMessage("status.fetching_pdb", new String[]{pdbid}), hdl);
           }
           try
           {
@@ -714,7 +714,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
           }
           if (progressBar != null)
           {
-            progressBar.setProgressBar("Finished.", hdl);
+            progressBar.setProgressBar(MessageManager.getString("label.state_completed"), hdl);
           }
           if (pdbseq != null)
           {
@@ -866,7 +866,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
             jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save PDB File");
+    chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
@@ -928,7 +928,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
    */
   public void eps_actionPerformed(ActionEvent e)
   {
-    throw new Error("EPS Generation not yet implemented.");
+    throw new Error(MessageManager.getString("error.eps_generation_not_implemented"));
   }
 
   /**
@@ -939,7 +939,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
    */
   public void png_actionPerformed(ActionEvent e)
   {
-    throw new Error("PNG Generation not yet implemented.");
+           throw new Error(MessageManager.getString("error.png_generation_not_implemented"));
   }
 
   public void jmolColour_actionPerformed(ActionEvent actionEvent)
@@ -1044,7 +1044,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
   public void backGround_actionPerformed(ActionEvent actionEvent)
   {
     java.awt.Color col = JColorChooser.showDialog(this,
-            "Select Background Colour", null);
+               MessageManager.getString("label.select_backgroud_colour"), null);
     if (col != null)
     {
       jmb.setBackgroundColour(col);
index 5f06bad..ea7e539 100644 (file)
@@ -501,8 +501,7 @@ public class Console extends WindowAdapter implements WindowListener,
       } catch (InterruptedException ie)
       {
       }
-      throw new NullPointerException(
-              "Application test: throwing an NullPointerException It should arrive at the console");
+      throw new NullPointerException(MessageManager.getString("exception.application_test_npe"));
     }
   }
 
index 74297bb..7fd091f 100644 (file)
@@ -141,7 +141,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer
 
     chooser.setAcceptAllFileFilterUsed(false);
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save Text to File");
+    chooser.setDialogTitle(MessageManager.getString("label.save_text_to_file"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
index 7f8d289..0c22b14 100644 (file)
@@ -100,7 +100,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
 
     chooser.setAcceptAllFileFilterUsed(false);
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save Text to File");
+    chooser.setDialogTitle(MessageManager.getString("label.save_text_to_file"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
index 772a5d7..a3cec98 100644 (file)
@@ -452,7 +452,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
           public void run()
           {
             long instance = System.currentTimeMillis();
-            Desktop.instance.setProgressBar("Refreshing news", instance);
+            Desktop.instance.setProgressBar(MessageManager.getString("status.refreshing_news"), instance);
             jvnews.refreshNews();
             Desktop.instance.setProgressBar(null, instance);
             jvnews.showNews();
@@ -1012,7 +1012,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       if (format.equals("URL NOT FOUND"))
       {
         JOptionPane.showInternalMessageDialog(Desktop.desktop,
-                "Couldn't locate " + url, "URL not found",
+                MessageManager.formatMessage("label.couldnt_locate", new String[]{url}), MessageManager.getString("label.url_not_found"),
                 JOptionPane.WARNING_MESSAGE);
 
         return;
@@ -1386,7 +1386,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
             { "Jalview Project" }, "Jalview Project");
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save State");
+    chooser.setDialogTitle(MessageManager.getString("label.save_state"));
 
     int value = chooser.showSaveDialog(this);
 
@@ -1399,7 +1399,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         public void run()
         {
 
-          setProgressBar("Saving jalview project " + choice.getName(),
+          setProgressBar(MessageManager.formatMessage("label.saving_jalview_project", new String[]{choice.getName()}),
                   choice.hashCode());
           jalview.bin.Cache.setProperty("LAST_DIRECTORY",
                   choice.getParent());
@@ -1443,7 +1443,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
             { "Jalview Project", "Jalview Project (old)" },
             "Jalview Project");
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Restore state");
+    chooser.setDialogTitle(MessageManager.getString("label.restore_state"));
 
     int value = chooser.showOpenDialog(this);
 
@@ -1456,7 +1456,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       {
         public void run()
         {
-          setProgressBar("loading jalview project " + choice,
+          setProgressBar(MessageManager.formatMessage("label.loading_jalview_project", new String[]{choice}),
                   choice.hashCode());
           try
           {
@@ -1491,8 +1491,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   {
     if (fileLoadingCount == 0)
     {
-      fileLoadingPanels.add(addProgressPanel("Loading File: " + fileName
-              + "   "));
+      fileLoadingPanels.add(addProgressPanel(MessageManager.formatMessage("label.loading_file", new String[]{fileName})));
     }
     fileLoadingCount++;
   }
@@ -1730,7 +1729,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
               jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
       chooser.setFileView(new JalviewFileView());
-      chooser.setDialogTitle("Open a saved VAMSAS session");
+      chooser.setDialogTitle(MessageManager.getString("label.open_saved_vamsas_session"));
       chooser.setToolTipText(MessageManager
               .getString("label.select_vamsas_session_opened_as_new_vamsas_session"));
 
@@ -1823,22 +1822,22 @@ public class Desktop extends jalview.jbgui.GDesktop implements
       return false;
     }
 
-    setProgressBar("Importing VAMSAS session from " + file.getName(),
+    setProgressBar(MessageManager.formatMessage("status.importing_vamsas_session_from", new String[]{file.getName()}),
             file.hashCode());
     try
     {
       v_client = new jalview.gui.VamsasApplication(this, file, null);
     } catch (Exception ex)
     {
-      setProgressBar("Importing VAMSAS session from " + file.getName(),
-              file.hashCode());
+        setProgressBar(MessageManager.formatMessage("status.importing_vamsas_session_from", new String[]{file.getName()}),
+                file.hashCode());
       jalview.bin.Cache.log.error(
               "New vamsas session from existing session file failed:", ex);
       return false;
     }
     setupVamsasConnectedGui();
     v_client.initial_update(); // TODO: thread ?
-    setProgressBar("Importing VAMSAS session from " + file.getName(),
+    setProgressBar(MessageManager.formatMessage("status.importing_vamsas_session_from", new String[]{file.getName()}),
             file.hashCode());
     return v_client.inSession();
   }
@@ -1847,12 +1846,11 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   {
     if (v_client != null)
     {
-      throw new Error(
-              "Trying to join a vamsas session when another is already connected.");
+      throw new Error(MessageManager.getString("error.try_join_vamsas_session_another"));
     }
     if (mysesid == null)
     {
-      throw new Error("Invalid vamsas session id.");
+      throw new Error(MessageManager.getString("error.invalid_vamsas_session_id"));
     }
     v_client = new VamsasApplication(this, mysesid);
     setupVamsasConnectedGui();
@@ -1999,15 +1997,14 @@ public class Desktop extends jalview.jbgui.GDesktop implements
               { "Vamsas Document" }, "Vamsas Document");
 
       chooser.setFileView(new JalviewFileView());
-      chooser.setDialogTitle("Save Vamsas Document Archive");
+      chooser.setDialogTitle(MessageManager.getString("label.save_vamsas_document_archive"));
 
       int value = chooser.showSaveDialog(this);
 
       if (value == JalviewFileChooser.APPROVE_OPTION)
       {
         java.io.File choice = chooser.getSelectedFile();
-        JPanel progpanel = addProgressPanel("Saving VAMSAS Document to "
-                + choice.getName());
+        JPanel progpanel = addProgressPanel(MessageManager.formatMessage("label.saving_vamsas_doc", new String[]{choice.getName()}));
         jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice.getParent());
         String warnmsg = null;
         String warnttl = null;
@@ -2059,7 +2056,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     }
     if (b)
     {
-      vamUpdate = this.addProgressPanel("Updating vamsas session");
+      vamUpdate = this.addProgressPanel(MessageManager.getString("label.updating_vamsas_session"));
     }
     vamsasStart.setVisible(!b);
     vamsasStop.setVisible(!b);
@@ -2290,8 +2287,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     // use reflection to avoid creating compilation dependency.
     if (!jalview.bin.Cache.groovyJarsPresent())
     {
-      throw new Error(
-              "Implementation Error. Cannot create groovyShell without Groovy on the classpath!");
+      throw new Error(MessageManager.getString("error.implementation_error_cannot_create_groovyshell"));
     }
     try
     {
@@ -2313,8 +2309,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
               .showInternalMessageDialog(
                       Desktop.desktop,
 
-                      "Couldn't create the groovy Shell. Check the error log for the details of what went wrong.",
-                      "Jalview Groovy Support Failed",
+                      MessageManager.getString("label.couldnt_create_groovy_shell"),
+                      MessageManager.getString("label.groovy_support_failed"),
                       JOptionPane.ERROR_MESSAGE);
     }
   }
@@ -2365,8 +2361,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   {
     if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
     {
-      throw new Error(
-              "call setProgressBar before registering the progress bar's handler.");
+      throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
     }
     progressBarHandlers.put(new Long(id), handler);
     final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
@@ -2381,10 +2376,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         public void actionPerformed(ActionEvent e)
         {
           handler.cancelActivity(id);
-          us.setProgressBar(
-                  "Cancelled "
-                          + ((JLabel) progressPanel.getComponent(0))
-                                  .getText(), id);
+          us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", new String[]{((JLabel) progressPanel.getComponent(0)).getText()}), id);
         }
       });
       progressPanel.add(cancel, BorderLayout.EAST);
@@ -2646,7 +2638,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         {
           if (progress != null)
           {
-            progress.setProgressBar("Opening " + url, this.hashCode());
+            progress.setProgressBar(MessageManager.formatMessage("status.opening_params", new String[]{url}), this.hashCode());
           }
           jalview.util.BrowserLauncher.openURL(url);
         } catch (Exception ex)
@@ -2654,9 +2646,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
           JOptionPane
                   .showInternalMessageDialog(
                           Desktop.desktop,
-                          "Unixers: Couldn't find default web browser."
-                                  + "\nAdd the full path to your browser in Preferences.",
-                          "Web browser not found",
+                          MessageManager.getString("label.web_browser_not_found_unix"),
+                          MessageManager.getString("label.web_browser_not_found"),
                           JOptionPane.WARNING_MESSAGE);
 
           ex.printStackTrace();
index eb64dee..b04aa85 100644 (file)
@@ -940,8 +940,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
         return ((GraduatedColor) fc).getMaxColor();
       }
     }
-    throw new Error("Implementation Error: Unrecognised render object "
-            + fc.getClass() + " for features of type " + featureType);
+    throw new Error(MessageManager.formatMessage("error.implementation_error_unrecognised_render_object_for_features_type", new String[]{fc.getClass().toString(),featureType}));
   }
 
   /**
@@ -965,8 +964,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
         return ((GraduatedColor) fc).findColor(feature);
       }
     }
-    throw new Error("Implementation Error: Unrecognised render object "
-            + fc.getClass() + " for features of type " + feature.getType());
+    throw new Error(MessageManager.formatMessage("error.implementation_error_unrecognised_render_object_for_features_type", new String[]{fc.getClass().toString(),feature.getType()}));
   }
 
   private boolean showFeature(SequenceFeature sequenceFeature)
@@ -1218,12 +1216,12 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
       { "OK", "Cancel" };
     }
 
-    String title = newFeatures ? "Create New Sequence Feature(s)"
-            : "Amend/Delete Features for " + sequences[0].getName();
+    String title = newFeatures ? MessageManager.getString("label.create_new_sequence_features")
+            : MessageManager.formatMessage("label.amend_delete_features", new String[]{sequences[0].getName()});
 
     int reply = JOptionPane.showInternalOptionDialog(Desktop.desktop,
             bigPanel, title, JOptionPane.YES_NO_CANCEL_OPTION,
-            JOptionPane.QUESTION_MESSAGE, null, options, "OK");
+            JOptionPane.QUESTION_MESSAGE, null, options, MessageManager.getString("action.ok"));
 
     jalview.io.FeaturesFile ffile = new jalview.io.FeaturesFile();
 
index 08c4ef2..577012b 100644 (file)
@@ -646,7 +646,7 @@ public class FeatureSettings extends JPanel
             { "fc" }, new String[]
             { "Sequence Feature Colours" }, "Sequence Feature Colours");
     chooser.setFileView(new jalview.io.JalviewFileView());
-    chooser.setDialogTitle("Load Feature Colours");
+    chooser.setDialogTitle(MessageManager.getString("label.load_feature_colours"));
     chooser.setToolTipText(MessageManager.getString("action.load"));
 
     int value = chooser.showOpenDialog(this);
@@ -744,7 +744,7 @@ public class FeatureSettings extends JPanel
             { "fc" }, new String[]
             { "Sequence Feature Colours" }, "Sequence Feature Colours");
     chooser.setFileView(new jalview.io.JalviewFileView());
-    chooser.setDialogTitle("Save Feature Colour Scheme");
+    chooser.setDialogTitle(MessageManager.getString("label.save_feature_colours"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
@@ -1380,7 +1380,7 @@ public class FeatureSettings extends JPanel
     }
 
     private String[] columnNames =
-    { "Feature Type", "Colour", "Display" };
+    { MessageManager.getString("label.feature_type"), MessageManager.getString("action.colour"), MessageManager.getString("label.display") };
 
     private Object[][] data;
 
index cda6c46..b6116d9 100755 (executable)
@@ -226,8 +226,8 @@ public class FontChooser extends GFontChooser
       JOptionPane
               .showInternalMessageDialog(
                       this,
-                      "Font doesn't have letters defined\nso cannot be used\nwith alignment data.",
-                      "Invalid Font", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.getString("label.font_doesnt_have_letters_defined"),
+                      MessageManager.getString("label.invalid_font"), JOptionPane.WARNING_MESSAGE);
       return;
     }
     if (tp != null)
index ee779f7..7f6ac85 100755 (executable)
@@ -226,9 +226,8 @@ public class IdPanel extends JPanel implements MouseListener,
       JOptionPane
               .showInternalMessageDialog(
                       Desktop.desktop,
-                      "Unixers: Couldn't find default web browser."
-                              + "\nAdd the full path to your browser in Preferences.",
-                      "Web browser not found", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.getString("label.web_browser_not_found_unix"),
+                      MessageManager.getString("label.web_browser_not_found"), JOptionPane.WARNING_MESSAGE);
       ex.printStackTrace();
     }
 
index 43f5333..279662a 100644 (file)
@@ -219,8 +219,7 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener
       }
       else
       {
-        throw new Error(
-                "Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode.");
+        throw new Error(MessageManager.getString("error.implementation_error_cant_reorder_tree"));
       }
     }
     jalview.util.QuickSort.sort(names, nodes);
index f3bc42e..105209f 100644 (file)
@@ -40,6 +40,7 @@ import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
 import jalview.schemabinding.version2.*;
 import jalview.schemes.*;
+import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.util.jarInputStreamProvider;
 import jalview.viewmodel.AlignmentViewport;
@@ -437,7 +438,7 @@ public class Jalview2XML
     for (String dssids : dsses.keySet())
     {
       AlignFrame _af = dsses.get(dssids);
-      String jfileName = fileName + " Dataset for " + _af.getTitle();
+      String jfileName = MessageManager.formatMessage("label.dataset_for", new String[]{fileName,_af.getTitle()});
       if (!jfileName.endsWith(".xml"))
       {
         jfileName = jfileName + ".xml";
@@ -1502,8 +1503,7 @@ public class Jalview2XML
         return false;
       }
     }
-    throw new Error("Unsupported Version for calcIdparam "
-            + calcIdParam.toString());
+    throw new Error(MessageManager.formatMessage("error.unsupported_version_calcIdparam", new String[]{calcIdParam.toString()}));
   }
 
   /**
index 2e3b236..946181c 100755 (executable)
@@ -160,7 +160,7 @@ public class Jalview2XML_V1
           {
 
             JOptionPane.showInternalMessageDialog(Desktop.desktop,
-                    "Error loading  " + file, "Error loading Jalview file",
+                    MessageManager.formatMessage("label.error_loading_file_params", new String[]{file}), MessageManager.getString("label.error_loading_jalview_file"),
                     JOptionPane.WARNING_MESSAGE);
           }
         });
index 8a61757..a9347eb 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.gui;
 
+import jalview.util.MessageManager;
+
 import java.awt.Component;
 
 public class OOMWarning implements Runnable
@@ -78,11 +80,8 @@ public class OOMWarning implements Runnable
     javax.swing.JOptionPane
             .showInternalMessageDialog(
                     desktop,
-                    "Out of memory when "
-                            + action
-                            + "!!"
-                            + "\nSee help files for increasing Java Virtual Machine memory.",
-                    "Out of memory",
+                    MessageManager.formatMessage("warn.out_of_memory_when_action", new String[]{action}),
+                    MessageManager.getString("label.out_of_memory"),
                     javax.swing.JOptionPane.WARNING_MESSAGE);
     // hope that there's enough memory left that no more appear.
     oomInprogress = false;
index b3ef1ed..4a9b580 100644 (file)
@@ -855,7 +855,7 @@ public class OptsAndParamsPage
       }
       else
       {
-        throw new Error("Invalid value " + string + " for option " + option);
+        throw new Error(MessageManager.formatMessage("error.invalid_value_for_option", new String[]{string,option}));
       }
 
     }
index 04e8556..3483cc4 100644 (file)
@@ -151,7 +151,7 @@ public class PCAPanel extends GPCAPanel implements Runnable,
 
   public void bgcolour_actionPerformed(ActionEvent e)
   {
-    Color col = JColorChooser.showDialog(this, "Select Background Colour",
+    Color col = JColorChooser.showDialog(this, MessageManager.getString("label.select_backgroud_colour"),
             rc.bgColour);
 
     if (col != null)
@@ -168,11 +168,11 @@ public class PCAPanel extends GPCAPanel implements Runnable,
   {
     long progId = System.currentTimeMillis();
     IProgressIndicator progress = this;
-    String message = "Recalculating PCA";
+    String message = MessageManager.getString("label.pca_recalculating");
     if (getParent() == null)
     {
       progress = ap.alignFrame;
-      message = "Calculating PCA";
+      message = MessageManager.getString("label.pca_calculating");
     }
     progress.setProgressBar(message, progId);
     try
@@ -666,8 +666,7 @@ public class PCAPanel extends GPCAPanel implements Runnable,
   {
     if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
     {
-      throw new Error(
-              "call setProgressBar before registering the progress bar's handler.");
+      throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
     }
     progressBarHandlers.put(new Long(id), handler);
     final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
@@ -683,10 +682,7 @@ public class PCAPanel extends GPCAPanel implements Runnable,
         public void actionPerformed(ActionEvent e)
         {
           handler.cancelActivity(id);
-          us.setProgressBar(
-                  "Cancelled "
-                          + ((JLabel) progressPanel.getComponent(0))
-                                  .getText(), id);
+          us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", new String[]{((JLabel) progressPanel.getComponent(0)).getText()}), id);
         }
       });
       progressPanel.add(cancel, BorderLayout.EAST);
index b5c27c6..e44915d 100755 (executable)
@@ -509,7 +509,7 @@ public class Preferences extends GPreferences
             { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "Jalview" },
             jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT"));
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Select startup file");
+    chooser.setDialogTitle(MessageManager.getString("label.select_startup_file"));
 
     int value = chooser.showOpenDialog(this);
 
@@ -651,7 +651,7 @@ public class Preferences extends GPreferences
   public void defaultBrowser_mouseClicked(MouseEvent e)
   {
     JFileChooser chooser = new JFileChooser(".");
-    chooser.setDialogTitle("Select default web browser");
+    chooser.setDialogTitle(MessageManager.getString("label.select_default_browser"));
 
     int value = chooser.showOpenDialog(this);
 
@@ -687,7 +687,7 @@ public class Preferences extends GPreferences
   public void minColour_actionPerformed()
   {
     Color col = JColorChooser.showDialog(this,
-            "Select Colour for Minimum Value", minColour.getBackground());
+            MessageManager.getString("label.select_colour_minimum_value"), minColour.getBackground());
     if (col != null)
     {
       minColour.setBackground(col);
@@ -698,7 +698,7 @@ public class Preferences extends GPreferences
   public void maxColour_actionPerformed()
   {
     Color col = JColorChooser.showDialog(this,
-            "Select Colour for Maximum Value", maxColour.getBackground());
+            MessageManager.getString("label.select_colour_maximum_value"), maxColour.getBackground());
     if (col != null)
     {
       maxColour.setBackground(col);
@@ -726,8 +726,8 @@ public class Preferences extends GPreferences
       JOptionPane
               .showInternalMessageDialog(
                       Desktop.desktop,
-                      "The user defined width for the\nannotation and sequence ID columns\nin exported figures must be\nat least 12 pixels wide.",
-                      "Invalid ID Column width",
+                      MessageManager.getString("warn.user_defined_width_requirements"),
+                      MessageManager.getString("label.invalid_id_column_width"),
                       JOptionPane.WARNING_MESSAGE);
       userIdWidth.setText("");
     }
index 5adfae9..91f2450 100755 (executable)
@@ -228,7 +228,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable
         }
       }
 
-      EditCommand cut = new EditCommand("Remove Redundancy",
+      EditCommand cut = new EditCommand(MessageManager.getString("action.remove_redundancy"),
               EditCommand.CUT, deleted, 0, width, ap.av.getAlignment());
 
       for (int i = 0; i < del.size(); i++)
index bf5ea93..02c6c16 100644 (file)
@@ -949,7 +949,7 @@ public class SeqPanel extends JPanel implements MouseListener,
       message.append("Edit group:");
       if (editCommand == null)
       {
-        editCommand = new EditCommand("Edit Group");
+        editCommand = new EditCommand(MessageManager.getString("action.edit_group"));
       }
     }
     else
@@ -962,7 +962,7 @@ public class SeqPanel extends JPanel implements MouseListener,
       }
       if (editCommand == null)
       {
-        editCommand = new EditCommand("Edit " + label);
+        editCommand = new EditCommand(MessageManager.formatMessage("label.edit_params", new String[]{label}));
       }
     }
 
index b2bf35f..4506eaa 100755 (executable)
@@ -78,7 +78,7 @@ public class SequenceFetcher extends JPanel implements Runnable
       if (guiWindow != null)
       {
         guiWindow.setProgressBar(
-                "Waiting for Sequence Database Fetchers to initialise",
+                MessageManager.getString("status.waiting_sequence_database_fetchers_init"),
                 Thread.currentThread().hashCode());
       }
       // initting happening on another thread - so wait around to see if it
@@ -97,7 +97,7 @@ public class SequenceFetcher extends JPanel implements Runnable
       if (guiWindow != null)
       {
         guiWindow.setProgressBar(
-                "Waiting for Sequence Database Fetchers to initialise",
+                       MessageManager.getString("status.waiting_sequence_database_fetchers_init"),
                 Thread.currentThread().hashCode());
       }
     }
@@ -115,7 +115,7 @@ public class SequenceFetcher extends JPanel implements Runnable
        */
       if (guiWindow != null)
       {
-        guiWindow.setProgressBar("Initialising Sequence Database Fetchers",
+        guiWindow.setProgressBar(MessageManager.getString("status.init_sequence_database_fetchers"),
                 Thread.currentThread().hashCode());
       }
       dasRegistry = jalview.bin.Cache.getDasSourceRegistry();
@@ -124,7 +124,7 @@ public class SequenceFetcher extends JPanel implements Runnable
       jalview.ws.SequenceFetcher sf = new jalview.ws.SequenceFetcher();
       if (guiWindow != null)
       {
-        guiWindow.setProgressBar("Initialising Sequence Database Fetchers",
+        guiWindow.setProgressBar(MessageManager.getString("status.init_sequence_database_fetchers"),
                 Thread.currentThread().hashCode());
       }
       lastDasSourceRegistry = (dasRegistry.getDasRegistryURL() + dasRegistry
@@ -161,8 +161,8 @@ public class SequenceFetcher extends JPanel implements Runnable
               JOptionPane
                       .showInternalMessageDialog(
                               Desktop.desktop,
-                              "Could not create the sequence fetcher client. Check error logs for details.",
-                              "Couldn't create SequenceFetcher",
+                              MessageManager.getString("warn.couldnt_create_sequence_fetcher_client"),
+                              MessageManager.getString("label.couldnt_create_sequence_fetcher"),
                               JOptionPane.ERROR_MESSAGE);
             }
           });
@@ -494,8 +494,7 @@ public class SequenceFetcher extends JPanel implements Runnable
       try
       {
         // update status
-        guiWindow.setProgressBar("Fetching " + nqueries
-                + " sequence queries from " + proxy.getDbName(), Thread
+        guiWindow.setProgressBar(MessageManager.formatMessage("status.fetching_sequence_queries_from", new String[]{Integer.valueOf(nqueries).toString(),proxy.getDbName()}), Thread
                 .currentThread().hashCode());
         isAliSource = proxy.isA(DBRefSource.ALIGNMENTDB);
         if (proxy.getAccessionSeparator() == null)
@@ -693,11 +692,11 @@ public class SequenceFetcher extends JPanel implements Runnable
           presultTitle.add(titl);
         }
       }
-      guiWindow.setProgressBar("Finished querying", Thread.currentThread()
+      guiWindow.setProgressBar(MessageManager.getString("status.finshed_querying"), Thread.currentThread()
               .hashCode());
     }
-    guiWindow.setProgressBar((presult.size() > 0) ? "Parsing results."
-            : "Processing ..", Thread.currentThread().hashCode());
+    guiWindow.setProgressBar((presult.size() > 0) ? MessageManager.getString("status.parsing_results")
+            : MessageManager.getString("status.processing"), Thread.currentThread().hashCode());
     // process results
     while (presult.size() > 0)
     {
index 48f09f8..81b3bd3 100755 (executable)
@@ -136,8 +136,7 @@ public class SliderPanel extends GSliderPanel
       sp.cs = cs;
     }
 
-    conservationSlider.setTitle("Conservation Colour Increment  (" + source
-            + ")");
+    conservationSlider.setTitle(MessageManager.formatMessage("label.conservation_colour_increment", new String[]{source}));
 
     if (ap.av.getAlignment().getGroups() != null)
     {
@@ -213,7 +212,7 @@ public class SliderPanel extends GSliderPanel
       pid.cs = cs;
     }
 
-    PIDSlider.setTitle("Percentage Identity Threshold (" + source + ")");
+    PIDSlider.setTitle(MessageManager.formatMessage("label.percentage_identity_thereshold", new String[]{source}));
 
     if (ap.av.getAlignment().getGroups() != null)
     {
index dc705b2..bb2f295 100644 (file)
@@ -81,7 +81,7 @@ public class TextColourChooser
       public void mousePressed(MouseEvent e)
       {
         Color col = JColorChooser.showDialog(bigpanel,
-                "Select Colour for Text", col1.getBackground());
+                MessageManager.getString("label.select_colour_for_text"), col1.getBackground());
         if (col != null)
         {
           colour1Changed(col);
@@ -95,7 +95,7 @@ public class TextColourChooser
       public void mousePressed(MouseEvent e)
       {
         Color col = JColorChooser.showDialog(bigpanel,
-                "Select Colour for Text", col2.getBackground());
+                       MessageManager.getString("label.select_colour_for_text"), col2.getBackground());
         if (col != null)
         {
           colour2Changed(col);
@@ -113,7 +113,7 @@ public class TextColourChooser
     });
 
     int reply = JOptionPane.showInternalOptionDialog(ap, bigpanel,
-            "Adjust Foreground Text Colour Threshold",
+            MessageManager.getString("label.adjunst_foreground_text_colour_thereshold"),
             JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
             null, null, null);
 
index e188177..c5650f5 100755 (executable)
@@ -757,7 +757,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
       if (SwingUtilities.isRightMouseButton(evt))
       {
         Color col = JColorChooser.showDialog(this,
-                "Select Sub-Tree Colour", highlightNode.color);
+                MessageManager.getString("label.select_subtree_colour"), highlightNode.color);
         if (col != null)
         {
           setColor(highlightNode, col);
index cf49608..ee0bfaf 100755 (executable)
@@ -399,7 +399,7 @@ public class TreePanel extends GTreePanel
     JalviewFileChooser chooser = new JalviewFileChooser(
             jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save tree as newick file");
+    chooser.setDialogTitle(MessageManager.getString("label.save_tree_as_newick"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(null);
@@ -695,7 +695,7 @@ public class TreePanel extends GTreePanel
               { "eps" }, new String[]
               { "Encapsulated Postscript" }, "Encapsulated Postscript");
       chooser.setFileView(new jalview.io.JalviewFileView());
-      chooser.setDialogTitle("Create EPS file from tree");
+      chooser.setDialogTitle(MessageManager.getString("label.create_eps_from_tree"));
       chooser.setToolTipText(MessageManager.getString("action.save"));
 
       int value = chooser.showSaveDialog(this);
@@ -742,7 +742,7 @@ public class TreePanel extends GTreePanel
               { "Portable network graphics" }, "Portable network graphics");
 
       chooser.setFileView(new jalview.io.JalviewFileView());
-      chooser.setDialogTitle("Create PNG image from tree");
+      chooser.setDialogTitle(MessageManager.getString("label.create_png_from_tree"));
       chooser.setToolTipText(MessageManager.getString("action.save"));
 
       int value = chooser.showSaveDialog(this);
index f719d27..a16fdc7 100755 (executable)
@@ -746,7 +746,7 @@ public class UserDefinedColours extends GUserDefinedColours implements
             { "Jalview User Colours" }, "Jalview User Colours");
 
     chooser.setFileView(new jalview.io.JalviewFileView());
-    chooser.setDialogTitle("Save colour scheme");
+    chooser.setDialogTitle(MessageManager.getString("label.save_colour_scheme"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
index b789040..77a7693 100644 (file)
@@ -31,6 +31,7 @@ import jalview.structure.SelectionSource;
 import jalview.structure.StructureSelectionManager;
 import jalview.structure.VamsasListener;
 import jalview.structure.VamsasSource;
+import jalview.util.MessageManager;
 
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
@@ -155,8 +156,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource
       {
         if (sess != null)
         {
-          throw new Error(
-                  "Implementation Error - cannot import existing vamsas document into an existing session, Yet!");
+          throw new Error(MessageManager.getString("error.implementation_error_cannot_import_vamsas_doc"));
         }
         try
         {
@@ -176,8 +176,8 @@ public class VamsasApplication implements SelectionSource, VamsasSource
                   .showInternalMessageDialog(
                           Desktop.desktop,
 
-                          "VAMSAS Document could not be opened as a new session - please choose another",
-                          "VAMSAS Document Import Failed",
+                          MessageManager.getString("label.vamsas_doc_couldnt_be_opened_as_new_session"),
+                          MessageManager.getString("label.vamsas_document_import_failed"),
                           JOptionPane.ERROR_MESSAGE);
 
         }
@@ -263,8 +263,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource
   {
     if (!inSession())
     {
-      throw new Error(
-              "Impementation error! Vamsas Operations when client not initialised and connected.");
+      throw new Error(MessageManager.getString("error.implementation_error_vamsas_operation_not_init"));
     }
     addDocumentUpdateHandler();
     addStoreDocumentHandler();
@@ -348,7 +347,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource
   public void end_session(boolean promptUser)
   {
     if (!inSession())
-      throw new Error("Jalview not connected to Vamsas session.");
+      throw new Error(MessageManager.getString("error.jalview_no_connected_vamsas_session"));
     Cache.log.info("Jalview disconnecting from the Vamsas Session.");
     try
     {
@@ -716,8 +715,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource
         return;
       }
 
-      throw new Error(
-              "IMPLEMENTATION ERROR: Cannot recover vamsas object mappings - no backup was made.");
+      throw new Error(MessageManager.getString("error.implementation_error_cannot_recover_vamsas_object_mappings"));
     }
     jv2vobj.clear();
     Iterator el = _backup_jv2vobj.entrySet().iterator();
index 2afec55..8dcf72a 100644 (file)
@@ -356,8 +356,7 @@ public class WebserviceInfo extends GWebserviceInfo implements
   {
     if (jobpane < 0 || jobpane >= jobPanes.size())
     {
-      throw new Error("setStatus called for non-existent job pane."
-              + jobpane);
+      throw new Error(MessageManager.formatMessage("error.setstatus_called_non_existent_job_pane", new String[]{Integer.valueOf(jobpane).toString()}));
     }
     switch (status)
     {
@@ -651,8 +650,8 @@ public class WebserviceInfo extends GWebserviceInfo implements
       // anyhow - it has to stop threads and clean up
       // JBPNote : TODO: Instead of a warning, we should have an optional 'Are
       // you sure?' prompt
-      warnUser("This job cannot be cancelled.\nJust close the window.",
-              "Cancel job");
+      warnUser(MessageManager.getString("warn.job_cannot_be_cancelled_close_window"),
+              MessageManager.getString("action.cancel_job"));
     }
     else
     {
@@ -912,8 +911,7 @@ public class WebserviceInfo extends GWebserviceInfo implements
   {
     if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
     {
-      throw new Error(
-              "call setProgressBar before registering the progress bar's handler.");
+      throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
     }
     progressBarHandlers.put(new Long(id), handler);
     final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
@@ -929,10 +927,7 @@ public class WebserviceInfo extends GWebserviceInfo implements
         public void actionPerformed(ActionEvent e)
         {
           handler.cancelActivity(id);
-          us.setProgressBar(
-                  "Cancelled "
-                          + ((JLabel) progressPanel.getComponent(0))
-                                  .getText(), id);
+          us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", new String[]{((JLabel) progressPanel.getComponent(0)).getText()}), id);
         }
       });
       progressPanel.add(cancel, BorderLayout.EAST);
index c81e8c8..23645df 100644 (file)
@@ -218,7 +218,7 @@ public class WsJobParameters extends JPanel implements ItemListener,
 
     frame = new JDialog(Desktop.instance, true);
 
-    frame.setTitle("Edit parameters for " + service.getActionText());
+    frame.setTitle(MessageManager.formatMessage("label.edit_params_for", new String[]{service.getActionText()}));
     Rectangle deskr = Desktop.instance.getBounds();
     Dimension pref = this.getPreferredSize();
     frame.setBounds(new Rectangle(
index dec4745..3322d6a 100644 (file)
@@ -178,8 +178,7 @@ public class WsParamSetManager implements ParamManager
     }
     if (parser == null)
     {
-      throw new Error(
-              "Implementation error: Can't find a marshaller for the parameter set");
+      throw new Error(MessageManager.getString("error.implementation_error_cannot_find_marshaller_for_param_set"));
     }
     if (filename == null)
     {
@@ -189,7 +188,7 @@ public class WsParamSetManager implements ParamManager
               { "Web Service Parameter File" },
               "Web Service Parameter File");
       chooser.setFileView(new jalview.io.JalviewFileView());
-      chooser.setDialogTitle("Choose a filename for this parameter file");
+      chooser.setDialogTitle(MessageManager.getString("label.choose_filename_for_param_file"));
       chooser.setToolTipText(MessageManager.getString("action.save"));
       int value = chooser.showSaveDialog(Desktop.instance);
       if (value == JalviewFileChooser.APPROVE_OPTION)
index a85ebbf..1a5b9f8 100644 (file)
@@ -125,7 +125,7 @@ public class WsPreferences extends GWsPreferences
     }
 
     wsList.setModel(new WsUrlTableModel(tdat));
-    wsList.getColumn("Status").setMinWidth(10);
+    wsList.getColumn(MessageManager.getString("label.status")).setMinWidth(10);
   }
 
   private class JabaWSStatusRenderer extends JPanel implements
@@ -184,6 +184,8 @@ public class WsPreferences extends GWsPreferences
   {
 
     private Object[][] data;
+    private String[] columnNames = new String[]
+    { MessageManager.getString("label.service_url"), MessageManager.getString("label.status") };
 
     public WsUrlTableModel(Object[][] tdat)
     {
@@ -199,11 +201,7 @@ public class WsPreferences extends GWsPreferences
     @Override
     public String getColumnName(int column)
     {
-      if (column == 1)
-      {
-        return "Status";
-      }
-      return "Service URL";
+        return columnNames[column];
     }
 
     @Override
@@ -302,7 +300,7 @@ public class WsPreferences extends GWsPreferences
   protected void newSbrsUrl_actionPerformed(ActionEvent e)
   {
     RestServiceEditorPane rse = new RestServiceEditorPane();
-    rse.showDialog("Add a new Simple Bioinformatics Rest Service");
+    rse.showDialog(MessageManager.getString("label.add_new_sbrs_service"));
     String rservice = rse.getEditedRestService();
     if (rservice != null && !rsbsUrls.contains(rservice))
     {
@@ -320,7 +318,7 @@ public class WsPreferences extends GWsPreferences
     {
       RestServiceEditorPane rse = new RestServiceEditorPane(
               new RestServiceDescription(rsbsUrls.elementAt(sel)));
-      rse.showDialog("Edit Simple Bioinformatics Rest Service entry");
+      rse.showDialog(MessageManager.getString("label.edit_sbrs_entry"));
       String rservice = rse.getEditedRestService();
       if (rservice != null)
       {
@@ -484,8 +482,8 @@ public class WsPreferences extends GWsPreferences
       int validate = JOptionPane
               .showInternalConfirmDialog(
                       Desktop.desktop,
-                      "Validate JabaWS Server ?\n(Look in console output for results)",
-                      "Test Server?", JOptionPane.YES_NO_OPTION);
+                      MessageManager.getString("info.validate_jabaws_server"),
+                      MessageManager.getString("label.test_server"), JOptionPane.YES_NO_OPTION);
       if (validate == JOptionPane.OK_OPTION)
       {
         if (jalview.ws.jws2.Jws2Discoverer.testServiceUrl(foo))
@@ -497,7 +495,7 @@ public class WsPreferences extends GWsPreferences
           JOptionPane
                   .showInternalMessageDialog(
                           Desktop.desktop,
-                          "Service did not pass validation.\nCheck the Jalview Console for more details.");
+                          MessageManager.getString("warn.server_didnt_pass_validation"));
         }
       }
       else
@@ -603,7 +601,7 @@ public class WsPreferences extends GWsPreferences
         public void run()
         {
           long ct = System.currentTimeMillis();
-          Desktop.instance.setProgressBar("Refreshing Web Service Menus",
+          Desktop.instance.setProgressBar(MessageManager.getString("status.refreshing_web_service_menus"),
                   ct);
           if (lastrefresh != update)
           {
index c3c86d6..f73e250 100755 (executable)
@@ -24,6 +24,7 @@ import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
 
 import java.io.IOException;
 import java.util.Enumeration;
@@ -196,8 +197,7 @@ public abstract class AlignFile extends FileParse
   {
     if (key == null)
     {
-      throw new Error(
-              "Implementation error: Cannot have null alignment property key.");
+      throw new Error(MessageManager.getString("error.implementation_error_cannot_have_null_alignment"));
     }
     if (value == null)
     {
index 3f9a425..67559b9 100755 (executable)
@@ -501,8 +501,7 @@ public class AppletFormatAdapter
 
       else
       {
-        throw new Exception(
-                "Implementation error: Unknown file format string");
+        throw new Exception(MessageManager.getString("error.implementation_error_unknown_file_format_string"));
       }
       afile.setNewlineString(newline);
       afile.addJVSuffix(jvsuffix);
index 4ec464a..0f94efa 100755 (executable)
@@ -417,11 +417,8 @@ public class FileLoader implements Runnable
             javax.swing.JOptionPane
                     .showInternalMessageDialog(
                             Desktop.desktop,
-                            "Out of memory loading file "
-                                    + file
-                                    + "!!"
-                                    + "\nSee help files for increasing Java Virtual Machine memory.",
-                            "Out of memory",
+                            MessageManager.formatMessage("warn.out_of_memory_loading_file", new String[]{file}),
+                            MessageManager.getString("label.out_of_memory"),
                             javax.swing.JOptionPane.WARNING_MESSAGE);
           }
         });
index d20b468..4b8caec 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.io;
 
+import jalview.util.MessageManager;
+
 import java.io.*;
 import java.net.*;
 import java.util.zip.GZIPInputStream;
@@ -94,8 +96,7 @@ public class FileParse
   {
     if (from == null)
     {
-      throw new Error(
-              "Implementation error. Null FileParse in copy constructor");
+      throw new Error(MessageManager.getString("error.implementation_error_null_fileparse"));
     }
     if (from == this)
       return;
@@ -208,7 +209,7 @@ public class FileParse
     {
       if (e != null)
       {
-        throw new IOException("Failed to resolve GZIP stream", e);
+        throw new IOException(MessageManager.getString("exception.failed_to_resolve_gzip_stream"), e);
       }
       throw q;
     }
@@ -263,14 +264,12 @@ public class FileParse
         {
           if (checkFileSource(suffixLess))
           {
-            throw new IOException("Problem opening " + inFile
-                    + " (also tried " + suffixLess + ") : " + errormessage);
+            throw new IOException(MessageManager.formatMessage("exception.problem_opening_file_also_tried", new String[]{inFile.getName(),suffixLess,errormessage}));
           }
         }
         else
         {
-          throw new IOException("Problem opening " + inFile + " : "
-                  + errormessage);
+          throw new IOException(MessageManager.formatMessage("exception.problem_opening_file", new String[]{inFile.getName(),errormessage}));
         }
       }
     }
@@ -345,8 +344,7 @@ public class FileParse
     if (dataIn == null || error)
     {
       // pass up the reason why we have no source to read from
-      throw new IOException("Failed to read data from source:\n"
-              + errormessage);
+      throw new IOException(MessageManager.formatMessage("exception.failed_to_read_data_from_source", new String[]{errormessage}));
     }
     error = false;
     dataIn.mark(READAHEAD_LIMIT);
@@ -366,7 +364,7 @@ public class FileParse
     }
     else
     {
-      throw new IOException("Unitialised Source Stream");
+      throw new IOException(MessageManager.getString("exception.no_init_source_stream"));
     }
   }
 
@@ -374,7 +372,7 @@ public class FileParse
   {
     if (!error)
       return dataIn.readLine();
-    throw new IOException("Invalid Source Stream:" + errormessage);
+    throw new IOException(MessageManager.formatMessage("exception.invalid_source_stream", new String[]{errormessage}));
   }
 
   public boolean isValid()
@@ -406,8 +404,7 @@ public class FileParse
     }
     else
     {
-      throw new IOException(
-              "Implementation Error: Reset called for invalid source.");
+      throw new IOException(MessageManager.getString("error.implementation_error_reset_called_for_invalid_source"));
     }
   }
 
index ac7f5b3..50b07e4 100755 (executable)
@@ -53,7 +53,7 @@ public class HTMLOutput
             { "HTML files" }, "HTML files");
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save as HTML");
+    chooser.setDialogTitle(MessageManager.getString("label.save_as_html"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(null);
index 0b3cd13..ca74f2c 100755 (executable)
@@ -29,6 +29,7 @@ import java.io.*;
 import java.util.*;
 
 import jalview.datamodel.*;
+import jalview.util.MessageManager;
 
 /**
  * Parser for the JPred/JNet concise format. This is a series of CSV lines, each
@@ -293,9 +294,7 @@ public class JPredFile extends AlignFile
 
       if (maxLength != seq_entries.elementAt(i).toString().length())
       {
-        throw new IOException("JPredConcise: Entry ("
-                + ids.elementAt(i).toString()
-                + ") has an unexpected number of columns");
+        throw new IOException(MessageManager.formatMessage("exception.jpredconcide_entry_has_unexpected_number_of_columns", new String[]{ids.elementAt(i).toString()}));
       }
 
       if ((newSeq.getName().startsWith("QUERY") || newSeq.getName()
@@ -319,9 +318,7 @@ public class JPredFile extends AlignFile
       } catch (Exception e)
       {
         tal = null;
-        IOException ex = new IOException(
-                "Couldn't parse concise annotation for prediction profile.\n"
-                        + e);
+        IOException ex = new IOException(MessageManager.formatMessage("exception.couldnt_parse_concise_annotation_for_prediction", new String[]{e.getMessage()}));
         e.printStackTrace(); // java 1.1 does not have :
                              // ex.setStackTrace(e.getStackTrace());
         throw ex;
index 90e3229..470fd89 100755 (executable)
@@ -271,7 +271,7 @@ public class JalviewFileChooser extends JFileChooser
         }
       });
 
-      this.setBorder(new javax.swing.border.TitledBorder("Recently Opened"));
+      this.setBorder(new javax.swing.border.TitledBorder(MessageManager.getString("label.recently_opened")));
 
       final JScrollPane scroller = new JScrollPane(list);
       scroller.setPreferredSize(new Dimension(130, 200));
index dabd8ca..5c95a3f 100755 (executable)
@@ -21,6 +21,7 @@
 package jalview.io;
 
 import jalview.datamodel.*;
+import jalview.util.MessageManager;
 
 public class JnetAnnotationMaker
 {
@@ -60,13 +61,12 @@ public class JnetAnnotationMaker
     if ((delMap != null && delMap.length > width)
             || (delMap == null && gapmap.length != width))
     {
-      throw (new Exception("Number of residues in "
-              + (delMap == null ? "" : " mapped ")
-              + "supposed query sequence ('"
-              + al.getSequenceAt(firstSeq).getName() + "'\n"
-              + al.getSequenceAt(firstSeq).getSequenceAsString()
-              + ")\ndiffer from number of prediction sites in prediction ("
-              + width + ")"));
+      throw (new Exception(MessageManager.formatMessage("exception.number_of_residues_in_query_sequence_differ_from_prediction", new String[]{
+                 (delMap == null ? "" : MessageManager.getString("label.mapped")),
+                 al.getSequenceAt(firstSeq).getName(),
+                 al.getSequenceAt(firstSeq).getSequenceAsString(),
+                 Integer.valueOf(width).toString()
+      })));
     }
 
     AlignmentAnnotation annot;
index 9c91c13..f2a29ea 100755 (executable)
@@ -30,6 +30,7 @@ import java.io.*;
 import java.util.StringTokenizer;
 
 import jalview.datamodel.*;
+import jalview.util.MessageManager;
 
 /**
  * Parse a new hanpshire style tree Caveats: NHX files are NOT supported and the
@@ -611,11 +612,11 @@ public class NewickFile extends FileParse
 
     if (Error != null)
     {
-      throw (new IOException("NewickFile: " + Error + "\n"));
+      throw (new IOException(MessageManager.formatMessage("exception.newfile", new String[]{Error.toString()})));
     }
     if (root == null)
     {
-      throw (new IOException("NewickFile: No Tree read in\n"));
+        throw (new IOException(MessageManager.formatMessage("exception.newfile", new String[]{MessageManager.getString("label.no_tree_read_in")})));
     }
     // THe next line is failing for topali trees - not sure why yet. if
     // (root.right()!=null && root.isDummy())
index 361b47f..7d4baa2 100755 (executable)
@@ -100,7 +100,7 @@ public class PfamFile extends AlignFile
 
     if (noSeqs < 1)
     {
-      throw new IOException("No sequences found (PFAM input)");
+      throw new IOException(MessageManager.getString("exception.pfam_no_sequences_found"));
     }
 
     for (i = 0; i < headers.size(); i++)
index 2b9a7b0..d366edc 100644 (file)
@@ -31,6 +31,7 @@ import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Annotation;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
 
 import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;
 import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed;
@@ -97,24 +98,21 @@ public class RnamlFile extends AlignFile
       _parse();
     } catch (ExceptionPermissionDenied pdx)
     {
-      errormessage = "Couldn't access datasource (" + pdx.getMessage()
-              + ")";
+      errormessage = MessageManager.formatMessage("exception.rnaml_couldnt_access_datasource", new String[]{pdx.getMessage()});
       throw new IOException(pdx);
     } catch (ExceptionLoadingFailed lf)
     {
-      errormessage = "Couldn't process data as RNAML file ("
-              + lf.getMessage() + ")";
+      errormessage = MessageManager.formatMessage("exception.ranml_couldnt_process_data", new String[]{lf.getMessage()});
       throw new IOException(lf);
     } catch (ExceptionFileFormatOrSyntax iff)
     {
-      errormessage = "Invalid RNAML file (" + iff.getMessage() + ")";
+        errormessage = MessageManager.formatMessage("exception.ranml_invalid_file", new String[]{iff.getMessage()});
       throw new IOException(iff);
     } catch (Exception x)
     {
       error = true;
-      errormessage = "Problem parsing data as RNAML (" + x.getMessage()
-              + ")";
-      throw new IOException("Couldn't parse the datasource as RNAML", x);
+      errormessage = MessageManager.formatMessage("exception.ranml_problem_parsing_data", new String[]{x.getMessage()});
+      throw new IOException(errormessage , x);
     }
   }
 
index 9d21a40..0a18be0 100644 (file)
@@ -33,6 +33,7 @@ import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.util.Format;
+import jalview.util.MessageManager;
 
 import java.io.BufferedReader;
 import java.io.FileReader;
@@ -197,8 +198,7 @@ public class StockholmFile extends AlignFile
     r = new Regex("# STOCKHOLM ([\\d\\.]+)");
     if (!r.search(nextLine()))
     {
-      throw new IOException(
-              "This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'");
+      throw new IOException(MessageManager.getString("exception.stockholm_invalid_format"));
     }
     else
     {
@@ -416,7 +416,7 @@ public class StockholmFile extends AlignFile
         if (!x.search(line))
         {
           // logger.error("Could not parse sequence line: " + line);
-          throw new IOException("Could not parse sequence line: " + line);
+          throw new IOException(MessageManager.formatMessage("exception.couldnt_parse_sequence_line", new String[]{line}));
         }
         String ns = (String) seqs.get(x.stringMatched(1));
         if (ns == null)
@@ -528,7 +528,7 @@ public class StockholmFile extends AlignFile
           }
           else
           {
-            throw new IOException("Error parsing " + line);
+            throw new IOException(MessageManager.formatMessage("exception.error_parsing_line", new String[]{line}));
           }
         }
         else if (annType.equals("GC"))
@@ -653,8 +653,7 @@ public class StockholmFile extends AlignFile
         }
         else
         {
-          throw new IOException("Unknown annotation detected: " + annType
-                  + " " + annContent);
+          throw new IOException(MessageManager.formatMessage("exception.unknown_annotation_detected", new String[]{annType,annContent}));
         }
       }
     }
index 6472dd3..6293a1b 100644 (file)
@@ -33,6 +33,8 @@ import jalview.io.vamsas.Datasetsequence;
 import jalview.io.vamsas.DatastoreItem;
 import jalview.io.vamsas.DatastoreRegistry;
 import jalview.io.vamsas.Rangetype;
+import jalview.util.MessageManager;
+
 import java.io.IOException;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -222,8 +224,7 @@ public class VamsasAppDatastore
     {
       Cache.log.debug(
               "Warning? Overwriting existing vamsas id binding for "
-                      + vobj.getVorbaId(), new Exception(
-                      "Overwriting vamsas id binding."));
+                      + vobj.getVorbaId(), new Exception(MessageManager.getString("exception.overwriting_vamsas_id_binding")));
     }
     else if (jv2vobj.containsKey(jvobj)
             && !((VorbaId) jv2vobj.get(jvobj)).equals(vobj.getVorbaId()))
@@ -310,8 +311,7 @@ public class VamsasAppDatastore
                 if (vbound.getV_parent() != null
                         && dataset != vbound.getV_parent())
                 {
-                  throw new Error(
-                          "IMPLEMENTATION ERROR: Cannot map an alignment of sequences from different datasets into a single alignment in the vamsas document.");
+                  throw new Error(MessageManager.getString("error.implementation_error_cannot_map_alignment_sequences"));
                   // This occurs because the dataset for the alignment we are
                   // trying to
                 }
@@ -1473,9 +1473,7 @@ public class VamsasAppDatastore
     {
       // NOTE: this happens if user deletes object in one session then updates
       // from another client
-      throw new Error(
-              "IMPLEMENTATION ERROR: old jalview object is not bound ! ("
-                      + oldjvobject + ")");
+      throw new Error(MessageManager.formatMessage("error.implementation_error_old_jalview_object_not_bound", new String[]{oldjvobject.toString()}));
     }
     if (newjvobject != null)
     {
@@ -2417,8 +2415,7 @@ public class VamsasAppDatastore
       int[] se = null;
       if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
       {
-        throw new Error(
-                "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+        throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
       }
       if (dseta.getSegCount() > 0)
       {
@@ -2476,8 +2473,7 @@ public class VamsasAppDatastore
       int[] se = null;
       if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
       {
-        throw new Error(
-                "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+          throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
       }
       if (dseta.getSegCount() > 0)
       {
@@ -2733,8 +2729,7 @@ public class VamsasAppDatastore
       }
     } catch (Exception e)
     {
-      throw new Exception("Couldn't store sequence mappings for " + title,
-              e);
+      throw new Exception(MessageManager.formatMessage("exception.couldnt_store_sequence_mappings", new String[]{title}),e);
     }
   }
 
index cc5fbed..871c6d5 100755 (executable)
@@ -208,8 +208,7 @@ public class WSWUBlastClient
           imageIndex++;
           imageIndex %= 9;
           output.setFrameIcon(imageIcon[imageIndex]);
-          output.setTitle("BLASTing for unidentified sequences - "
-                  + jobsRunning + " jobs running.");
+          output.setTitle(MessageManager.formatMessage("label.blasting_for_unidentified_sequence_jobs_running", new String[]{jobsRunning}));
         } catch (Exception ex)
         {
         }
index 74c5bd1..2a070e8 100644 (file)
@@ -22,6 +22,7 @@ package jalview.io.vamsas;
 
 import jalview.bin.Cache;
 import jalview.io.VamsasAppDatastore;
+import jalview.util.MessageManager;
 
 import java.util.Enumeration;
 import java.util.Hashtable;
@@ -131,16 +132,14 @@ public abstract class DatastoreItem
     {
       Cache.log.debug(
               "Warning? Overwriting existing vamsas id binding for "
-                      + vobj.getVorbaId(), new Exception(
-                      "Overwriting vamsas id binding."));
+                      + vobj.getVorbaId(), new Exception(MessageManager.getString("exception.overwriting_vamsas_id_binding")));
     }
     else if (jv2vobj.containsKey(jvobj)
             && !((VorbaId) jv2vobj.get(jvobj)).equals(vobj.getVorbaId()))
     {
       Cache.log.debug(
               "Warning? Overwriting existing jalview object binding for "
-                      + jvobj, new Exception(
-                      "Overwriting jalview object binding."));
+                      + jvobj, new Exception(MessageManager.getString("exception.overwriting_jalview_id_binding")));
     }
     /*
      * Cache.log.error("Attempt to make conflicting object binding! "+vobj+" id "
@@ -190,9 +189,7 @@ public abstract class DatastoreItem
     Object vobject = jv2vobj.remove(oldjvobject);
     if (vobject == null)
     {
-      throw new Error(
-              "IMPLEMENTATION ERROR: old jalview object is not bound ! ("
-                      + oldjvobject + ")");
+      throw new Error(MessageManager.formatMessage("error.implementation_error_old_jalview_object_not_bound", new String[]{oldjvobject.toString()}));
     }
     if (newjvobject != null)
     {
@@ -231,9 +228,8 @@ public abstract class DatastoreItem
     tojalview = true;
     if (jvobj != null && !(boundType.isAssignableFrom(jvobj.getClass())))
     {
-      throw new Error("Implementation Error: Vamsas Document Class "
-              + vobj.getClass() + " should bind to a " + boundType
-              + " (found a " + jvobj.getClass() + ")");
+      throw new Error(MessageManager.formatMessage("error.implementation_error_vamsas_doc_class_should_bind_to_type"
+                       , new String[]{vobj.getClass().toString(),boundType.toString(),jvobj.getClass().toString()}));
     }
     dsReg.registerDsObj(this);
   }
@@ -259,9 +255,8 @@ public abstract class DatastoreItem
     vobj = getjv2vObj(jvobj);
     if (vobj != null && !(boundToType.isAssignableFrom(vobj.getClass())))
     {
-      throw new Error("Implementation Error: Jalview Class "
-              + jvobj2.getClass() + " should bind to a " + boundToType
-              + " (found a " + vobj.getClass() + ")");
+        throw new Error(MessageManager.formatMessage("error.implementation_error_vamsas_doc_class_should_bind_to_type"
+                       , new String[]{jvobj2.getClass().toString(),boundToType.toString(),vobj.getClass().toString()}));
     }
     dsReg.registerDsObj(this);
   }
index a2b5ff4..3cc977f 100644 (file)
@@ -29,6 +29,7 @@ import uk.ac.vamsas.objects.core.Mapped;
 import uk.ac.vamsas.objects.core.RangeType;
 import uk.ac.vamsas.objects.core.Seg;
 import jalview.io.VamsasAppDatastore;
+import jalview.util.MessageManager;
 
 /**
  * Enhances DatastoreItem objects with additional functions to do with RangeType
@@ -75,8 +76,7 @@ public abstract class Rangetype extends DatastoreItem
       int[] se = null;
       if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
       {
-        throw new Error(
-                "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+        throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
       }
       if (dseta.getSegCount() > 0)
       {
@@ -134,8 +134,7 @@ public abstract class Rangetype extends DatastoreItem
       int[] se = null;
       if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
       {
-        throw new Error(
-                "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+        throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
       }
       if (dseta.getSegCount() > 0)
       {
@@ -182,8 +181,7 @@ public abstract class Rangetype extends DatastoreItem
       int[] se = null;
       if (range.getSegCount() > 0 && range.getPosCount() > 0)
       {
-        throw new Error(
-                "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+        throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
       }
       if (range.getSegCount() > 0)
       {
@@ -299,8 +297,7 @@ public abstract class Rangetype extends DatastoreItem
   {
     if (ml == null)
     {
-      throw new Error(
-              "Implementation error. MapList is null for initMapType.");
+      throw new Error(MessageManager.getString("error.implementation_error_maplist_is_null"));
     }
     maprange.setLocal(new Local());
     maprange.setMapped(new Mapped());
index d3154c7..e122f21 100755 (executable)
@@ -799,7 +799,7 @@ public class GAlignFrame extends JInternalFrame
       }
     });
     removeRedundancyMenuItem.setText(MessageManager
-            .getString("action.remove_redundancy"));
+            .getString("action.remove_redundancy").concat("..."));
     removeRedundancyMenuItem.setAccelerator(javax.swing.KeyStroke
             .getKeyStroke(java.awt.event.KeyEvent.VK_D, Toolkit
                     .getDefaultToolkit().getMenuShortcutKeyMask(), false));
index ca0f5ee..3e6f91a 100755 (executable)
@@ -121,8 +121,8 @@ public class GSequenceLink extends Panel
     JOptionPane
             .showInternalMessageDialog(
                     jalview.gui.Desktop.desktop,
-                    "Sequence URL must contain $SEQUENCE_ID$ or a regex $SEQUENCE_ID=/<regex>/=$",
-                    "URL not valid", JOptionPane.WARNING_MESSAGE);
+                    MessageManager.getString("warn.url_must_contain"),
+                    MessageManager.getString("label.invalid_url"), JOptionPane.WARNING_MESSAGE);
     return false;
   }
 
index 036d16a..acd83a8 100755 (executable)
@@ -403,8 +403,7 @@ public class Matrix
 
           if (iter == maxIter)
           {
-            throw new Exception("Too many iterations in tqli (" + maxIter
-                    + ")");
+            throw new Exception(MessageManager.formatMessage("exception.matrix_too_many_iteration", new String[]{"tqli", Integer.valueOf(maxIter).toString()}));
           }
           else
           {
@@ -653,8 +652,7 @@ public class Matrix
 
           if (iter == maxIter)
           {
-            throw new Exception("Too many iterations in tqli2 (max is "
-                    + maxIter + ")");
+              throw new Exception(MessageManager.formatMessage("exception.matrix_too_many_iteration", new String[]{"tqli2", Integer.valueOf(maxIter).toString()}));
           }
           else
           {
index a0e1ea1..c7d2f17 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -159,9 +161,11 @@ public class AlcodonFrame implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodMapList.size())
     {
-      throw new IndexOutOfBoundsException("getAlcodMap: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodMapList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getAlcodMap",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._alcodMapList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.AlcodMap) _alcodMapList
@@ -209,9 +213,11 @@ public class AlcodonFrame implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodonList.size())
     {
-      throw new IndexOutOfBoundsException("getAlcodon: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getAlcodon",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._alcodonList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index);
@@ -378,9 +384,11 @@ public class AlcodonFrame implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodMapList.size())
     {
-      throw new IndexOutOfBoundsException("setAlcodMap: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodMapList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setAlcodMap",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._alcodonList.size() - 1)).toString()
+          })); 
     }
 
     this._alcodMapList.set(index, vAlcodMap);
@@ -418,9 +426,11 @@ public class AlcodonFrame implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodonList.size())
     {
-      throw new IndexOutOfBoundsException("setAlcodon: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setAlcodon",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._alcodonList.size() - 1)).toString()
+        })); 
     }
 
     this._alcodonList.set(index, vAlcodon);
index f5cd880..0741387 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -373,10 +375,11 @@ public class Annotation implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationElementList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "getAnnotationElement: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._annotationElementList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getAnnotationElement",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList
@@ -935,10 +938,11 @@ public class Annotation implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationElementList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "setAnnotationElement: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._annotationElementList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setAnnotationElement",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+        })); 
     }
 
     this._annotationElementList.set(index, vAnnotationElement);
index 3bc1a9e..bbc5f67 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -224,9 +226,11 @@ public class Feature implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._otherDataList.size())
     {
-      throw new IndexOutOfBoundsException("getOtherData: Index value '"
-              + index + "' not in range [0.."
-              + (this._otherDataList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getOtherData",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._otherDataList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.OtherData) _otherDataList
@@ -467,9 +471,11 @@ public class Feature implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._otherDataList.size())
     {
-      throw new IndexOutOfBoundsException("setOtherData: Index value '"
-              + index + "' not in range [0.."
-              + (this._otherDataList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setOtherData",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._otherDataList.size() - 1)).toString()
+        })); 
     }
 
     this._otherDataList.set(index, vOtherData);
index 8c40929..14d9844 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -158,8 +160,11 @@ public class FeatureSettings implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._groupList.size())
     {
-      throw new IndexOutOfBoundsException("getGroup: Index value '" + index
-              + "' not in range [0.." + (this._groupList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getGroup",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._groupList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.Group) _groupList.get(index);
@@ -206,9 +211,11 @@ public class FeatureSettings implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._settingList.size())
     {
-      throw new IndexOutOfBoundsException("getSetting: Index value '"
-              + index + "' not in range [0.."
-              + (this._settingList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getSetting",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._settingList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.Setting) _settingList.get(index);
@@ -374,8 +381,11 @@ public class FeatureSettings implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._groupList.size())
     {
-      throw new IndexOutOfBoundsException("setGroup: Index value '" + index
-              + "' not in range [0.." + (this._groupList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setGroup",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._groupList.size() - 1)).toString()
+          })); 
     }
 
     this._groupList.set(index, vGroup);
@@ -413,9 +423,11 @@ public class FeatureSettings implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._settingList.size())
     {
-      throw new IndexOutOfBoundsException("setSetting: Index value '"
-              + index + "' not in range [0.."
-              + (this._settingList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setSetting",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._settingList.size() - 1)).toString()
+        })); 
     }
 
     this._settingList.set(index, vSetting);
index b909250..3a8dab2 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -535,8 +537,11 @@ public class JGroup implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._seqList.size())
     {
-      throw new IndexOutOfBoundsException("getSeq: Index value '" + index
-              + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getSeq",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._seqList.size() - 1)).toString()
+          })); 
     }
 
     return (java.lang.String) _seqList.get(index);
@@ -1131,8 +1136,11 @@ public class JGroup implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._seqList.size())
     {
-      throw new IndexOutOfBoundsException("setSeq: Index value '" + index
-              + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setSeq",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._seqList.size() - 1)).toString()
+        })); 
     }
 
     this._seqList.set(index, vSeq);
index 52aed9a..31a128e 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -296,9 +298,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._featuresList.size())
     {
-      throw new IndexOutOfBoundsException("getFeatures: Index value '"
-              + index + "' not in range [0.."
-              + (this._featuresList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getFeatures",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._featuresList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.Features) _featuresList
@@ -355,10 +359,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._hiddenSequencesList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "getHiddenSequences: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._hiddenSequencesList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getHiddenSequences",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._hiddenSequencesList.size() - 1)).toString()
+        })); 
     }
 
     return ((java.lang.Integer) _hiddenSequencesList.get(index)).intValue();
@@ -417,9 +422,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._pdbidsList.size())
     {
-      throw new IndexOutOfBoundsException("getPdbids: Index value '"
-              + index + "' not in range [0.."
-              + (this._pdbidsList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getPdbids",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._pdbidsList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.Pdbids) _pdbidsList.get(index);
@@ -702,9 +709,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._featuresList.size())
     {
-      throw new IndexOutOfBoundsException("setFeatures: Index value '"
-              + index + "' not in range [0.."
-              + (this._featuresList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setFeatures",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._featuresList.size() - 1)).toString()
+        })); 
     }
 
     this._featuresList.set(index, vFeatures);
@@ -753,10 +762,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._hiddenSequencesList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "setHiddenSequences: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._hiddenSequencesList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setHiddenSequences",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._hiddenSequencesList.size() - 1)).toString()
+          })); 
     }
 
     this._hiddenSequencesList.set(index, new java.lang.Integer(
@@ -806,9 +816,11 @@ public class JSeq implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._pdbidsList.size())
     {
-      throw new IndexOutOfBoundsException("setPdbids: Index value '"
-              + index + "' not in range [0.."
-              + (this._pdbidsList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setPdbids",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._pdbidsList.size() - 1)).toString()
+        })); 
     }
 
     this._pdbidsList.set(index, vPdbids);
index b40ab80..790a1ca 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -309,9 +311,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._JGroupList.size())
     {
-      throw new IndexOutOfBoundsException("getJGroup: Index value '"
-              + index + "' not in range [0.."
-              + (this._JGroupList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getJGroup",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._JGroupList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.JGroup) _JGroupList.get(index);
@@ -358,8 +362,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._JSeqList.size())
     {
-      throw new IndexOutOfBoundsException("getJSeq: Index value '" + index
-              + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getJSeq",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._JSeqList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.JSeq) _JSeqList.get(index);
@@ -406,8 +413,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("getTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getJgetTreeSeq",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._treeList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.Tree) _treeList.get(index);
@@ -454,9 +464,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._userColoursList.size())
     {
-      throw new IndexOutOfBoundsException("getUserColours: Index value '"
-              + index + "' not in range [0.."
-              + (this._userColoursList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getUserColours",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._userColoursList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.UserColours) _userColoursList
@@ -504,9 +516,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._viewportList.size())
     {
-      throw new IndexOutOfBoundsException("getViewport: Index value '"
-              + index + "' not in range [0.."
-              + (this._viewportList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getViewport",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._viewportList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.Viewport) _viewportList
@@ -781,9 +795,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._JGroupList.size())
     {
-      throw new IndexOutOfBoundsException("setJGroup: Index value '"
-              + index + "' not in range [0.."
-              + (this._JGroupList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setJGroup",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._JGroupList.size() - 1)).toString()
+        })); 
     }
 
     this._JGroupList.set(index, vJGroup);
@@ -821,8 +837,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._JSeqList.size())
     {
-      throw new IndexOutOfBoundsException("setJSeq: Index value '" + index
-              + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setJSeq",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._JSeqList.size() - 1)).toString()
+          })); 
     }
 
     this._JSeqList.set(index, vJSeq);
@@ -859,8 +878,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("setTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setTree",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._treeList.size() - 1)).toString()
+        })); 
     }
 
     this._treeList.set(index, vTree);
@@ -897,9 +919,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._userColoursList.size())
     {
-      throw new IndexOutOfBoundsException("setUserColours: Index value '"
-              + index + "' not in range [0.."
-              + (this._userColoursList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setUserColours",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._userColoursList.size() - 1)).toString()
+          })); 
     }
 
     this._userColoursList.set(index, vUserColours);
@@ -937,9 +961,11 @@ public class JalviewModelSequence implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._viewportList.size())
     {
-      throw new IndexOutOfBoundsException("setViewport: Index value '"
-              + index + "' not in range [0.."
-              + (this._viewportList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setViewport",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._viewportList.size() - 1)).toString()
+        })); 
     }
 
     this._viewportList.set(index, vViewport);
index 49f428a..e6ced25 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -120,9 +122,11 @@ public class JalviewUserColours implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._colourList.size())
     {
-      throw new IndexOutOfBoundsException("getColour: Index value '"
-              + index + "' not in range [0.."
-              + (this._colourList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getColour",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._colourList.size() - 1)).toString()
+          })); 
     }
 
     return (Colour) _colourList.get(index);
@@ -274,9 +278,11 @@ public class JalviewUserColours implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._colourList.size())
     {
-      throw new IndexOutOfBoundsException("setColour: Index value '"
-              + index + "' not in range [0.."
-              + (this._colourList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setColour",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._colourList.size() - 1)).toString()
+        })); 
     }
 
     this._colourList.set(index, vColour);
index a43e797..32e8ce2 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -220,9 +222,11 @@ public class MapListType implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._mapListFromList.size())
     {
-      throw new IndexOutOfBoundsException("getMapListFrom: Index value '"
-              + index + "' not in range [0.."
-              + (this._mapListFromList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getMapListFrom",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._mapListFromList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.MapListFrom) _mapListFromList
@@ -270,9 +274,11 @@ public class MapListType implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._mapListToList.size())
     {
-      throw new IndexOutOfBoundsException("getMapListTo: Index value '"
-              + index + "' not in range [0.."
-              + (this._mapListToList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getMapListTo",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._mapListToList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.MapListTo) _mapListToList
@@ -492,9 +498,11 @@ public class MapListType implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._mapListFromList.size())
     {
-      throw new IndexOutOfBoundsException("setMapListFrom: Index value '"
-              + index + "' not in range [0.."
-              + (this._mapListFromList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setMapListFrom",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._mapListFromList.size() - 1)).toString()
+          })); 
     }
 
     this._mapListFromList.set(index, vMapListFrom);
@@ -532,9 +540,11 @@ public class MapListType implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._mapListToList.size())
     {
-      throw new IndexOutOfBoundsException("setMapListTo: Index value '"
-              + index + "' not in range [0.."
-              + (this._mapListToList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setMapListTo",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._mapListToList.size() - 1)).toString()
+        })); 
     }
 
     this._mapListToList.set(index, vMapListTo);
index 8644745..a558e12 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -148,9 +150,11 @@ public class Pdbentry implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._items.size())
     {
-      throw new IndexOutOfBoundsException("getPdbentryItem: Index value '"
-              + index + "' not in range [0.." + (this._items.size() - 1)
-              + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getPdbentryItem",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._items.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.PdbentryItem) _items.get(index);
@@ -316,9 +320,11 @@ public class Pdbentry implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._items.size())
     {
-      throw new IndexOutOfBoundsException("setPdbentryItem: Index value '"
-              + index + "' not in range [0.." + (this._items.size() - 1)
-              + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setPdbentryItem",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._items.size() - 1)).toString()
+        })); 
     }
 
     this._items.set(index, vPdbentryItem);
index 20bbac8..b1bbf11 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.schemabinding.version2;
 
+import jalview.util.MessageManager;
+
 /**
  * Class PdbentryItem.
  * 
@@ -106,9 +108,11 @@ public class PdbentryItem implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._propertyList.size())
     {
-      throw new IndexOutOfBoundsException("getProperty: Index value '"
-              + index + "' not in range [0.."
-              + (this._propertyList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getProperty",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._propertyList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.Property) _propertyList
@@ -189,9 +193,11 @@ public class PdbentryItem implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._propertyList.size())
     {
-      throw new IndexOutOfBoundsException("setProperty: Index value '"
-              + index + "' not in range [0.."
-              + (this._propertyList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setProperty",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._propertyList.size() - 1)).toString()
+        })); 
     }
 
     this._propertyList.set(index, vProperty);
index b491cf0..bf700f9 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -115,10 +117,11 @@ public class Pdbids extends jalview.schemabinding.version2.Pdbentry
     // check bounds for index
     if (index < 0 || index >= this._structureStateList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "getStructureState: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._structureStateList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getStructureState",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._structureStateList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.StructureState) _structureStateList
@@ -255,10 +258,11 @@ public class Pdbids extends jalview.schemabinding.version2.Pdbentry
     // check bounds for index
     if (index < 0 || index >= this._structureStateList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "setStructureState: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._structureStateList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setStructureState",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._structureStateList.size() - 1)).toString()
+        })); 
     }
 
     this._structureStateList.set(index, vStructureState);
index 4ada896..54f2e30 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -120,8 +122,11 @@ public class Sequence extends jalview.schemabinding.version2.SequenceType
     // check bounds for index
     if (index < 0 || index >= this._DBRefList.size())
     {
-      throw new IndexOutOfBoundsException("getDBRef: Index value '" + index
-              + "' not in range [0.." + (this._DBRefList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getDBRef",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._DBRefList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.DBRef) _DBRefList.get(index);
@@ -267,8 +272,11 @@ public class Sequence extends jalview.schemabinding.version2.SequenceType
     // check bounds for index
     if (index < 0 || index >= this._DBRefList.size())
     {
-      throw new IndexOutOfBoundsException("setDBRef: Index value '" + index
-              + "' not in range [0.." + (this._DBRefList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setDBRef",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._DBRefList.size() - 1)).toString()
+        })); 
     }
 
     this._DBRefList.set(index, vDBRef);
index fe146fa..d058ad5 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -264,9 +266,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodonFrameList.size())
     {
-      throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonFrameList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getAlcodonFrame",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._alcodonFrameList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList
@@ -314,9 +318,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationList.size())
     {
-      throw new IndexOutOfBoundsException("getAnnotation: Index value '"
-              + index + "' not in range [0.."
-              + (this._annotationList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getAnnotation",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._alcodonFrameList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.Annotation) _annotationList
@@ -387,9 +393,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceList.size())
     {
-      throw new IndexOutOfBoundsException("getSequence: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getSequence",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.Sequence) _sequenceList
@@ -438,10 +446,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceSetPropertiesList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "getSequenceSetProperties: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._sequenceSetPropertiesList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getSequenceSetProperties",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._sequenceSetPropertiesList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList
@@ -677,9 +686,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodonFrameList.size())
     {
-      throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonFrameList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setAlcodonFrame",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._alcodonFrameList.size() - 1)).toString()
+          })); 
     }
 
     this._alcodonFrameList.set(index, vAlcodonFrame);
@@ -717,9 +728,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationList.size())
     {
-      throw new IndexOutOfBoundsException("setAnnotation: Index value '"
-              + index + "' not in range [0.."
-              + (this._annotationList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setAnnotation",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._annotationList.size() - 1)).toString()
+        })); 
     }
 
     this._annotationList.set(index, vAnnotation);
@@ -782,9 +795,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceList.size())
     {
-      throw new IndexOutOfBoundsException("setSequence: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setSequence",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceList.size() - 1)).toString()
+          })); 
     }
 
     this._sequenceList.set(index, vSequence);
@@ -823,10 +838,11 @@ public class SequenceSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceSetPropertiesList.size())
     {
-      throw new IndexOutOfBoundsException(
-              "setSequenceSetProperties: Index value '" + index
-                      + "' not in range [0.."
-                      + (this._sequenceSetPropertiesList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setSequenceSetProperties",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._sequenceSetPropertiesList.size() - 1)).toString()
+        })); 
     }
 
     this._sequenceSetPropertiesList.set(index, vSequenceSetProperties);
index 2a7d463..7f0c216 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -156,9 +158,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceSetList.size())
     {
-      throw new IndexOutOfBoundsException("getSequenceSet: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceSetList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getSequenceSet",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList
@@ -205,8 +209,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("getTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getTree",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._treeList.size() - 1)).toString()
+        })); 
     }
 
     return (java.lang.String) _treeList.get(index);
@@ -370,9 +377,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceSetList.size())
     {
-      throw new IndexOutOfBoundsException("setSequenceSet: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceSetList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setSequenceSet",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+          })); 
     }
 
     this._sequenceSetList.set(index, vSequenceSet);
@@ -409,8 +418,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("setTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setTree",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._treeList.size() - 1)).toString()
+        })); 
     }
 
     this._treeList.set(index, vTree);
index 03bd2a9..1faf480 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -845,9 +847,11 @@ public class Viewport implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._calcIdParamList.size())
     {
-      throw new IndexOutOfBoundsException("getCalcIdParam: Index value '"
-              + index + "' not in range [0.."
-              + (this._calcIdParamList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getCalcIdParam",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._calcIdParamList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.CalcIdParam) _calcIdParamList
@@ -995,9 +999,11 @@ public class Viewport implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._hiddenColumnsList.size())
     {
-      throw new IndexOutOfBoundsException("getHiddenColumns: Index value '"
-              + index + "' not in range [0.."
-              + (this._hiddenColumnsList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getHiddenColumns",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._hiddenColumnsList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList
@@ -2121,9 +2127,11 @@ public class Viewport implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._calcIdParamList.size())
     {
-      throw new IndexOutOfBoundsException("setCalcIdParam: Index value '"
-              + index + "' not in range [0.."
-              + (this._calcIdParamList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setCalcIdParam",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._calcIdParamList.size() - 1)).toString()
+          })); 
     }
 
     this._calcIdParamList.set(index, vCalcIdParam);
@@ -2280,9 +2288,11 @@ public class Viewport implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._hiddenColumnsList.size())
     {
-      throw new IndexOutOfBoundsException("setHiddenColumns: Index value '"
-              + index + "' not in range [0.."
-              + (this._hiddenColumnsList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setHiddenColumns",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._hiddenColumnsList.size() - 1)).toString()
+        })); 
     }
 
     this._hiddenColumnsList.set(index, vHiddenColumns);
index 0cf7c49..822a175 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -183,9 +185,11 @@ public class WebServiceParameterSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._serviceURLList.size())
     {
-      throw new IndexOutOfBoundsException("getServiceURL: Index value '"
-              + index + "' not in range [0.."
-              + (this._serviceURLList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getServiceURL",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._serviceURLList.size() - 1)).toString()
+          })); 
     }
 
     return (java.lang.String) _serviceURLList.get(index);
@@ -373,9 +377,11 @@ public class WebServiceParameterSet implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._serviceURLList.size())
     {
-      throw new IndexOutOfBoundsException("setServiceURL: Index value '"
-              + index + "' not in range [0.."
-              + (this._serviceURLList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setServiceURL",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._serviceURLList.size() - 1)).toString()
+        })); 
     }
 
     this._serviceURLList.set(index, vServiceURL);
index 609e741..47b8fbd 100755 (executable)
@@ -25,6 +25,7 @@ import jalview.analysis.Conservation;
 import jalview.datamodel.AnnotatedCollectionI;
 import jalview.datamodel.SequenceCollectionI;
 import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
 
 import java.awt.Color;
 import java.util.Hashtable;
@@ -323,9 +324,7 @@ public class ResidueColourScheme implements ColourSchemeI
       return getClass().newInstance();
     } catch (Exception q)
     {
-      throw new Error(
-              "Serious implementation error: cannot duplicate colourscheme "
-                      + getClass().getName(), q);
+      throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_duplicate_colour_scheme", new String[]{getClass().getName()}), q);
     }
   }
 }
index c0c559a..73a5905 100644 (file)
@@ -28,6 +28,7 @@ import jalview.analysis.*;
 import jalview.api.AlignmentViewPanel;
 import jalview.api.StructureSelectionManagerProvider;
 import jalview.datamodel.*;
+import jalview.util.MessageManager;
 
 public class StructureSelectionManager
 {
@@ -68,9 +69,8 @@ public class StructureSelectionManager
       {
         if (instances != null)
         {
-          throw new Error(
-                  "Implementation error. Structure selection manager's context is 'null'",
-                  new NullPointerException("SSM context is null"));
+          throw new Error(MessageManager.getString("error.implementation_error_structure_selection_manager_null"),
+                  new NullPointerException(MessageManager.getString("exception.ssm_context_is_null")));
         }
         else
         {
index 9aaa307..871b480 100644 (file)
@@ -223,8 +223,7 @@ public class AWTConsole extends WindowAdapter implements WindowListener,
       } catch (InterruptedException ie)
       {
       }
-      throw new NullPointerException(
-              "Application test: throwing an NullPointerException It should arrive at the console");
+      throw new NullPointerException(MessageManager.getString("exception.application_test_npe"));
     }
 
   }
index a0f9523..60e2fed 100755 (executable)
@@ -702,14 +702,14 @@ public class BrowserLauncher
   {
     if (!loadedWithoutErrors)
     {
-      throw new IOException("Exception in finding browser: " + errorMessage);
+      throw new IOException(MessageManager.formatMessage("exception.browser_not_found", new String[]{errorMessage}));
     }
 
     Object browser = locateBrowser();
 
     if (browser == null)
     {
-      throw new IOException("Unable to locate browser: " + errorMessage);
+        throw new IOException(MessageManager.formatMessage("exception.browser_unable_to_locate", new String[]{errorMessage}));
     }
 
     switch (jvm)
@@ -728,19 +728,13 @@ public class BrowserLauncher
         {});
       } catch (InvocationTargetException ite)
       {
-        throw new IOException(
-                "InvocationTargetException while creating AEDesc: "
-                        + ite.getMessage());
+        throw new IOException(MessageManager.formatMessage("exception.invocation_target_exception_creating_aedesc", new String[]{ite.getMessage()}));
       } catch (IllegalAccessException iae)
       {
-        throw new IOException(
-                "IllegalAccessException while building AppleEvent: "
-                        + iae.getMessage());
+         throw new IOException(MessageManager.formatMessage("exception.illegal_access_building_apple_evt", new String[]{iae.getMessage()}));
       } catch (InstantiationException ie)
       {
-        throw new IOException(
-                "InstantiationException while creating AEDesc: "
-                        + ie.getMessage());
+         throw new IOException(MessageManager.formatMessage("exception.illegal_access_building_apple_evt", new String[]{ie.getMessage()}));
       } finally
       {
         aeDesc = null; // Encourage it to get disposed if it was created
@@ -778,13 +772,12 @@ public class BrowserLauncher
         }
         else
         {
-          throw new IOException("Unable to launch URL: " + result);
+          throw new IOException(MessageManager.formatMessage("exception.unable_to_launch_url", new String[]{Integer.valueOf(result).toString()}));
         }
       }
       else
       {
-        throw new IOException(
-                "Unable to create an Internet Config instance: " + result);
+        throw new IOException(MessageManager.formatMessage("exception.unable_to_create_internet_config", new String[]{Integer.valueOf(result).toString()}));
       }
 
       break;
@@ -797,14 +790,10 @@ public class BrowserLauncher
         { url });
       } catch (InvocationTargetException ite)
       {
-        throw new IOException(
-                "InvocationTargetException while calling openURL: "
-                        + ite.getMessage());
+        throw new IOException(MessageManager.formatMessage("exception.invocation_target_calling_url", new String[]{ite.getMessage()}));
       } catch (IllegalAccessException iae)
       {
-        throw new IOException(
-                "IllegalAccessException while calling openURL: "
-                        + iae.getMessage());
+          throw new IOException(MessageManager.formatMessage("exception.illegal_access_calling_url", new String[]{iae.getMessage()}));
       }
 
       break;
@@ -829,9 +818,7 @@ public class BrowserLauncher
         process.exitValue();
       } catch (InterruptedException ie)
       {
-        throw new IOException(
-                "InterruptedException while launching browser: "
-                        + ie.getMessage());
+          throw new IOException(MessageManager.formatMessage("exception.interrupted_launching_browser", new String[]{ie.getMessage()}));
       }
 
       break;
@@ -870,9 +857,7 @@ public class BrowserLauncher
         }
       } catch (InterruptedException ie)
       {
-        throw new IOException(
-                "InterruptedException while launching browser: "
-                        + ie.getMessage());
+          throw new IOException(MessageManager.formatMessage("exception.interrupted_launching_browser", new String[]{ie.getMessage()}));
       }
 
       break;
index ea3f69f..e8af4cd 100644 (file)
@@ -396,8 +396,7 @@ public class GroupUrlLink
     { dsstring });
     if (idstrings.length != seqstrings.length)
     {
-      throw new Error(
-              "idstrings and seqstrings contain one string each per sequence.");
+      throw new Error(MessageManager.getString("error.idstring_seqstrings_only_one_per_sequence"));
     }
     return rstrings;
   }
@@ -487,18 +486,14 @@ public class GroupUrlLink
         {
           if (maxs != idseq[i].length)
           {
-            throw new Error(
-                    "Cannot have mixed length replacement vectors. Replacement vector for "
-                            + (mtch[i]) + " is " + idseq[i].length
-                            + " strings long, and have already seen a "
-                            + maxs + " length vector.");
+            throw new Error(MessageManager.formatMessage("error.cannot_have_mixed_length_replacement_vectors",
+                               new String[]{(mtch[i]), Integer.valueOf(idseq[i].length).toString(),Integer.valueOf(maxs).toString()}));
           }
         }
       }
       else
       {
-        throw new Error(
-                "Cannot have zero length vector of replacement strings - either 1 value or n values.");
+        throw new Error(MessageManager.getString("error.cannot_have_zero_length_vector_replacement_strings"));
       }
     }
     // iterate through input, collating segments to be inserted into url
index 7ab1781..edb56a9 100644 (file)
@@ -29,6 +29,7 @@ import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.gui.WebserviceInfo;
 import jalview.gui.FeatureRenderer.FeatureRendererSettings;
+import jalview.util.MessageManager;
 
 public abstract class AWSThread extends Thread
 {
@@ -123,8 +124,8 @@ public abstract class AWSThread extends Thread
           } catch (Exception ex)
           {
             // Deal with Transaction exceptions
-            wsInfo.appendProgressText(jobs[j].jobnum, "\n" + WebServiceName
-                    + " Server exception!\n" + ex.getMessage());
+            wsInfo.appendProgressText(jobs[j].jobnum, 
+                       MessageManager.formatMessage("info.server_exception", new String[]{WebServiceName,ex.getMessage()}));
             // always output the exception's stack trace to the log
             Cache.log.warn(WebServiceName + " job(" + jobs[j].jobnum
                     + ") Server exception.");
@@ -189,7 +190,7 @@ public abstract class AWSThread extends Thread
       Cache.log
               .debug("WebServiceJob poll loop finished with no jobs created.");
       wsInfo.setStatus(wsInfo.STATE_STOPPED_ERROR);
-      wsInfo.appendProgressText("No jobs ran.");
+      wsInfo.appendProgressText(MessageManager.getString("info.no_jobs_ran"));
       wsInfo.setFinishedNoResults();
     }
   }
index ebf3a7d..f5789ea 100644 (file)
@@ -283,11 +283,11 @@ public class DBRefFetcher implements Runnable
   {
     if (dbSources == null)
     {
-      throw new Error("Implementation error. Must initialise dbSources");
+      throw new Error(MessageManager.getString("error.implementation_error_must_init_dbsources"));
     }
     running = true;
     long startTime = System.currentTimeMillis();
-    af.setProgressBar("Fetching db refs", startTime);
+    af.setProgressBar(MessageManager.getString("status.fetching_db_refs"), startTime);
     try
     {
       if (Cache.getDefault("DBREFFETCH_USEPICR", false))
index ff715ba..8a7bcbc 100644 (file)
@@ -27,6 +27,7 @@ import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.gui.Desktop;
 import jalview.gui.FeatureSettings;
+import jalview.util.MessageManager;
 import jalview.util.UrlLink;
 import jalview.ws.dbsources.das.api.DasSourceRegistryI;
 import jalview.ws.dbsources.das.api.jalviewSourceI;
@@ -204,9 +205,8 @@ public class DasSequenceFeatureFetcher
         reply = JOptionPane
                 .showInternalConfirmDialog(
                         Desktop.desktop,
-                        "Do you want Jalview to find\n"
-                                + "Uniprot Accession ids for given sequence names?",
-                        "Find Uniprot Accession Ids",
+                        MessageManager.getString("info.you_want_jalview_to_find_uniprot_accessions"),
+                        MessageManager.getString("label.find_uniprot_accession_ids"),
                         JOptionPane.YES_NO_OPTION,
                         JOptionPane.QUESTION_MESSAGE);
       }
@@ -264,7 +264,7 @@ public class DasSequenceFeatureFetcher
     startTime = System.currentTimeMillis();
     if (af != null)
     {
-      af.setProgressBar("Fetching DAS Sequence Features", startTime);
+      af.setProgressBar(MessageManager.getString("status.fetching_das_sequence_features"), startTime);
     }
     if (sourceRegistry == null)
     {
@@ -537,7 +537,7 @@ public class DasSequenceFeatureFetcher
 
     if (af != null)
     {
-      af.setProgressBar("No DAS Sources Active", startTime);
+      af.setProgressBar(MessageManager.getString("status.no_das_sources_active"), startTime);
     }
     if (getFeatSettings() != null)
     {
@@ -567,7 +567,7 @@ public class DasSequenceFeatureFetcher
   {
     if (af != null)
     {
-      af.setProgressBar("DAS Feature Fetching Cancelled", startTime);
+      af.setProgressBar(MessageManager.getString("status.das_feature_fetching_cancelled"), startTime);
     }
     cancelled = true;
   }
@@ -582,7 +582,7 @@ public class DasSequenceFeatureFetcher
     if (!cancelled && af != null)
     {
       // only update the progress bar if we've completed the fetch normally
-      af.setProgressBar("DAS Feature Fetching Complete", startTime);
+      af.setProgressBar(MessageManager.getString("status.das_feature_fetching_complete"), startTime);
     }
 
     if (af != null && af.featureSettings != null)
index d2e55c4..83dae2c 100644 (file)
@@ -376,9 +376,8 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements
       JOptionPane
               .showInternalMessageDialog(
                       Desktop.desktop,
-                      "Unixers: Couldn't find default web browser."
-                              + "\nAdd the full path to your browser in Preferences.",
-                      "Web browser not found", JOptionPane.WARNING_MESSAGE);
+                      MessageManager.getString("label.web_browser_not_found_unix"),
+                      MessageManager.getString("label.web_browser_not_found"), JOptionPane.WARNING_MESSAGE);
 
       ex.printStackTrace();
     }
index ee8eb79..ec5c62d 100644 (file)
@@ -24,6 +24,7 @@ import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
 import jalview.datamodel.xdb.embl.EmblEntry;
+import jalview.util.MessageManager;
 import jalview.ws.ebi.EBIFetchClient;
 
 import java.io.File;
@@ -65,8 +66,7 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
     } catch (Exception e)
     {
       stopQuery();
-      throw new Exception("EBI EMBL XML retrieval failed on "
-              + emprefx.toLowerCase() + ":" + query.trim(), e);
+      throw new Exception(MessageManager.formatMessage("exception.ebiembl_retrieval_failed_on", new String[]{emprefx.toLowerCase(),query.trim()}), e);
     }
     return getEmblSequenceRecords(emprefx, query, reply);
   }
@@ -98,8 +98,7 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
       }
       else
       {
-        result.append("# No EMBL record retrieved for "
-                + emprefx.toLowerCase() + ":" + query.trim());
+        result.append(MessageManager.formatMessage("label.no_embl_record_found", new String[]{emprefx.toLowerCase(),query.trim()}));
       }
     }
     if (efile != null)
@@ -153,8 +152,7 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
     if (seqs != null && seqs.length > 0)
     {
       al = new Alignment(seqs);
-      result.append("# Successfully parsed the " + emprefx
-              + " queries into an Alignment");
+      result.append(MessageManager.formatMessage("label.embl_successfully_parsed", new String[]{emprefx}));
       results = result;
     }
     stopQuery();
index 1c6c015..a352de6 100644 (file)
@@ -37,6 +37,7 @@ import com.stevesoft.pat.Regex;
 
 import jalview.datamodel.AlignmentI;
 import jalview.io.FormatAdapter;
+import jalview.util.MessageManager;
 import jalview.ws.ebi.EBIFetchClient;
 import jalview.ws.seqfetcher.DbSourceProxy;
 
@@ -197,8 +198,7 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy
 
       if (pdbfile == null || pdbfile.getHeight() < 1)
       {
-        throw new Exception("No PDB Records for " + id + " chain "
-                + ((chain == null) ? "' '" : chain));
+        throw new Exception(MessageManager.formatMessage("exception.no_pdb_records_for_chain", new String[]{id, ((chain == null) ? "' '" : chain)}));
       }
 
     } catch (Exception ex) // Problem parsing PDB file
index b9d778b..cb5705e 100644 (file)
@@ -39,6 +39,7 @@ import org.biodas.jdas.schema.sources.VERSION;
 
 import com.stevesoft.pat.Regex;
 
+import jalview.util.MessageManager;
 import jalview.ws.dbsources.das.api.jalviewSourceI;
 import jalview.ws.seqfetcher.*;
 import jalview.bin.Cache;
@@ -100,8 +101,7 @@ public class DasSequenceSource extends DbSourceProxyImpl implements
     if (!(jsrc = new JalviewSource(source, connprops, false))
             .isSequenceSource())
     {
-      throw new Exception("Source " + source.getTitle()
-              + " does not support the sequence command.");
+      throw new Exception(MessageManager.formatMessage("exception.das_source_doesnt_support_sequence_command", new String[]{source.getTitle()}));
     }
     this.tier = 1 + ((jsrc.isLocal() || jsrc.isReferenceSource()) ? 0 : 1);
     this.source = source;
index d260b9e..c994fd5 100644 (file)
@@ -37,6 +37,7 @@ import org.biodas.jdas.schema.sources.PROP;
 import org.biodas.jdas.schema.sources.SOURCE;
 import org.biodas.jdas.schema.sources.VERSION;
 
+import jalview.util.MessageManager;
 import jalview.ws.dbsources.das.api.jalviewSourceI;
 import jalview.ws.seqfetcher.DbSourceProxy;
 
@@ -346,7 +347,7 @@ public class JalviewSource implements jalviewSourceI
         int p = cap.getQueryUri().lastIndexOf(capname);
         if (p < -1)
         {
-          throw new Exception("Invalid das source: " + source.getUri());
+          throw new Exception(MessageManager.formatMessage("exception.invalid_das_source", new String[]{source.getUri()}));
         }
         if (cap.getQueryUri().charAt(p) == '/')
         {
index f5f9190..fe9e28f 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.ws.ebi;
 
+import jalview.util.MessageManager;
+
 import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.File;
@@ -56,7 +58,7 @@ public class EBIFetchClient
   public String[] getSupportedDBs()
   {
     // TODO - implement rest call for dbfetch getSupportedDBs
-    throw new Error("Not yet implemented");
+    throw new Error(MessageManager.getString("error.not_yet_implemented"));
   }
 
   /**
@@ -67,7 +69,7 @@ public class EBIFetchClient
   public String[] getSupportedFormats()
   {
     // TODO - implement rest call for dbfetch getSupportedFormats
-    throw new Error("Not yet implemented");
+    throw new Error(MessageManager.getString("error.not_yet_implemented"));
   }
 
   /**
@@ -78,7 +80,7 @@ public class EBIFetchClient
   public String[] getSupportedStyles()
   {
     // TODO - implement rest call for dbfetch getSupportedStyles
-    throw new Error("Not yet implemented");
+    throw new Error(MessageManager.getString("error.not_yet_implemented"));
   }
 
   public File fetchDataAsFile(String ids, String f, String s)
index 465c5fc..4502b39 100644 (file)
@@ -25,6 +25,7 @@ import jalview.datamodel.AlignmentI;
 import jalview.io.FileParse;
 import jalview.io.FormatAdapter;
 import jalview.io.InputStreamParser;
+import jalview.util.MessageManager;
 
 import java.io.BufferedReader;
 import java.io.FileReader;
@@ -105,8 +106,7 @@ public class Annotate3D
       }
       else
       {
-        throw new IOException(
-                "Unexpected exception when handling RNAML translation of PDB data",
+        throw new IOException(MessageManager.getString("exception.unexpected_handling_rnaml_translation_for_pdb"),
                 x);
       }
     }
index f1d3e43..1a96464 100644 (file)
@@ -144,8 +144,7 @@ public class JPredClient extends WS1Client
     {
       if (!msa && msf.length > 1)
       {
-        throw new Error(
-                "Implementation Error! Multiple single sequence prediction jobs are not yet supported.");
+        throw new Error(MessageManager.getString("error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported"));
       }
 
       String altitle = getPredictionName(WebServiceName) + " for "
@@ -285,7 +284,7 @@ public class JPredClient extends WS1Client
   private WebserviceInfo setWebService()
   {
     WebServiceName = "JNetWS";
-    WebServiceJobTitle = "JNet secondary structure prediction";
+    WebServiceJobTitle = MessageManager.getString("label.jnet_secondary_structure_prediction");
     WebServiceReference = "\"Cuff J. A and Barton G.J (2000) Application of "
             + "multiple sequence alignment profiles to improve protein secondary structure prediction, "
             + "Proteins 40:502-511\".";
index 6531bbf..85969fc 100644 (file)
@@ -140,8 +140,7 @@ class JPredThread extends JWS1Thread implements WSClientI
             if (!jalview.analysis.SeqsetUtils.deuniquify(
                     (Hashtable) SequenceInfo, sqs))
             {
-              throw (new Exception(
-                      "Couldn't recover sequence properties for alignment."));
+              throw (new Exception(MessageManager.getString("exception.couldnt_recover_sequence_properties_for_alignment")));
             }
           }
           FirstSeq = 0;
@@ -153,8 +152,7 @@ class JPredThread extends JWS1Thread implements WSClientI
         }
         else
         {
-          throw (new Exception("Unknown format " + format
-                  + " for file : \n" + result.getAligfile()));
+          throw (new Exception(MessageManager.formatMessage("exception.unknown_format_for_file", new String[]{format,result.getAligfile()})));
         }
       }
       else
@@ -168,14 +166,13 @@ class JPredThread extends JWS1Thread implements WSClientI
                   .getAlignmentAndColumnSelection(gc))[0];
           if (this.msaIndex >= sqs.length)
           {
-            throw new Error(
-                    "Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object!");
+            throw new Error(MessageManager.getString("error.implementation_error_invalid_msa_index_for_job"));
           }
 
           // ///
           // Uses RemoveGapsCommand
           // ///
-          new jalview.commands.RemoveGapsCommand("Remove Gaps",
+          new jalview.commands.RemoveGapsCommand(MessageManager.getString("label.remove_gaps"),
                   new SequenceI[]
                   { sqs[msaIndex] }, currentView);
 
@@ -186,8 +183,7 @@ class JPredThread extends JWS1Thread implements WSClientI
         if (!jalview.analysis.SeqsetUtils.SeqCharacterUnhash(
                 al.getSequenceAt(FirstSeq), SequenceInfo))
         {
-          throw (new Exception(
-                  "Couldn't recover sequence properties for JNet Query sequence!"));
+          throw (new Exception(MessageManager.getString("exception.couldnt_recover_sequence_props_for_jnet_query")));
         }
         else
         {
@@ -357,9 +353,7 @@ class JPredThread extends JWS1Thread implements WSClientI
   {
     if (!(j instanceof JPredJob))
     {
-      throw new Error(
-              "Implementation error - StartJob(JpredJob) called on "
-                      + j.getClass());
+      throw new Error(MessageManager.formatMessage("error.implementation_error_startjob_called", new String[]{j.getClass().toString()}));
     }
     try
     {
@@ -380,7 +374,7 @@ class JPredThread extends JWS1Thread implements WSClientI
         {
           job.result = (vamsas.objects.simple.Result) new JpredResult();
           job.result.setInvalid(true);
-          job.result.setStatus("Submission " + job.getJobId());
+          job.result.setStatus(MessageManager.formatMessage("label.submission_params", new String[]{job.getJobId().toString()}));
           throw new Exception(job.getJobId());
         }
         else
@@ -392,7 +386,7 @@ class JPredThread extends JWS1Thread implements WSClientI
       }
       else
       {
-        throw new Exception("Server timed out - try again later\n");
+        throw new Exception(MessageManager.getString("exception.server_timeout_try_later"));
       }
     } catch (Exception e)
     {
@@ -416,9 +410,7 @@ class JPredThread extends JWS1Thread implements WSClientI
       {
         wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_ERROR);
         // JBPNote - this could be a popup informing the user of the problem.
-        wsInfo.appendProgressText(j.getJobnum(),
-                "Failed to submit the prediction:\n" + e.getMessage()
-                        + wsInfo.getProgressText());
+        wsInfo.appendProgressText(j.getJobnum(), MessageManager.formatMessage("info.failed_to_submit_prediction", new String[]{e.getMessage(),wsInfo.getProgressText()}));
 
         jalview.bin.Cache.log.debug(
                 "Failed Submission of job " + j.getJobnum(), e);
@@ -508,8 +500,7 @@ class JPredThread extends JWS1Thread implements WSClientI
             else
             {
               // do merge with other job results
-              throw new Error(
-                      "Multiple JNet subjob merging not yet implemented.");
+              throw new Error(MessageManager.getString("error.multiple_jnet_subjob_merge_not_implemented"));
             }
           } catch (Exception e)
           {
@@ -517,9 +508,7 @@ class JPredThread extends JWS1Thread implements WSClientI
                     "JNet Client: JPred Annotation Parse Error", e);
             wsInfo.setStatus(j.getJobnum(),
                     WebserviceInfo.STATE_STOPPED_ERROR);
-            wsInfo.appendProgressText(j.getJobnum(), OutputHeader + "\n"
-                    + j.result.getStatus()
-                    + "\nInvalid JNet job result data!\n" + e.getMessage());
+            wsInfo.appendProgressText(j.getJobnum(), MessageManager.formatMessage("info.invalid_jnet_job_result_data", new String[]{OutputHeader.toString(),j.result.getStatus(), e.getMessage() }));
             j.result.setBroken(true);
           }
         }
@@ -587,7 +576,7 @@ class JPredThread extends JWS1Thread implements WSClientI
 
   public void cancelJob()
   {
-    throw new Error("Implementation error!");
+    throw new Error(MessageManager.getString("error.implementation_error"));
   }
 
   public boolean canMergeResults()
index 2d111ca..a6ba751 100644 (file)
@@ -26,6 +26,7 @@ import jalview.analysis.*;
 import jalview.bin.*;
 import jalview.datamodel.*;
 import jalview.gui.*;
+import jalview.util.MessageManager;
 import jalview.ws.AWsJob;
 import jalview.ws.JobStateSummary;
 import jalview.ws.WSClientI;
@@ -63,7 +64,7 @@ class MsaWSThread extends JWS1Thread implements WSClientI
         subjobComplete = true;
         result = new MsaResult();
         result.setFinished(true);
-        result.setStatus("Job never ran - input returned to user.");
+        result.setStatus(MessageManager.getString("label.job_never_ran"));
       }
 
     }
@@ -86,8 +87,7 @@ class MsaWSThread extends JWS1Thread implements WSClientI
       int nseqs = 0;
       if (minlen < 0)
       {
-        throw new Error(
-                "Implementation error: minlen must be zero or more.");
+        throw new Error(MessageManager.getString("error.implementation_error_minlen_must_be_greater_zero"));
       }
       for (int i = 0; i < seqs.length; i++)
       {
@@ -431,8 +431,7 @@ class MsaWSThread extends JWS1Thread implements WSClientI
   {
     if (!(job instanceof MsaWSJob))
     {
-      throw new Error("StartJob(MsaWSJob) called on a WSJobInstance "
-              + job.getClass());
+      throw new Error(MessageManager.formatMessage("error.implementation_error_msawbjob_called", new String[]{job.getClass().toString()}));
     }
     MsaWSJob j = (MsaWSJob) job;
     if (j.isSubmitted())
@@ -450,7 +449,7 @@ class MsaWSThread extends JWS1Thread implements WSClientI
       j.setSubmitted(true);
       j.result = new MsaResult();
       j.result.setFinished(true);
-      j.result.setStatus("Empty Alignment Job");
+      j.result.setStatus(MessageManager.getString("label.empty_alignment_job"));
       ((MsaResult) j.result).setMsa(null);
     }
     try
@@ -468,10 +467,7 @@ class MsaWSThread extends JWS1Thread implements WSClientI
       {
         if (jobsubmit == null)
         {
-          throw new Exception(
-                  "Server at "
-                          + WsUrl
-                          + " returned null object, it probably cannot be contacted. Try again later ?");
+          throw new Exception(MessageManager.formatMessage("exception.web_service_returned_null_try_later", new String[]{WsUrl}));
         }
 
         throw new Exception(jobsubmit.getJobId());
@@ -491,9 +487,7 @@ class MsaWSThread extends JWS1Thread implements WSClientI
               WebserviceInfo.STATE_STOPPED_SERVERERROR);
       wsInfo.appendProgressText(
               j.getJobnum(),
-              "Failed to submit sequences for alignment.\n"
-                      + "It is most likely that there is a problem with the server.\n"
-                      + "Just close the window\n");
+              MessageManager.getString("info.failed_to_submit_sequences_for_alignment"));
 
       // e.printStackTrace(); // TODO: JBPNote DEBUG
     }
@@ -539,7 +533,7 @@ class MsaWSThread extends JWS1Thread implements WSClientI
           if (valign != null)
           {
             wsInfo.appendProgressText(jobs[j].getJobnum(),
-                    "\nAlignment Object Method Notes\n");
+                    MessageManager.getString("info.alignment_object_method_notes"));
             String[] lines = valign.getMethod();
             for (int line = 0; line < lines.length; line++)
             {
index 3a4bbd4..c1935b4 100644 (file)
@@ -208,7 +208,7 @@ public class SeqSearchWSClient extends WS1Client
     }
     if (!locateWebService())
     {
-      throw new Exception("Cannot contact service endpoint at " + WsURL);
+      throw new Exception(MessageManager.formatMessage("exception.cannot_contact_service_endpoint_at", new String[]{WsURL}));
     }
     String database = server.getDatabase();
     if (database == null)
index b9d38fe..7c2ea49 100644 (file)
@@ -27,6 +27,7 @@ import jalview.bin.*;
 import jalview.datamodel.*;
 import jalview.gui.*;
 import jalview.io.NewickFile;
+import jalview.util.MessageManager;
 import jalview.ws.AWsJob;
 import jalview.ws.JobStateSummary;
 import jalview.ws.WSClientI;
@@ -61,7 +62,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
         subjobComplete = true;
         result = new MsaResult();
         result.setFinished(true);
-        result.setStatus("Job never ran - input returned to user.");
+        result.setStatus(MessageManager.getString("label.job_never_ran"));
       }
 
     }
@@ -84,8 +85,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
       int nseqs = 0;
       if (minlen < 0)
       {
-        throw new Error(
-                "Implementation error: minlen must be zero or more.");
+          throw new Error(MessageManager.getString("error.implementation_error_minlen_must_be_greater_zero"));
       }
       for (int i = 0; i < seqs.length; i++)
       {
@@ -446,8 +446,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
   {
     if (!(job instanceof SeqSearchWSJob))
     {
-      throw new Error("StartJob(MsaWSJob) called on a WSJobInstance "
-              + job.getClass());
+        throw new Error(MessageManager.formatMessage("error.implementation_error_msawbjob_called", new String[]{job.getClass().toString()}));
     }
     SeqSearchWSJob j = (SeqSearchWSJob) job;
     if (j.isSubmitted())
@@ -465,7 +464,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
       j.setSubmitted(true);
       j.result = new MsaResult();
       j.result.setFinished(true);
-      j.result.setStatus("Empty Alignment Job");
+      j.result.setStatus(MessageManager.getString("label.empty_alignment_job"));
       ((MsaResult) j.result).setMsa(null);
     }
     try
@@ -484,10 +483,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
       {
         if (jobsubmit == null)
         {
-          throw new Exception(
-                  "Server at "
-                          + WsUrl
-                          + " returned null object, it probably cannot be contacted. Try again later ?");
+          throw new Exception(MessageManager.formatMessage("exception.web_service_returned_null_try_later", new String[]{WsUrl}));
         }
 
         throw new Exception(jobsubmit.getJobId());
@@ -507,9 +503,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
               WebserviceInfo.STATE_STOPPED_SERVERERROR);
       wsInfo.appendProgressText(
               j.getJobnum(),
-              "Failed to submit sequences for alignment.\n"
-                      + "It is most likely that there is a problem with the server.\n"
-                      + "Just close the window\n");
+              MessageManager.getString("info.failed_to_submit_sequences_for_alignment"));
 
       // e.printStackTrace(); // TODO: JBPNote DEBUG
     }
@@ -548,7 +542,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
           if (valign != null)
           {
             wsInfo.appendProgressText(jobs[j].getJobnum(),
-                    "\nAlignment Object Method Notes\n");
+                    MessageManager.getString("info.alignment_object_method_notes"));
             String[] lines = valign.getMethod();
             for (int line = 0; line < lines.length; line++)
             {
@@ -648,7 +642,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI
               AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
       if (nf != null)
       {
-        af.ShowNewickTree(nf, "Tree from " + this.alTitle);
+        af.ShowNewickTree(nf, MessageManager.formatMessage("label.tree_from", new String[]{this.alTitle}));
       }
       // initialise with same renderer settings as in parent alignframe.
       af.getFeatureRenderer().transferSettings(this.featureSettings);
index 4d1af4c..210e520 100644 (file)
@@ -22,6 +22,7 @@ package jalview.ws.jws1;
 
 import jalview.gui.AlignFrame;
 import jalview.gui.WebserviceInfo;
+import jalview.util.MessageManager;
 import jalview.ws.WSClient;
 import jalview.ws.WSMenuEntryProviderI;
 
@@ -109,8 +110,7 @@ public abstract class WS1Client extends WSClient implements
   {
     if (serviceHandle == null)
     {
-      throw new Error(
-              "IMPLEMENTATION ERROR: cannot attach WS Menu Entry without service handle reference!");
+      throw new Error(MessageManager.getString("error.implementation_error_cannot_attach_ws_menu_entry"));
     }
     attachWSMenuEntry(wsmenu, serviceHandle, alignFrame);
   }
index 65f939a..7c0eabd 100644 (file)
@@ -35,6 +35,7 @@ import compbio.metadata.Preset;
 import compbio.metadata.PresetManager;
 import compbio.metadata.RunnerConfig;
 
+import jalview.util.MessageManager;
 import jalview.ws.jws2.dm.JabaOption;
 import jalview.ws.jws2.dm.JabaParameter;
 import jalview.ws.jws2.dm.JabaWsParamSet;
@@ -166,9 +167,7 @@ public class JabaParamStore implements ParamDatastoreI
       }
       if (narg == null)
       {
-        throw new Error(
-                "Implementation Error: Cannot handle Jaba parameter object "
-                        + rg.getClass());
+        throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_handle_jaba_param", new String[]{rg.getClass().toString()}));
       }
       else
       {
@@ -203,9 +202,7 @@ public class JabaParamStore implements ParamDatastoreI
               .getOption() : null;
       if (narg == null)
       {
-        throw new Error(
-                "Implementation Error: Cannot handle Jaba parameter object "
-                        + rg.getClass());
+          throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_handle_jaba_param", new String[]{rg.getClass().toString()}));
       }
       else
       {
@@ -243,8 +240,7 @@ public class JabaParamStore implements ParamDatastoreI
     }
     if (servicePresets.containsKey(name))
     {
-      throw new Error(
-              "Implementation error: Attempt to delete a service preset!");
+      throw new Error(MessageManager.getString("error.implementation_error_attempt_to_delete_service_preset"));
     }
   }
 
@@ -270,9 +266,7 @@ public class JabaParamStore implements ParamDatastoreI
             : getPreset(presetName));
     if (jps == null)
     {
-      throw new Error("Implementation error: Can't locate either oldname ("
-              + oldName + ") or presetName (" + presetName
-              + "in the datastore!");
+      throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_locate_oldname_presetname", new String[]{oldName,presetName}));
     }
     jps.setName(presetName);
     jps.setDescription(text);
@@ -322,8 +316,7 @@ public class JabaParamStore implements ParamDatastoreI
   {
     if (!involves(urls))
     {
-      throw new IOException(
-              "Implementation error: Cannot find service url in the given url set!");
+      throw new IOException(MessageManager.getString("error.implementation_error_cannot_find_service_url_in_given_set"));
 
     }
     JabaWsParamSet wsp = new JabaWsParamSet();
@@ -348,15 +341,11 @@ public class JabaParamStore implements ParamDatastoreI
   {
     if (!involves(pset.getApplicableUrls()))
     {
-      throw new IOException(
-              "Implementation error: Cannot find service url in the given url set for this service parameter store ("
-                      + service.getUri() + ") !");
-
+      throw new IOException(MessageManager.formatMessage("error.implementation_error_cannot_find_service_url_in_given_set_param_store", new String[]{service.getUri()}));
     }
     if (!(pset instanceof JabaWsParamSet))
     {
-      throw new Error(
-              "Implementation error: JabaWsParamSets can only be handled by JabaParamStore");
+      throw new Error(MessageManager.getString("error.implementation_error_jabaws_param_set_only_handled_by"));
     }
 
     StringBuffer rslt = new StringBuffer();
index 7d7f4f0..c47c63a 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.ws.jws2;
 
+import jalview.util.MessageManager;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
 import jalview.ws.params.ArgumentI;
 import jalview.ws.params.WsParamSetI;
@@ -74,7 +75,7 @@ public class JabaPreset implements WsParamSetI
   @Override
   public void setSourceFile(String newfile)
   {
-    throw new Error("Cannot set source file for " + getClass());
+    throw new Error(MessageManager.formatMessage("error.cannot_set_source_file_for", new String[]{getClass().toString()}));
   }
 
   @Override
@@ -87,14 +88,13 @@ public class JabaPreset implements WsParamSetI
     } catch (Exception e)
     {
       e.printStackTrace();
-      throw new Error(
-              "Probable mismatch between service instance and preset!");
+      throw new Error(MessageManager.getString("error.mismatch_service_instance_preset"));
     }
   }
 
   @Override
   public void setArguments(List<ArgumentI> args)
   {
-    throw new Error("Cannot set Parameters for a Jaba Web service's preset");
+    throw new Error(MessageManager.getString("error.cannot_set_params_for_ws_preset"));
   }
 }
index afb46e9..e966886 100644 (file)
@@ -24,6 +24,7 @@ import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Annotation;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
+import jalview.util.MessageManager;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
 import jalview.ws.params.WsParamSetI;
 
@@ -114,8 +115,7 @@ public abstract class JabawsCalcWorker extends AbstractJabaCalcWorker
         rslt = aaservice.customAnalize(seqs, getJabaArguments());
       } catch (WrongParameterException x)
       {
-        throw new JobSubmissionException(
-                "Invalid parameter set. Check Jalview implementation.", x);
+        throw new JobSubmissionException(MessageManager.getString("exception.jobsubmission_invalid_params_set"), x);
 
       }
     }
index 1f0d92c..3f0e47d 100644 (file)
@@ -40,6 +40,7 @@ import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Annotation;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
+import jalview.util.MessageManager;
 import jalview.workers.AlignCalcWorker;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
 import jalview.ws.params.WsParamSetI;
@@ -129,9 +130,7 @@ public abstract class JabawsMsaInterfaceAlignCalcWorker extends AbstractJabaCalc
         rslt = msaservice.customAlign(seqs, getJabaArguments());
       } catch (WrongParameterException x)
       {
-        throw new JobSubmissionException(
-                "Invalid parameter set. Check Jalview implementation.", x);
-
+          throw new JobSubmissionException(MessageManager.getString("exception.jobsubmission_invalid_params_set"), x);
       }
     }
     return rslt;
index b2b676f..4f6e8f6 100644 (file)
@@ -77,8 +77,7 @@ public abstract class Jws2Client extends jalview.ws.WSClient
          * arguments. for (Argument opt : arguments) { newargs.add(opt); } }
          * paramset = newargs; } else {
          */
-        throw new Error(
-                "Implementation error: Can only instantiate Jaba parameter sets.");
+        throw new Error(MessageManager.getString("error.implementation_error_can_only_instantiate_jaba_param_sets"));
       }
     }
     else
@@ -410,7 +409,7 @@ public abstract class Jws2Client extends jalview.ws.WSClient
     {
       // TODO raise dialog box explaining error, and/or open the JABA
       // preferences menu.
-      throw new Error("No AACon service found.");
+      throw new Error(MessageManager.getString("error.no_aacon_service_found"));
     }
     return new AAConSettings(true, service, null, null);
   }
index f40c250..0d0f047 100644 (file)
@@ -32,6 +32,7 @@ import jalview.analysis.*;
 import jalview.bin.*;
 import jalview.datamodel.*;
 import jalview.gui.*;
+import jalview.util.MessageManager;
 import jalview.ws.AWsJob;
 import jalview.ws.WSClientI;
 import jalview.ws.JobStateSummary;
@@ -109,8 +110,7 @@ class MsaWSThread extends AWS2Thread implements WSClientI
       int nseqs = 0;
       if (minlen < 0)
       {
-        throw new Error(
-                "Implementation error: minlen must be zero or more.");
+        throw new Error(MessageManager.getString("error.implementation_error_minlen_must_be_greater_zero"));
       }
       for (int i = 0; i < seqs.length; i++)
       {
@@ -625,8 +625,7 @@ class MsaWSThread extends AWS2Thread implements WSClientI
     // boiler plate template
     if (!(job instanceof MsaWSJob))
     {
-      throw new Error("StartJob(MsaWSJob) called on a WSJobInstance "
-              + job.getClass());
+      throw new Error(MessageManager.formatMessage("error.implementation_error_msawbjob_called", new String[]{job.getClass().toString()}));
     }
     MsaWSJob j = (MsaWSJob) job;
     if (j.isSubmitted())
@@ -644,7 +643,7 @@ class MsaWSThread extends AWS2Thread implements WSClientI
     {
       // special case - selection consisted entirely of empty sequences...
       j.setjobStatus(JobStatus.FINISHED);
-      j.setStatus("Empty Alignment Job");
+      j.setStatus(MessageManager.getString("label.empty_alignment_job"));
     }
     try
     {
@@ -672,35 +671,28 @@ class MsaWSThread extends AWS2Thread implements WSClientI
       }
       else
       {
-        throw new Exception(
-                "Server at "
-                        + WsUrl
-                        + " returned null string for job id, it probably cannot be contacted. Try again later ?");
+        throw new Exception(MessageManager.formatMessage("exception.web_service_returned_null_try_later", new String[]{WsUrl}));
       }
     } catch (compbio.metadata.UnsupportedRuntimeException _lex)
     {
       lex = _lex;
-      wsInfo.appendProgressText("Job could not be run because the server doesn't support this program.\n"
-              + _lex.getMessage());
-      wsInfo.warnUser(_lex.getMessage(), "Service not supported!");
+      wsInfo.appendProgressText(MessageManager.formatMessage("info.job_couldnt_be_run_server_doesnt_support_program", new String[]{_lex.getMessage()}));
+      wsInfo.warnUser(_lex.getMessage(), MessageManager.getString("warn.service_not_supported"));
       wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);
       wsInfo.setStatus(j.getJobnum(),
               WebserviceInfo.STATE_STOPPED_SERVERERROR);
     } catch (compbio.metadata.LimitExceededException _lex)
     {
       lex = _lex;
-      wsInfo.appendProgressText("Job could not be run because it exceeded a hard limit on the server.\n"
-              + _lex.getMessage());
-      wsInfo.warnUser(_lex.getMessage(), "Input is too big!");
+      wsInfo.appendProgressText(MessageManager.formatMessage("info.job_couldnt_be_run_exceeded_hard_limit", new String[]{_lex.getMessage()}));
+      wsInfo.warnUser(_lex.getMessage(), MessageManager.getString("warn.input_is_too_big"));
       wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
       wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_ERROR);
     } catch (compbio.metadata.WrongParameterException _lex)
     {
       lex = _lex;
-      wsInfo.warnUser(_lex.getMessage(), "Invalid job parameter set!");
-      wsInfo.appendProgressText("Job could not be run because some of the parameter settings are not supported by the server.\n"
-              + _lex.getMessage()
-              + "\nPlease check to make sure you have used the correct parameter set for this service!\n");
+      wsInfo.warnUser(_lex.getMessage(), MessageManager.getString("warn.invalid_job_param_set"));
+      wsInfo.appendProgressText(MessageManager.formatMessage("info.job_couldnt_be_run_incorrect_param_setting", new String[]{_lex.getMessage()}));
       wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
       wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_ERROR);
     } catch (Error e)
@@ -734,8 +726,7 @@ class MsaWSThread extends AWS2Thread implements WSClientI
 
         j.setAllowedServerExceptions(0);
         wsInfo.appendProgressText(j.getJobnum(),
-                "Failed to submit sequences for alignment.\n"
-                        + "Just close the window\n");
+                MessageMAnager.getString("info.failed_to_submit_sequences_for_alignment"));
       }
     }
   }
@@ -743,7 +734,7 @@ class MsaWSThread extends AWS2Thread implements WSClientI
   public void parseResult()
   {
     long progbar = System.currentTimeMillis();
-    wsInfo.setProgressBar("Collecting job results.", progbar);
+    wsInfo.setProgressBar(MessageManager.getString("status.collecting_job_results"), progbar);
     int results = 0; // number of result sets received
     JobStateSummary finalState = new JobStateSummary();
     try
index e2bfbbd..e44fa6a 100644 (file)
@@ -181,8 +181,7 @@ public class ParameterUtils
     } catch (Exception e)
     {
       e.printStackTrace();
-      throw new Error(
-              "Implementation error: could not copy ValueConstrain!");
+      throw new Error(MessageManager.getString("error.implementation_error_couldnt_copy_value_constraint"));
     }
   }
 
index 77a7a67..2138473 100644 (file)
@@ -106,7 +106,7 @@ public class SequenceAnnotationWSClient extends Jws2Client
         } catch (Exception x)
         {
           x.printStackTrace();
-          throw new Error("Implementation error", x);
+          throw new Error(MessageManager.getString("error.implementation_error"), x);
         }
         alignFrame.getViewport().getCalcManager().registerWorker(worker);
         alignFrame.getViewport().getCalcManager().startWorker(worker);
index 28a6955..8ce4639 100644 (file)
@@ -92,7 +92,7 @@ public class AAConSettings extends jalview.ws.params.AutoCalcSetting
         return;
       }
       // Try even harder to migrate arguments.
-      throw new Error("Parameter migration not implemented yet");
+      throw new Error(MessageManager.getString("error.parameter_migration_not_implemented_yet"));
     }
   }
 
index f29b6ed..995af35 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.ws.jws2.dm;
 
+import jalview.util.MessageManager;
 import jalview.ws.jws2.ParameterUtils;
 import jalview.ws.params.OptionI;
 
@@ -94,8 +95,7 @@ public class JabaOption implements jalview.ws.params.OptionI
     } catch (Exception e)
     {
       e.printStackTrace();
-      throw new Error(
-              "Implementation error: cannot set Jaba Option to a value outside its allowed value range!");
+      throw new Error(MessageManager.getString("error.implementation_error_cannot_set_jaba_option"));
     }
   }
 
index f57abde..920b73e 100644 (file)
@@ -22,6 +22,7 @@ package jalview.ws.jws2.dm;
 
 import compbio.metadata.ValueConstrain;
 
+import jalview.util.MessageManager;
 import jalview.ws.params.ValueConstrainI;
 
 public class JabaValueConstrain implements ValueConstrainI
@@ -45,9 +46,7 @@ public class JabaValueConstrain implements ValueConstrainI
     {
       return ValueType.Integer;
     }
-    throw new Error(
-            "IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type :"
-                    + vc.toString());
+    throw new Error(MessageManager.formatMessage("error.implementation_error_valuetype_doesnt_support_jabaws_type", new String[]{vc.toString()}));
   }
 
   @Override
index 7a67f6e..d6d1d5c 100644 (file)
@@ -25,6 +25,7 @@ import java.util.List;
 
 import compbio.metadata.Option;
 
+import jalview.util.MessageManager;
 import jalview.ws.jws2.JabaParamStore;
 import jalview.ws.params.ArgumentI;
 import jalview.ws.params.WsParamSetI;
@@ -53,8 +54,7 @@ public class JabaWsParamSet implements WsParamSetI
       {
         if (!allJaba(jobParams))
         {
-          throw new Error(
-                  "Cannot create a JabaWSParamSet from non-JabaWS parameters");
+          throw new Error(MessageManager.getString("error.cannot_create_jabaws_param_set"));
         }
         else
         {
@@ -177,8 +177,7 @@ public class JabaWsParamSet implements WsParamSetI
   {
     if (!allJaba(args))
     {
-      throw new Error(
-              "Cannot set arguments to a JabaWSParamSet that are not JabaWS arguments");
+      throw new Error(MessageManager.getString("error.cannot_set_arguments_to_jabaws_param_set"));
     }
     jabaArguments = new ArrayList<Option>();
     for (ArgumentI rg : args)
index 7e9f668..120ce27 100644 (file)
@@ -22,6 +22,7 @@ package jalview.ws.jws2.jabaws2;
 
 import jalview.gui.AlignFrame;
 import jalview.gui.Desktop;
+import jalview.util.MessageManager;
 import jalview.ws.jws2.JabaParamStore;
 import jalview.ws.jws2.MsaWSClient;
 import jalview.ws.jws2.SequenceAnnotationWSClient;
@@ -156,9 +157,7 @@ public class Jws2Instance
     {
       return ((SequenceAnnotation) service).getRunnerOptions();
     }
-    throw new Error(
-            "Implementation Error: Runner Config not available for a JABAWS service of type "
-                    + serviceType + " (" + service.getClass() + ")");
+    throw new Error(MessageManager.formatMessage("error.implementation_error_runner_config_not_available", new String[]{serviceType,service.getClass().toString()}));
   }
 
   @Override
index c8e6ad4..47ad3b4 100644 (file)
@@ -110,8 +110,7 @@ public class HttpResultSet extends FileParse
 
     if (en == null)
     {
-      throw new Error(
-              "Implementation Error: need to have an HttpResponse to process.");
+      throw new Error(MessageManager.getString("error.implementation_error_need_to_have_httpresponse"));
     }
     jalview.io.packed.JalviewDataset ds = restJob.newJalviewDataset();
     // Decide how we deal with content.
index 46b8a64..cd4bb23 100644 (file)
@@ -97,8 +97,7 @@ public class RestClient extends WSClient implements WSClientI,
 
   public void setWebserviceInfo(boolean headless)
   {
-    WebServiceJobTitle = service.details.Action + " using "
-            + service.details.Name;
+    WebServiceJobTitle = MessageManager.formatMessage("label.webservice_job_title", new String[]{service.details.Action,service.details.Name});
     WebServiceName = service.details.Name;
     WebServiceReference = "No reference - go to url for more info";
     if (service.details.description != null)
@@ -258,9 +257,7 @@ public class RestClient extends WSClient implements WSClientI,
           _input = new AlignmentView(av.getAlignment(),
                   av.getColumnSelection(), av.getSelectionGroup(),
                   av.hasHiddenColumns(), true, true);
-          viewTitle = "selected "
-                  + (av.hasHiddenColumns() ? "visible" : "")
-                  + " region of " + af.getTitle();
+          viewTitle = MessageManager.formatMessage("label.select_visible_region_of", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()});
         }
         else
         {
@@ -269,9 +266,7 @@ public class RestClient extends WSClient implements WSClientI,
                   av.getColumnSelection(), av.getSelectionGroup(),
                   av.hasHiddenColumns(), false, true);
         }
-        viewTitle = "select and unselected "
-                + (av.hasHiddenColumns() ? "visible" : "")
-                + " regions from " + af.getTitle();
+        viewTitle = MessageManager.formatMessage("label.select_unselect_visible_regions_from", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()});
       }
       else
       {
@@ -279,8 +274,7 @@ public class RestClient extends WSClient implements WSClientI,
         _input = new AlignmentView(av.getAlignment(),
                 av.getColumnSelection(), av.getSelectionGroup(),
                 av.hasHiddenColumns(), true, true);
-        viewTitle = "selected " + (av.hasHiddenColumns() ? "visible" : "")
-                + " region of " + af.getTitle();
+        viewTitle = MessageManager.formatMessage("label.select_visible_region_of", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()});
       }
     }
     else
@@ -289,7 +283,7 @@ public class RestClient extends WSClient implements WSClientI,
       _input = new AlignmentView(av.getAlignment(),
               av.getColumnSelection(), null, av.hasHiddenColumns(), false,
               true);
-      viewTitle = "" + (av.hasHiddenColumns() ? "visible region of " : "")
+      viewTitle = "" + (av.hasHiddenColumns() ? (new StringBuffer(" ").append(MessageManager.getString("label.visible_region_of")).toString()) : "")
               + af.getTitle();
     }
 
index b529045..738d5dd 100644 (file)
@@ -36,6 +36,7 @@ import jalview.gui.WebserviceInfo;
 import jalview.io.NewickFile;
 import jalview.io.packed.JalviewDataset;
 import jalview.io.packed.JalviewDataset.AlignmentSet;
+import jalview.util.MessageManager;
 import jalview.ws.AWSThread;
 import jalview.ws.AWsJob;
 
@@ -805,7 +806,7 @@ public class RestJobThread extends AWSThread
               destAls.add(destAl);
               destColsel.add(destCs);
               resultDest.add(AddDataTo.newAlignment);
-              throw new Error("Impl. Error! TODO: ");
+              throw new Error(MessageManager.getString("error.implementation_error")+"TODO: ");
             }
           }
           /**
@@ -1041,9 +1042,7 @@ public class RestJobThread extends AWSThread
     {
       AlignmentI destal;
       ColumnSelection destcs;
-      String alTitle = restClient.service.details.Action + " using "
-              + restClient.service.details.Name + " on "
-              + restClient.viewTitle;
+      String alTitle = MessageManager.formatMessage("label.webservice_job_title_on", new String[]{restClient.service.details.Action,restClient.service.details.Name,restClient.viewTitle});
       switch (action)
       {
       case newAlignment:
index 37a223c..0bade86 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.ws.rest.params;
 
+import jalview.util.MessageManager;
 import jalview.ws.params.OptionI;
 import jalview.ws.rest.InputType;
 import jalview.ws.rest.NoValidInputDataException;
@@ -79,7 +80,7 @@ public class JobConstant extends InputType
         prm.add(URLEncoder.encode(value, "UTF-8"));
       } catch (UnsupportedEncodingException ex)
       {
-        throw new Error("Couldn't encode '" + value + "' as UTF-8.", ex);
+        throw new Error(MessageManager.formatMessage("error.couldnt_encode_as_utf8", new String[]{value}), ex);
 
       }
     }
index 30dc473..70686c5 100644 (file)
@@ -23,6 +23,7 @@ package jalview.ws.rest.params;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceGroup;
 import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
 import jalview.ws.params.OptionI;
 import jalview.ws.params.simple.IntegerParameter;
 import jalview.ws.params.simple.Option;
@@ -99,8 +100,7 @@ public class SeqGroupIndexVector extends InputType implements
       {
         if (sg.getSize() < minsize)
         {
-          throw new NoValidInputDataException("Group contains less than "
-                  + minsize + " sequences.");
+          throw new NoValidInputDataException(MessageManager.formatMessage("exception.notvaliddata_group_contains_less_than_min_seqs", new String[]{Integer.valueOf(minsize).toString()}));
         }
         // TODO: refactor to sequenceGroup for efficiency -
         // getAlignmentRowInterval(AlignmentI al)
index 7462cac..8af2071 100644 (file)
@@ -53,7 +53,7 @@ public class Tree extends InputType
     /*
      * rj.getTreeForInput(token); return new StringBody(new )
      */
-    throw new Error("Tree InputType not yet implemented");
+    throw new Error(MessageManager.getString("error.tree_inputtype_not_yet_implemented"));
     // return null;
   }
 
index afdb516..ba7e062 100644 (file)
@@ -24,6 +24,7 @@ import jalview.datamodel.AlignmentI;
 import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.SequenceI;
 import jalview.util.DBRefUtils;
+import jalview.util.MessageManager;
 
 import java.util.ArrayList;
 import java.util.Enumeration;
@@ -326,7 +327,7 @@ public class ASequenceFetcher
     } catch (Exception e)
     {
       // Serious problems if this happens.
-      throw new Error("DBRefSource Implementation Exception", e);
+      throw new Error(MessageManager.getString("error.dbrefsource_implementation_exception"), e);
     }
     addDbRefSourceImpl(proxy);
   }
@@ -394,9 +395,7 @@ public class ASequenceFetcher
   {
     if (!jalview.ws.seqfetcher.DbSourceProxy.class.isAssignableFrom(class1))
     {
-      throw new Error(
-              "Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given '"
-                      + class1 + "')");
+      throw new Error(MessageManager.formatMessage("error.implementation_error_dbinstance_must_implement_interface", new String[]{class1.toString()}));
     }
     if (FETCHABLEDBS == null)
     {
index f343d5e..617542f 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package org.jibble.epsgraphics;
 
+import jalview.util.MessageManager;
+
 import java.io.*;
 import java.util.*;
 
@@ -157,7 +159,7 @@ public class EpsDocument
       _bufferedWriter.write(line + "\n");
     } catch (IOException e)
     {
-      throw new EpsException("Could not write to the output file: " + e);
+      throw new EpsException(MessageManager.formatMessage("exception.eps_coudnt_write_output_file", new String[]{e.getMessage()}));
     }
   }
 
index c82d4fc..ca1b304 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package org.jibble.epsgraphics;
 
+import jalview.util.MessageManager;
+
 import java.io.*;
 import java.text.*;
 import java.util.*;
@@ -161,9 +163,7 @@ public class EpsGraphics2D extends java.awt.Graphics2D
    */
   private void methodNotSupported()
   {
-    EpsException e = new EpsException(
-            "Method not currently supported by EpsGraphics2D version "
-                    + VERSION);
+    EpsException e = new EpsException(MessageManager.formatMessage("exception.eps_method_not_supported", new String[]{VERSION}));
     e.printStackTrace(System.err);
   }
 
@@ -995,8 +995,7 @@ public class EpsGraphics2D extends java.awt.Graphics2D
         return t.createTransformedShape(_clip);
       } catch (Exception e)
       {
-        throw new EpsException("Unable to get inverse of matrix: "
-                + _transform);
+        throw new EpsException(MessageManager.formatMessage("exception.eps_unable_to_get_inverse_matrix", new String[]{_transform.toString()}));
       }
     }
   }
@@ -1314,7 +1313,7 @@ public class EpsGraphics2D extends java.awt.Graphics2D
       matrix = matrix.createInverse();
     } catch (Exception e)
     {
-      throw new EpsException("Unable to get inverse of matrix: " + matrix);
+        throw new EpsException(MessageManager.formatMessage("exception.eps_unable_to_get_inverse_matrix", new String[]{matrix.toString()}));
     }
     matrix.scale(1, -1);
     matrix.getMatrix(m);
index 3b03d51..2dcbe26 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package uk.ac.ebi.www;
 
+import jalview.util.MessageManager;
+
 public class WSWUBlastServiceLocator extends org.apache.axis.client.Service
         implements uk.ac.ebi.www.WSWUBlastService
 {
@@ -95,10 +97,7 @@ public class WSWUBlastServiceLocator extends org.apache.axis.client.Service
     {
       throw new javax.xml.rpc.ServiceException(t);
     }
-    throw new javax.xml.rpc.ServiceException(
-            "There is no stub implementation for the interface:  "
-                    + (serviceEndpointInterface == null ? "null"
-                            : serviceEndpointInterface.getName()));
+    throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
   }
 
   /**
index 573b9de..855c1fe 100644 (file)
@@ -20,6 +20,8 @@
  */
 package uk.ac.ebi.www.picr.AccessionMappingService;
 
+import jalview.util.MessageManager;
+
 public class AccessionMapperServiceLocator extends
         org.apache.axis.client.Service implements
         uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperService
@@ -111,10 +113,7 @@ public class AccessionMapperServiceLocator extends
     {
       throw new javax.xml.rpc.ServiceException(t);
     }
-    throw new javax.xml.rpc.ServiceException(
-            "There is no stub implementation for the interface:  "
-                    + (serviceEndpointInterface == null ? "null"
-                            : serviceEndpointInterface.getName()));
+    throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
   }
 
   /**
@@ -175,8 +174,7 @@ public class AccessionMapperServiceLocator extends
     }
     else
     { // Unknown Port Name
-      throw new javax.xml.rpc.ServiceException(
-              " Cannot set Endpoint Address for Unknown Port" + portName);
+      throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
     }
   }