KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ant > internal > ui > console > TaskLineTracker


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.ant.internal.ui.console;
12  
13 import org.eclipse.ant.internal.ui.launchConfigurations.TaskLinkManager;
14 import org.eclipse.debug.ui.console.IConsole;
15 import org.eclipse.debug.ui.console.IConsoleLineTrackerExtension;
16 import org.eclipse.jface.text.IRegion;
17
18 /**
19  * Processes task hyperlinks as lines are appended to the console
20  */

21 public class TaskLineTracker implements IConsoleLineTrackerExtension {
22     
23     private IConsole fConsole;
24
25     /**
26      * Constructor for TaskLineTracker.
27      */

28     public TaskLineTracker() {
29         super();
30     }
31
32     /**
33      * @see org.eclipse.debug.ui.console.IConsoleLineTracker#init(org.eclipse.debug.ui.console.IConsole)
34      */

35     public void init(IConsole console) {
36         fConsole = console;
37     }
38
39     /**
40      * @see org.eclipse.debug.ui.console.IConsoleLineTracker#lineAppended(org.eclipse.jface.text.IRegion)
41      */

42     public void lineAppended(IRegion line) {
43         TaskLinkManager.processNewLine(fConsole, line);
44     }
45
46     /**
47      * @see org.eclipse.debug.ui.console.IConsoleLineTracker#dispose()
48      */

49     public void dispose() {
50         fConsole = null;
51     }
52
53     /* (non-Javadoc)
54      * @see org.eclipse.debug.ui.console.IConsoleLineTrackerExtension#consoleClosed()
55      */

56     public void consoleClosed() {
57         TaskLinkManager.dispose(fConsole.getProcess());
58         AbstractJavacPatternMatcher.consoleClosed(fConsole.getProcess());
59     }
60 }
61
Popular Tags