Mercurial > projects > dwt-addons
diff dwtx/jface/text/ListLineTracker.d @ 158:25f1f92fa3df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 26 Aug 2008 02:46:34 +0200 |
parents | f70d9508c95c |
children | 7926b636c282 |
line wrap: on
line diff
--- a/dwtx/jface/text/ListLineTracker.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/ListLineTracker.d Tue Aug 26 02:46:34 2008 +0200 @@ -153,13 +153,10 @@ import dwtx.jface.text.ITextViewerExtension4; // packageimport import dwtx.jface.text.ITypedRegion; // packageimport - import dwt.dwthelper.utils; - import dwtx.dwtxhelper.Collection; - -import dwtx.jface.text.AbstractLineTracker.DelimiterInfo; +import dwtx.jface.text.AbstractLineTracker; /** * Abstract, read-only implementation of <code>ILineTracker</code>. It lets the definition of @@ -174,7 +171,7 @@ * <li> "a\nbc\n" -> [0,2], [2,3], [5,0] * </ul> * This class must be subclassed. - * + * * @since 3.2 */ abstract class ListLineTracker : ILineTracker { @@ -192,7 +189,7 @@ /** * Binary search for the line at a given offset. - * + * * @param offset the offset whose line should be found * @return the line of the offset */ @@ -234,7 +231,7 @@ /** * Returns the number of lines covered by the specified text range. - * + * * @param startLine the line where the text range starts * @param offset the start offset of the text range * @param length the length of the text range @@ -393,7 +390,7 @@ public final int computeNumberOfLines(String text) { int count= 0; int start= 0; - DelimiterInfo delimiterInfo= nextDelimiterInfo(text, start); + AbstractLineTracker.DelimiterInfo delimiterInfo= nextDelimiterInfo(text, start); while (delimiterInfo !is null && delimiterInfo.delimiterIndex > -1) { ++count; start= delimiterInfo.delimiterIndex + delimiterInfo.delimiterLength; @@ -424,17 +421,17 @@ /** * Returns the information about the first delimiter found in the given text starting at the * given offset. - * + * * @param text the text to be searched * @param offset the offset in the given text * @return the information of the first found delimiter or <code>null</code> */ - protected abstract DelimiterInfo nextDelimiterInfo(String text, int offset); + protected abstract AbstractLineTracker.DelimiterInfo nextDelimiterInfo(String text, int offset); /** * Creates the line structure for the given text. Newly created lines are inserted into the line * structure starting at the given position. Returns the number of newly created lines. - * + * * @param text the text for which to create a line structure * @param insertPosition the position at which the newly created lines are inserted into the * tracker's line structure @@ -445,7 +442,7 @@ int count= 0; int start= 0; - DelimiterInfo delimiterInfo= nextDelimiterInfo(text, 0); + AbstractLineTracker.DelimiterInfo delimiterInfo= nextDelimiterInfo(text, 0); while (delimiterInfo !is null && delimiterInfo.delimiterIndex > -1) { @@ -498,7 +495,7 @@ /** * Returns the internal data structure, a {@link List} of {@link Line}s. Used only by * {@link TreeLineTracker#TreeLineTracker(ListLineTracker)}. - * + * * @return the internal list of lines. */ final List getLines() {