Mercurial > projects > dwt-addons
diff dwtx/jface/text/source/projection/ProjectionSupport.d @ 134:51e6e63f930e
Regex fix for casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:46:20 +0200 |
parents | 7d818bd32d63 |
children | b6bad70d540a |
line wrap: on
line diff
--- a/dwtx/jface/text/source/projection/ProjectionSupport.d Sun Aug 24 01:29:22 2008 +0200 +++ b/dwtx/jface/text/source/projection/ProjectionSupport.d Sun Aug 24 01:46:20 2008 +0200 @@ -80,7 +80,7 @@ */ protected IAnnotationModel findAnnotationModel(ISourceViewer sourceViewer) { if (sourceViewer instanceof ProjectionViewer) { - ProjectionViewer projectionViewer= (ProjectionViewer) sourceViewer; + ProjectionViewer projectionViewer= cast(ProjectionViewer) sourceViewer; return projectionViewer.getProjectionAnnotationModel(); } return null; @@ -91,7 +91,7 @@ */ protected bool skip(Annotation annotation) { if (annotation instanceof ProjectionAnnotation) - return !((ProjectionAnnotation) annotation).isCollapsed(); + return !(cast(ProjectionAnnotation) annotation).isCollapsed(); return super.skip(annotation); } @@ -103,7 +103,7 @@ */ public void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color) { if (annotation instanceof ProjectionAnnotation) { - ProjectionAnnotation projectionAnnotation= (ProjectionAnnotation) annotation; + ProjectionAnnotation projectionAnnotation= cast(ProjectionAnnotation) annotation; if (projectionAnnotation.isCollapsed()) { if (gc !is null) { @@ -350,7 +350,7 @@ if (fSummarizableTypes !is null) { int size= fSummarizableTypes.size(); for (int i= 0; i < size; i++) - summary.addAnnotationType((String) fSummarizableTypes.get(i)); + summary.addAnnotationType(cast(String) fSummarizableTypes.get(i)); } return summary; } @@ -374,7 +374,7 @@ public Object getAdapter(ISourceViewer viewer, Class required) { if (ProjectionAnnotationModel.class.equals(required)) { if (viewer instanceof ProjectionViewer) { - ProjectionViewer projectionViewer= (ProjectionViewer) viewer; + ProjectionViewer projectionViewer= cast(ProjectionViewer) viewer; return projectionViewer.getProjectionAnnotationModel(); } }