KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > console > PatternMatchListener


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.ui.internal.console;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.ui.console.IPatternMatchListener;
15 import org.eclipse.ui.console.IPatternMatchListenerDelegate;
16 import org.eclipse.ui.console.PatternMatchEvent;
17 import org.eclipse.ui.console.TextConsole;
18
19 public class PatternMatchListener implements IPatternMatchListener {
20
21     private PatternMatchListenerExtension fExtension;
22     private IPatternMatchListenerDelegate fDelegate;
23     
24     public PatternMatchListener(PatternMatchListenerExtension extension) throws CoreException {
25         fExtension = extension;
26         fDelegate = fExtension.createDelegate();
27     }
28
29     /* (non-Javadoc)
30      * @see org.eclipse.ui.console.IPatternMatchListener#getPattern()
31      */

32     public String JavaDoc getPattern() {
33         return fExtension.getPattern();
34     }
35
36     /* (non-Javadoc)
37      * @see org.eclipse.ui.console.IPatternMatchListener#getCompilerFlags()
38      */

39     public int getCompilerFlags() {
40         return fExtension.getCompilerFlags();
41     }
42     
43     /* (non-Javadoc)
44      * @see org.eclipse.ui.console.IPatternMatchListener#matchFound(org.eclipse.ui.console.PatternMatchEvent)
45      */

46     public void matchFound(PatternMatchEvent event) {
47         fDelegate.matchFound(event);
48     }
49     
50     /* (non-Javadoc)
51      * @see org.eclipse.ui.console.IPatternMatchListenerDelegate#connect(org.eclipse.ui.console.TextConsole)
52      */

53     public void connect(TextConsole console) {
54         fDelegate.connect(console);
55     }
56
57     /* (non-Javadoc)
58      * @see org.eclipse.ui.console.IPatternMatchListener#disconnect()
59      */

60     public void disconnect() {
61         fDelegate.disconnect();
62     }
63
64     /* (non-Javadoc)
65      * @see org.eclipse.ui.console.IPatternMatchListener#getQuickPattern()
66      */

67     public String JavaDoc getLineQualifier() {
68         return fExtension.getQuickPattern();
69     }
70
71 }
72
Popular Tags