From 224ebc099506c0108995335718350ace831cd607 Mon Sep 17 00:00:00 2001 From: DJ Houghton Date: Thu, 24 Mar 2011 14:34:21 +0000 Subject: Bug 338560 - Plugin install dialogs are have an unusably long status line --- .../eclipse/equinox/internal/p2/repository/ProgressStatistics.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bundles/org.eclipse.equinox.p2.repository') diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java index bc5a2105f..c08315a26 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java @@ -125,7 +125,10 @@ public class ProgressStatistics { } public synchronized String report() { - return m_total != -1 ? NLS.bind(Messages.fetching_0_from_1_2_of_3_at_4, new String[] {m_fileName, m_uri.toString(), convert(m_current), convert(m_total), convert(getRecentSpeed())}) : NLS.bind(Messages.fetching_0_from_1_2_at_3, new String[] {m_fileName, m_uri.toString(), convert(m_current), convert(getRecentSpeed())}); + String uriString = m_uri.toString(); + if (uriString.endsWith(m_fileName)) + uriString = uriString.substring(0, uriString.lastIndexOf(m_fileName)); + return m_total != -1 ? NLS.bind(Messages.fetching_0_from_1_2_of_3_at_4, new String[] {m_fileName, uriString, convert(m_current), convert(m_total), convert(getRecentSpeed())}) : NLS.bind(Messages.fetching_0_from_1_2_at_3, new String[] {m_fileName, m_uri.toString(), convert(m_current), convert(getRecentSpeed())}); } public void setReportInterval(int reportInterval) { -- cgit v1.2.3