Mercurial > projects > dwt-addons
comparison dwtx/jface/text/revisions/RevisionRange.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | 3678e4f1a766 |
children |
comparison
equal
deleted
inserted
replaced
161:f8d52b926852 | 162:1a5b8f8129df |
---|---|
19 import dwtx.jface.text.revisions.RevisionInformation; // packageimport | 19 import dwtx.jface.text.revisions.RevisionInformation; // packageimport |
20 import dwtx.jface.text.revisions.Revision; // packageimport | 20 import dwtx.jface.text.revisions.Revision; // packageimport |
21 | 21 |
22 | 22 |
23 import dwt.dwthelper.utils; | 23 import dwt.dwthelper.utils; |
24 | 24 import tango.text.convert.Format; |
25 | 25 |
26 import dwtx.core.runtime.Assert; | 26 import dwtx.core.runtime.Assert; |
27 import dwtx.jface.text.source.ILineRange; | 27 import dwtx.jface.text.source.ILineRange; |
28 | 28 |
29 | 29 |
30 /** | 30 /** |
31 * An unmodifiable line range that belongs to a {@link Revision}. | 31 * An unmodifiable line range that belongs to a {@link Revision}. |
32 * | 32 * |
33 * @since 3.3 | 33 * @since 3.3 |
34 * @noinstantiate This class is not intended to be instantiated by clients. | 34 * @noinstantiate This class is not intended to be instantiated by clients. |
35 */ | 35 */ |
36 public final class RevisionRange : ILineRange { | 36 public final class RevisionRange : ILineRange { |
37 private const Revision fRevision; | 37 private const Revision fRevision; |
45 fNumberOfLines= range.getNumberOfLines(); | 45 fNumberOfLines= range.getNumberOfLines(); |
46 } | 46 } |
47 | 47 |
48 /** | 48 /** |
49 * Returns the revision that this range belongs to. | 49 * Returns the revision that this range belongs to. |
50 * | 50 * |
51 * @return the revision that this range belongs to | 51 * @return the revision that this range belongs to |
52 */ | 52 */ |
53 public Revision getRevision() { | 53 public Revision getRevision() { |
54 return fRevision; | 54 return fRevision; |
55 } | 55 } |
70 | 70 |
71 /* | 71 /* |
72 * @see java.lang.Object#toString() | 72 * @see java.lang.Object#toString() |
73 */ | 73 */ |
74 public override String toString() { | 74 public override String toString() { |
75 return "RevisionRange [" + fRevision.toString() + ", [" + getStartLine() + "+" + getNumberOfLines() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ | 75 return Format("RevisionRange [{}, [{}+{})]", fRevision.toString(), getStartLine(), getNumberOfLines()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
76 } | 76 } |
77 } | 77 } |