提交 64736a05 编写于 作者: S Serge Rider

Numeric columns sort fix


Former-commit-id: 427c321a
上级 7ef1a036
......@@ -574,6 +574,7 @@ public class ViewerColumnController {
final ILabelProvider labelProvider = (ILabelProvider)columnInfo.labelProvider;
viewer.setSorter(new ViewerSorter(collator) {
private final NumberFormat numberFormat = NumberFormat.getInstance();
@Override
public int compare(Viewer v, Object e1, Object e2)
{
......@@ -589,7 +590,6 @@ public class ViewerColumnController {
} else {
if (columnInfo.numeric) {
try {
final NumberFormat numberFormat = NumberFormat.getInstance();
final Number num1 = numberFormat.parse(value1);
final Number num2 = numberFormat.parse(value2);
if (num1.getClass() == num2.getClass() && num1 instanceof Comparable) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册