Mercurial > projects > dwt-addons
comparison dwtx/jface/text/TreeLineTracker.d @ 133:7d818bd32d63
Fix ctors to this with gvim regexp
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:29:22 +0200 |
parents | c4fb132a086c |
children | 51e6e63f930e |
comparison
equal
deleted
inserted
replaced
132:77bd3bb3d7b8 | 133:7d818bd32d63 |
---|---|
234 * A node represents one line. Its character and line offsets are 0-based and relative to the | 234 * A node represents one line. Its character and line offsets are 0-based and relative to the |
235 * subtree covered by the node. All nodes under the left subtree represent lines before, all | 235 * subtree covered by the node. All nodes under the left subtree represent lines before, all |
236 * nodes under the right subtree lines after the current node. | 236 * nodes under the right subtree lines after the current node. |
237 */ | 237 */ |
238 private static final class Node { | 238 private static final class Node { |
239 Node(int length, String delimiter) { | 239 this(int length, String delimiter) { |
240 this.length= length; | 240 this.length= length; |
241 this.delimiter= delimiter; | 241 this.delimiter= delimiter; |
242 } | 242 } |
243 /** | 243 /** |
244 * The line index in this node's line tree, or equivalently, the number of lines in the left | 244 * The line index in this node's line tree, or equivalently, the number of lines in the left |
306 private Node fRoot= new Node(0, NO_DELIM); | 306 private Node fRoot= new Node(0, NO_DELIM); |
307 | 307 |
308 /** | 308 /** |
309 * Creates a new line tracker. | 309 * Creates a new line tracker. |
310 */ | 310 */ |
311 protected TreeLineTracker() { | 311 protected this() { |
312 } | 312 } |
313 | 313 |
314 /** | 314 /** |
315 * Package visible constructor for creating a tree tracker from a list tracker. | 315 * Package visible constructor for creating a tree tracker from a list tracker. |
316 * | 316 * |
317 * @param tracker | 317 * @param tracker |
318 */ | 318 */ |
319 TreeLineTracker(ListLineTracker tracker) { | 319 this(ListLineTracker tracker) { |
320 final List lines= tracker.getLines(); | 320 final List lines= tracker.getLines(); |
321 final int n= lines.size(); | 321 final int n= lines.size(); |
322 if (n is 0) | 322 if (n is 0) |
323 return; | 323 return; |
324 | 324 |