1 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 32 public String getPattern() { 33 return fExtension.getPattern(); 34 } 35 36 39 public int getCompilerFlags() { 40 return fExtension.getCompilerFlags(); 41 } 42 43 46 public void matchFound(PatternMatchEvent event) { 47 fDelegate.matchFound(event); 48 } 49 50 53 public void connect(TextConsole console) { 54 fDelegate.connect(console); 55 } 56 57 60 public void disconnect() { 61 fDelegate.disconnect(); 62 } 63 64 67 public String getLineQualifier() { 68 return fExtension.getQuickPattern(); 69 } 70 71 } 72 | Popular Tags |