comparison dwtx/jface/text/source/projection/ProjectionSummary.d @ 143:53b889547456

instanceof after &&
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 21:32:37 +0200
parents 893c017bcdc5
children f70d9508c95c
comparison
equal deleted inserted replaced
142:893c017bcdc5 143:53b889547456
172 172
173 try { 173 try {
174 174
175 175
176 IDocument document= fProjectionViewer.getDocument(); 176 IDocument document= fProjectionViewer.getDocument();
177 if ( cast(ISynchronizable)document && fAnnotationModel instanceof ISynchronizable) { 177 if ( cast(ISynchronizable)document && cast(ISynchronizable)fAnnotationModel ) {
178 ISynchronizable sync= cast(ISynchronizable) fAnnotationModel; 178 ISynchronizable sync= cast(ISynchronizable) fAnnotationModel;
179 previousLockObject= sync.getLockObject(); 179 previousLockObject= sync.getLockObject();
180 sync.setLockObject((cast(ISynchronizable) document).getLockObject()); 180 sync.setLockObject((cast(ISynchronizable) document).getLockObject());
181 } 181 }
182 182
318 } 318 }
319 } 319 }
320 320
321 private AnnotationBag findBagForType(Map bagMap, String annotationType) { 321 private AnnotationBag findBagForType(Map bagMap, String annotationType) {
322 AnnotationBag bag= cast(AnnotationBag) bagMap.get(annotationType); 322 AnnotationBag bag= cast(AnnotationBag) bagMap.get(annotationType);
323 if (bag is null && fAnnotationAccess instanceof IAnnotationAccessExtension) { 323 if (bag is null && cast(IAnnotationAccessExtension)fAnnotationAccess ) {
324 IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess; 324 IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
325 Object[] superTypes= extension.getSupertypes(annotationType); 325 Object[] superTypes= extension.getSupertypes(annotationType);
326 for (int i= 0; i < superTypes.length && bag is null; i++) { 326 for (int i= 0; i < superTypes.length && bag is null; i++) {
327 bag= cast(AnnotationBag) bagMap.get(superTypes[i]); 327 bag= cast(AnnotationBag) bagMap.get(superTypes[i]);
328 } 328 }