X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fvamsas%2FDatastoreItem.java;h=11c7e91f82a945781f56044ce6a446eae56a42ff;hb=ad15cff29620f960119f80176f1fd443da9f6763;hp=74c5bd19d3ee2913f3d5fbd9407ae81ca5158edb;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/io/vamsas/DatastoreItem.java b/src/jalview/io/vamsas/DatastoreItem.java index 74c5bd1..11c7e91 100644 --- a/src/jalview/io/vamsas/DatastoreItem.java +++ b/src/jalview/io/vamsas/DatastoreItem.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -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); }