diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java index 37c99a1a2fb..95f94211fb9 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java @@ -15,6 +15,7 @@ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry + * David Dykstal (IBM) - [160776] format file size according to client system conventions and locale ********************************************************************************/ package org.eclipse.rse.internal.files.ui.propertypages; @@ -57,6 +58,7 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.ui.ide.IDEEncoding; import com.ibm.icu.text.DateFormat; +import com.ibm.icu.text.NumberFormat; /** @@ -396,8 +398,11 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage labelPath.setText(file.getParentPath()); } // size - if (labelSize != null) - labelSize.setText(Long.toString(file.getLength())); + if (labelSize != null) { + NumberFormat fmt = NumberFormat.getIntegerInstance(); + String formattedNumber = fmt.format(file.getLength()); + labelSize.setText(formattedNumber); + } // modified if (labelModified != null) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java index b12d79ea747..16c0032a599 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java @@ -23,11 +23,11 @@ * Martin Oberhuber (Wind River) - [186997] No deferred queries in Local Files * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core * Xuan Chen (IBM) - [180671] [refresh] It is not possible to refresh editor with double clicking on it + * David Dykstal (IBM) - [160776] format file size according to client system conventions and locale ********************************************************************************/ package org.eclipse.rse.internal.files.ui.view; import java.io.File; -import java.text.NumberFormat; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; @@ -143,6 +143,7 @@ import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor; import com.ibm.icu.text.DateFormat; +import com.ibm.icu.text.NumberFormat; /** * Adapter for displaying remote file system objects in tree views. @@ -1185,7 +1186,9 @@ public class SystemViewRemoteFileAdapter { if (formatted) { - return sub(xlatedSize, MSG_SUB1, Long.toString(file.getLength())); + NumberFormat fmt = NumberFormat.getIntegerInstance(); + String formattedNumber = fmt.format(file.getLength()); + return sub(xlatedSize, MSG_SUB1, formattedNumber); } else {