Bug 567698 - Java stack trace console can't find types if the line
starts with tab

Search not only for spaces, but also for tabs - and trim the result to
avoid white space in the link.

Change-Id: I2df23d8ba0c9b2e7b65e6e6d4b0efd0e42260e99
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaStackTraceHyperlink.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaStackTraceHyperlink.java
index 4a1819a..aeeba2c 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaStackTraceHyperlink.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaStackTraceHyperlink.java
@@ -314,8 +314,11 @@
 
             int linkEnd = line.indexOf(')', regionOffsetInLine);
             int linkStart = line.lastIndexOf(' ', regionOffsetInLine);
+			if (linkStart == -1) {
+				linkStart = line.lastIndexOf('\t', regionOffsetInLine);
+			}
 
-            return line.substring(linkStart==-1?0:linkStart+1,linkEnd+1);
+            return line.substring(linkStart==-1?0:linkStart+1,linkEnd+1).trim();
 		} catch (BadLocationException e) {
 			IStatus status = new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), 0, ConsoleMessages.JavaStackTraceHyperlink_Unable_to_retrieve_hyperlink_text__8, e);
 			throw new CoreException(status);