comparison dwtx/jface/text/source/OverviewRuler.d @ 162:1a5b8f8129df

...
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 00:51:37 +0200
parents 7926b636c282
children
comparison
equal deleted inserted replaced
161:f8d52b926852 162:1a5b8f8129df
253 253
254 if (ignr && ( cast(AnnotationBag)next )) 254 if (ignr && ( cast(AnnotationBag)next ))
255 continue; 255 continue;
256 256
257 fNext= next; 257 fNext= next;
258 Object annotationType= next.getType(); 258 Object annotationType= stringcast(next.getType());
259 if (fType is null || fType.equals(annotationType) || !fConfiguredAnnotationTypes.contains(annotationType) && isSubtype(annotationType)) { 259 if (fType is null || fType.opEquals(annotationType) || !fConfiguredAnnotationTypes.contains(annotationType) && isSubtype(annotationType)) {
260 if (temp && pers) return; 260 if (temp && pers) return;
261 if (pers && next.isPersistent()) return; 261 if (pers && next.isPersistent()) return;
262 if (temp && !next.isPersistent()) return; 262 if (temp && !next.isPersistent()) return;
263 } 263 }
264 } 264 }
268 private bool isSubtype(Object annotationType) { 268 private bool isSubtype(Object annotationType) {
269 if ( cast(IAnnotationAccessExtension)fAnnotationAccess ) { 269 if ( cast(IAnnotationAccessExtension)fAnnotationAccess ) {
270 IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess; 270 IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
271 return extension.isSubtype(annotationType, fType); 271 return extension.isSubtype(annotationType, fType);
272 } 272 }
273 return fType.equals(annotationType); 273 return cast(bool) fType.opEquals(annotationType);
274 } 274 }
275 275
276 /* 276 /*
277 * @see Iterator#hasNext() 277 * @see Iterator#hasNext()
278 */ 278 */
1110 * @return <code>true</code> if annotation of the given type should be skipped 1110 * @return <code>true</code> if annotation of the given type should be skipped
1111 */ 1111 */
1112 private bool skip(Object annotationType) { 1112 private bool skip(Object annotationType) {
1113 return !contains(annotationType, fAllowedAnnotationTypes, fConfiguredAnnotationTypes); 1113 return !contains(annotationType, fAllowedAnnotationTypes, fConfiguredAnnotationTypes);
1114 } 1114 }
1115 private bool skip(String annotationType) {
1116 return !contains(stringcast(annotationType), fAllowedAnnotationTypes, fConfiguredAnnotationTypes);
1117 }
1115 1118
1116 /** 1119 /**
1117 * Returns whether the given annotation type should be skipped by the drawing routine of the header. 1120 * Returns whether the given annotation type should be skipped by the drawing routine of the header.
1118 * 1121 *
1119 * @param annotationType the annotation type 1122 * @param annotationType the annotation type
1426 } 1429 }
1427 } 1430 }
1428 1431
1429 if (annotationTypeLabel !is null) { 1432 if (annotationTypeLabel !is null) {
1430 if (overview.length() > 0) 1433 if (overview.length() > 0)
1431 overview += "\n"; //$NON-NLS-1$ 1434 overview ~= "\n"; //$NON-NLS-1$
1432 overview += JFaceTextMessages.getFormattedString("OverviewRulerHeader.toolTipTextEntry", annotationTypeLabel, new Integer(count) ); //$NON-NLS-1$ 1435 overview ~= JFaceTextMessages.getFormattedString("OverviewRulerHeader.toolTipTextEntry", stringcast(annotationTypeLabel), new Integer(count) ); //$NON-NLS-1$
1433 } 1436 }
1434 } 1437 }
1435 1438
1436 if (overview.length() > 0) 1439 if (overview.length() > 0)
1437 fHeader.setToolTipText(overview); 1440 fHeader.setToolTipText(overview);