/** * Adds the given pattern match listener to this console. The listener will * be connected and receive match notifications. Has no effect if an identical * listener has already been added. * * @param listener the listener to add */ public void addPatternMatchListener(IPatternMatchListener listener) { fPatternMatcher.addPatternMatchListener(listener); }
/** * Removes the given pattern match listener from this console. The listener will be * disconnected and will no longer receive match notifications. Has no effect * if the listener was not previously added. * * @param listener the pattern match listener to remove */ public void removePatternMatchListener(IPatternMatchListener listener) { fPatternMatcher.removePatternMatchListener(listener); }
/** * This console's partitioner should call this method when it is not expecting any new data * to be appended to the document. */ public void partitionerFinished() { fPatternMatcher.forceFinalMatching(); fPartitionerFinished = true; checkFinished(); }
/** * Constructs a console with the given name, image descriptor, and lifecycle * * @param name name to display for this console * @param consoleType console type identifier or <code>null</code> * @param imageDescriptor image to display for this console or <code>null</code> * @param autoLifecycle whether lifecycle methods should be called automatically * when this console is added/removed from the console manager */ public TextConsole(String name, String consoleType, ImageDescriptor imageDescriptor, boolean autoLifecycle) { super(name, consoleType, imageDescriptor, autoLifecycle); fDocument = new ConsoleDocument(); fDocument.addPositionCategory(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY); fPatternMatcher = new ConsolePatternMatcher(this); fDocument.addDocumentListener(fPatternMatcher); fTabWidth = IConsoleConstants.DEFAULT_TAB_SIZE; }
disconnect(); fConsole.matcherFinished(); } else if (fScheduleFinal) {
/** * This console's partitioner should call this method when it is not expecting any new data * to be appended to the document. */ public void partitionerFinished() { fPatternMatcher.forceFinalMatching(); fPartitionerFinished = true; checkFinished(); }
/** * Constructs a console with the given name, image descriptor, and lifecycle * * @param name name to display for this console * @param consoleType console type identifier or <code>null</code> * @param imageDescriptor image to display for this console or <code>null</code> * @param autoLifecycle whether lifecycle methods should be called automatically * when this console is added/removed from the console manager */ public TextConsole(String name, String consoleType, ImageDescriptor imageDescriptor, boolean autoLifecycle) { super(name, consoleType, imageDescriptor, autoLifecycle); fDocument = new ConsoleDocument(); fDocument.addPositionCategory(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY); fPatternMatcher = new ConsolePatternMatcher(this); fDocument.addDocumentListener(fPatternMatcher); fTabWidth = IConsoleConstants.DEFAULT_TAB_SIZE; }
disconnect(); fConsole.matcherFinished(); } else if (fScheduleFinal) {
/** * Adds the given pattern match listener to this console. The listener will * be connected and receive match notifications. Has no effect if an identical * listener has already been added. * * @param listener the listener to add */ public void addPatternMatchListener(IPatternMatchListener listener) { fPatternMatcher.addPatternMatchListener(listener); }
/** * Removes the given pattern match listener from this console. The listener will be * disconnected and will no longer receive match notifications. Has no effect * if the listener was not previously added. * * @param listener the pattern match listener to remove */ public void removePatternMatchListener(IPatternMatchListener listener) { fPatternMatcher.removePatternMatchListener(listener); }