01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.console;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.ui.console.IPatternMatchListener;
14: import org.eclipse.ui.console.IPatternMatchListenerDelegate;
15: import org.eclipse.ui.console.PatternMatchEvent;
16: import org.eclipse.ui.console.TextConsole;
17:
18: public class PatternMatchListener implements IPatternMatchListener {
19:
20: private PatternMatchListenerExtension fExtension;
21: private IPatternMatchListenerDelegate fDelegate;
22:
23: public PatternMatchListener(PatternMatchListenerExtension extension)
24: 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 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 getLineQualifier() {
68: return fExtension.getQuickPattern();
69: }
70:
71: }
|