diff options
author | Kevin Barnes | 2004-10-20 20:51:16 +0000 |
---|---|---|
committer | Kevin Barnes | 2004-10-20 20:51:16 +0000 |
commit | 8ba18bcceda03462d85d8b4e7bd1e12725a3a997 (patch) | |
tree | 8375a48fb6076f770129da32f1083ba3bf5cb19c /org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java | |
parent | 4833c814654d79ee09f531112900887ce52c6ce6 (diff) | |
download | eclipse.platform.debug-8ba18bcceda03462d85d8b4e7bd1e12725a3a997.tar.gz eclipse.platform.debug-8ba18bcceda03462d85d8b4e7bd1e12725a3a997.tar.xz eclipse.platform.debug-8ba18bcceda03462d85d8b4e7bd1e12725a3a997.zip |
Bug 76675 - Pattern Matching independent of IOConsole and IOConsolePartitioner
Diffstat (limited to 'org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java')
-rw-r--r-- | org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java new file mode 100644 index 000000000..826590cda --- /dev/null +++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java @@ -0,0 +1,116 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.ui.internal.console; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.BadPositionCategoryException; +import org.eclipse.jface.text.DefaultPositionUpdater; +import org.eclipse.jface.text.Document; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.Position; + +/** + * A console document. Requires synchronization for multi-threaded access. + */ +public class ConsoleDocument extends Document { + + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#get(int, int) + */ + public synchronized String get(int pos, int length) throws BadLocationException { + return super.get(pos, length); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getLength() + */ + public synchronized int getLength() { + return super.getLength(); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getLineDelimiter(int) + */ + public synchronized String getLineDelimiter(int line) throws BadLocationException { + return super.getLineDelimiter(line); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getLineInformation(int) + */ + public synchronized IRegion getLineInformation(int line) throws BadLocationException { + return super.getLineInformation(line); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getLineInformationOfOffset(int) + */ + public synchronized IRegion getLineInformationOfOffset(int offset) throws BadLocationException { + return super.getLineInformationOfOffset(offset); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getLineLength(int) + */ + public synchronized int getLineLength(int line) throws BadLocationException { + return super.getLineLength(line); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getLineOffset(int) + */ + public synchronized int getLineOffset(int line) throws BadLocationException { + return super.getLineOffset(line); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getLineOfOffset(int) + */ + public synchronized int getLineOfOffset(int pos) throws BadLocationException { + return super.getLineOfOffset(pos); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getNumberOfLines() + */ + public synchronized int getNumberOfLines() { + return super.getNumberOfLines(); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#replace(int, int, java.lang.String) + */ + public synchronized void replace(int pos, int length, String text) throws BadLocationException { + super.replace(pos, length, text); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#set(java.lang.String) + */ + public synchronized void set(String text) { + super.set(text); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.AbstractDocument#completeInitialization() + */ + protected void completeInitialization() { + super.completeInitialization(); + addPositionUpdater(new DefaultPositionUpdater(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY)); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#addPosition(java.lang.String, org.eclipse.jface.text.Position) + */ + public synchronized void addPosition(String category, Position position) throws BadLocationException, BadPositionCategoryException { + super.addPosition(category, position); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#removePosition(java.lang.String, org.eclipse.jface.text.Position) + */ + public synchronized void removePosition(String category, Position position) throws BadPositionCategoryException { + super.removePosition(category, position); + } + /* (non-Javadoc) + * @see org.eclipse.jface.text.IDocument#getPositions(java.lang.String) + */ + public synchronized Position[] getPositions(String category) throws BadPositionCategoryException { + return super.getPositions(category); + } +} |