git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1727 added EBI mirror of DAS registry
[jalview.git]
/
src
/
jalview
/
datamodel
/
CigarBase.java
diff --git
a/src/jalview/datamodel/CigarBase.java
b/src/jalview/datamodel/CigarBase.java
index
69826b6
..
1506cee
100644
(file)
--- a/
src/jalview/datamodel/CigarBase.java
+++ b/
src/jalview/datamodel/CigarBase.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.
*
*
* This file is part of Jalview.
*
@@
-20,6
+20,8
@@
*/
package jalview.datamodel;
*/
package jalview.datamodel;
+import jalview.util.MessageManager;
+
import java.util.*;
public abstract class CigarBase
import java.util.*;
public abstract class CigarBase
@@
-144,7
+146,7
@@
public abstract class CigarBase
endpos = alcursor;
break;
default:
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)
}
}
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')
{
} 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
{
}
try
{
@@
-232,7
+234,7
@@
public abstract class CigarBase
i = j;
} catch (Exception e)
{
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')
{
}
if (c >= 'a' && c <= 'z')
{
@@
-244,9
+246,11
@@
public abstract class CigarBase
}
else
{
}
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[]
}
}
return new Object[]
@@
-269,7
+273,7
@@
public abstract class CigarBase
}
if (op != M && op != D && op != I)
{
}
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)
{
}
if (range == 0)
{
@@
-277,8
+281,7
@@
public abstract class CigarBase
}
if (range < 0)
{
}
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)
}
int lngth = 0;
if (operation == null)
@@
-390,8
+393,7
@@
public abstract class CigarBase
}
if (start < 0 || start > end)
{
}
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.
}
// 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:
}
break;
case D:
- throw new Error("Implementation error."); // do nothing;
+ throw new Error(MessageManager.getString("error.implementation_error")); // do nothing;
default:
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
}
rlength -= remain;
remain = oldrange[++o]; // number of op characters left to edit