/** Returns a short description for an {@link IDescription}. */\r
@Override\r
public String getShortDescription() {\r
- return String.format("Extra %1$s package, revision %2$d", getPath(), getRevision());\r
+ String name = getPath();\r
+ if (name != null) {\r
+ // Uniformize all spaces in the name and upper case words.\r
+\r
+ name = name.replaceAll("[ _\t\f-]+", " "); //$NON-NLS-1$ //$NON-NLS-2$\r
+\r
+ // Look at all lower case characters in range [1..n-1] and replace them by an upper\r
+ // case if they are preceded by a space. Also upper cases the first character of the\r
+ // string.\r
+ boolean changed = false;\r
+ char[] chars = name.toCharArray();\r
+ for (int n = chars.length - 1, i = 0; i < n; i++) {\r
+ if (Character.isLowerCase(chars[i]) && (i == 0 || chars[i - 1] == ' ')) {\r
+ chars[i] = Character.toUpperCase(chars[i]);\r
+ changed = true;\r
+ }\r
+ }\r
+ if (changed) {\r
+ name = new String(chars);\r
+ }\r
+ }\r
+\r
+ return String.format("%1$s package, revision %2$d",\r
+ name,\r
+ getRevision());\r
}\r
\r
/** Returns a long description for an {@link IDescription}. */\r