comparison dwtx/jface/internal/text/source/DiffPainter.d @ 138:b6bad70d540a

Regex instanceof changes
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 02:26:23 +0200
parents 65801ad2b265
children 75302ef3f92f
comparison
equal deleted inserted replaced
137:25170b5a8951 138:b6bad70d540a
339 * @param model the annotation model, possibly <code>null</code> 339 * @param model the annotation model, possibly <code>null</code>
340 * @see IVerticalRulerColumn#setModel(IAnnotationModel) 340 * @see IVerticalRulerColumn#setModel(IAnnotationModel)
341 */ 341 */
342 public void setModel(IAnnotationModel model) { 342 public void setModel(IAnnotationModel model) {
343 IAnnotationModel newModel; 343 IAnnotationModel newModel;
344 if (model instanceof IAnnotationModelExtension) 344 if ( cast(IAnnotationModelExtension)model )
345 newModel= (cast(IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID); 345 newModel= (cast(IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
346 else 346 else
347 newModel= model; 347 newModel= model;
348 348
349 setDiffer(newModel); 349 setDiffer(newModel);
353 * Sets the line differ. 353 * Sets the line differ.
354 * 354 *
355 * @param differ the line differ 355 * @param differ the line differ
356 */ 356 */
357 private void setDiffer(IAnnotationModel differ) { 357 private void setDiffer(IAnnotationModel differ) {
358 if (differ instanceof ILineDiffer) { 358 if ( cast(ILineDiffer)differ ) {
359 if (fLineDiffer !is differ) { 359 if (fLineDiffer !is differ) {
360 if (fLineDiffer !is null) 360 if (fLineDiffer !is null)
361 (cast(IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener); 361 (cast(IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
362 fLineDiffer= cast(ILineDiffer) differ; 362 fLineDiffer= cast(ILineDiffer) differ;
363 if (fLineDiffer !is null) 363 if (fLineDiffer !is null)
528 * 528 *
529 * @return <code>true</code> if diff information is being displayed, <code>false</code> otherwise 529 * @return <code>true</code> if diff information is being displayed, <code>false</code> otherwise
530 * @since 3.3 530 * @since 3.3
531 */ 531 */
532 public bool hasInformation() { 532 public bool hasInformation() {
533 if (fLineDiffer instanceof ILineDifferExtension2) 533 if ( cast(ILineDifferExtension2)fLineDiffer )
534 return !(cast(ILineDifferExtension2) fLineDiffer).isSuspended(); 534 return !(cast(ILineDifferExtension2) fLineDiffer).isSuspended();
535 return fLineDiffer !is null; 535 return fLineDiffer !is null;
536 } 536 }
537 537
538 } 538 }