KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > ui > console > JavaNativeConsoleTracker


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

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
19 /**
20  * Creates JavaNativeStackTraceHyperlinks
21  * @since 3.1
22  */

23 public class JavaNativeConsoleTracker extends JavaConsoleTracker {
24     public void matchFound(PatternMatchEvent event) {
25         try {
26             int offset = event.getOffset();
27             int length = event.getLength();
28             TextConsole console = getConsole();
29             IHyperlink link = new JavaNativeStackTraceHyperlink(console);
30             console.addHyperlink(link, offset+1, length-2);
31         } catch (BadLocationException e) {
32         }
33     }
34
35 }
36
Popular Tags