1 11 package org.eclipse.jdt.internal.debug.ui.console; 12 13 import org.eclipse.jface.text.BadLocationException; 14 import org.eclipse.ui.console.IHyperlink; 15 import org.eclipse.ui.console.PatternMatchEvent; 16 import org.eclipse.ui.console.TextConsole; 17 18 23 public class JavaExceptionConsoleTracker extends JavaConsoleTracker { 24 25 28 public void matchFound(PatternMatchEvent event) { 29 try { 30 int offset = event.getOffset(); 31 int length = event.getLength(); 32 TextConsole console = getConsole(); 33 String exceptionName; 34 exceptionName = console.getDocument().get(offset, length - 1); 35 IHyperlink link = new JavaExceptionHyperLink(console, exceptionName); 36 getConsole().addHyperlink(link, offset, length - 1); 37 } catch (BadLocationException e) { 38 } 39 } 40 } 41 | Popular Tags |