Mercurial > projects > dwt-addons
comparison dwtx/jface/text/TextPresentation.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | 25f1f92fa3df |
children |
comparison
equal
deleted
inserted
replaced
161:f8d52b926852 | 162:1a5b8f8129df |
---|---|
59 import dwtx.jface.text.IRegion; // packageimport | 59 import dwtx.jface.text.IRegion; // packageimport |
60 import dwtx.jface.text.IInformationControlExtension2; // packageimport | 60 import dwtx.jface.text.IInformationControlExtension2; // packageimport |
61 import dwtx.jface.text.IDocumentExtension4; // packageimport | 61 import dwtx.jface.text.IDocumentExtension4; // packageimport |
62 import dwtx.jface.text.IDocumentExtension2; // packageimport | 62 import dwtx.jface.text.IDocumentExtension2; // packageimport |
63 import dwtx.jface.text.IDocumentPartitionerExtension2; // packageimport | 63 import dwtx.jface.text.IDocumentPartitionerExtension2; // packageimport |
64 import dwtx.jface.text.Assert; // packageimport | |
65 import dwtx.jface.text.DefaultInformationControl; // packageimport | 64 import dwtx.jface.text.DefaultInformationControl; // packageimport |
66 import dwtx.jface.text.IWidgetTokenOwnerExtension; // packageimport | 65 import dwtx.jface.text.IWidgetTokenOwnerExtension; // packageimport |
67 import dwtx.jface.text.DocumentClone; // packageimport | 66 import dwtx.jface.text.DocumentClone; // packageimport |
68 import dwtx.jface.text.DefaultUndoManager; // packageimport | 67 import dwtx.jface.text.DefaultUndoManager; // packageimport |
69 import dwtx.jface.text.IFindReplaceTarget; // packageimport | 68 import dwtx.jface.text.IFindReplaceTarget; // packageimport |
153 import dwtx.jface.text.ITextViewerExtension4; // packageimport | 152 import dwtx.jface.text.ITextViewerExtension4; // packageimport |
154 import dwtx.jface.text.ITypedRegion; // packageimport | 153 import dwtx.jface.text.ITypedRegion; // packageimport |
155 | 154 |
156 import dwt.dwthelper.utils; | 155 import dwt.dwthelper.utils; |
157 import dwtx.dwtxhelper.Collection; | 156 import dwtx.dwtxhelper.Collection; |
157 import tango.core.Exception; | |
158 | 158 |
159 import dwt.DWT; | 159 import dwt.DWT; |
160 import dwt.custom.StyleRange; | 160 import dwt.custom.StyleRange; |
161 import dwt.custom.StyledText; | 161 import dwt.custom.StyledText; |
162 import dwtx.core.runtime.Assert; | 162 import dwtx.core.runtime.Assert; |
237 public Object next() { | 237 public Object next() { |
238 try { | 238 try { |
239 StyleRange r= cast(StyleRange) fRanges.get(fIndex++); | 239 StyleRange r= cast(StyleRange) fRanges.get(fIndex++); |
240 return createWindowRelativeRange(fWindow, r); | 240 return createWindowRelativeRange(fWindow, r); |
241 } catch (ArrayIndexOutOfBoundsException x) { | 241 } catch (ArrayIndexOutOfBoundsException x) { |
242 throw new NoSuchElementException(); | 242 throw new NoSuchElementException(null); |
243 } finally { | 243 } finally { |
244 if (fSkipDefaults) | 244 if (fSkipDefaults) |
245 computeIndex(); | 245 computeIndex(); |
246 } | 246 } |
247 } | 247 } |
319 * @param sizeHint the expected size of this presentation | 319 * @param sizeHint the expected size of this presentation |
320 * @since 3.0 | 320 * @since 3.0 |
321 */ | 321 */ |
322 public this(IRegion extent, int sizeHint) { | 322 public this(IRegion extent, int sizeHint) { |
323 this(sizeHint); | 323 this(sizeHint); |
324 Assert.isNotNull(extent); | 324 Assert.isNotNull(cast(Object)extent); |
325 fExtent= extent; | 325 fExtent= extent; |
326 } | 326 } |
327 | 327 |
328 /** | 328 /** |
329 * Sets the result window for this presentation. When dealing with | 329 * Sets the result window for this presentation. When dealing with |
628 * @exception IllegalArgumentException if range is not a subrange of the presentation's default range | 628 * @exception IllegalArgumentException if range is not a subrange of the presentation's default range |
629 */ | 629 */ |
630 private void checkConsistency(StyleRange range) { | 630 private void checkConsistency(StyleRange range) { |
631 | 631 |
632 if (range is null) | 632 if (range is null) |
633 throw new IllegalArgumentException(); | 633 throw new IllegalArgumentException(null); |
634 | 634 |
635 if (fDefaultRange !is null) { | 635 if (fDefaultRange !is null) { |
636 | 636 |
637 if (range.start < fDefaultRange.start) | 637 if (range.start < fDefaultRange.start) |
638 range.start= fDefaultRange.start; | 638 range.start= fDefaultRange.start; |