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

...
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 00:51:37 +0200
parents 25f1f92fa3df
children 862b05e0334a
comparison
equal deleted inserted replaced
161:f8d52b926852 162:1a5b8f8129df
102 private ProjectionViewer fProjectionViewer; 102 private ProjectionViewer fProjectionViewer;
103 private IAnnotationModel fAnnotationModel; 103 private IAnnotationModel fAnnotationModel;
104 private IAnnotationAccess fAnnotationAccess; 104 private IAnnotationAccess fAnnotationAccess;
105 private List fConfiguredAnnotationTypes; 105 private List fConfiguredAnnotationTypes;
106 106
107 private Object fLock= new Object(); 107 private Object fLock;
108 private IProgressMonitor fProgressMonitor; 108 private IProgressMonitor fProgressMonitor;
109 private /+volatile+/ Summarizer fSummarizer; 109 private /+volatile+/ Summarizer fSummarizer;
110 110
111 /** 111 /**
112 * Creates a new projection summary. 112 * Creates a new projection summary.
113 * 113 *
114 * @param projectionViewer the projection viewer 114 * @param projectionViewer the projection viewer
115 * @param annotationAccess the annotation access 115 * @param annotationAccess the annotation access
116 */ 116 */
117 public this(ProjectionViewer projectionViewer, IAnnotationAccess annotationAccess) { 117 public this(ProjectionViewer projectionViewer, IAnnotationAccess annotationAccess) {
118 super(); 118 // super();
119 fLock= new Object();
120
119 fProjectionViewer= projectionViewer; 121 fProjectionViewer= projectionViewer;
120 fAnnotationAccess= annotationAccess; 122 fAnnotationAccess= annotationAccess;
121 } 123 }
122 124
123 /** 125 /**
288 synchronized (fLock) { 290 synchronized (fLock) {
289 if (fConfiguredAnnotationTypes !is null) { 291 if (fConfiguredAnnotationTypes !is null) {
290 size= fConfiguredAnnotationTypes.size(); 292 size= fConfiguredAnnotationTypes.size();
291 map= new HashMap(); 293 map= new HashMap();
292 for (int i= 0; i < size; i++) { 294 for (int i= 0; i < size; i++) {
293 String type= cast(String) fConfiguredAnnotationTypes.get(i); 295 String type= stringcast( fConfiguredAnnotationTypes.get(i));
294 map.put(type, new AnnotationBag(type)); 296 map.put(type, new AnnotationBag(type));
295 } 297 }
296 } 298 }
297 } 299 }
298 300
322 324
323 private AnnotationBag findBagForType(Map bagMap, String annotationType) { 325 private AnnotationBag findBagForType(Map bagMap, String annotationType) {
324 AnnotationBag bag= cast(AnnotationBag) bagMap.get(annotationType); 326 AnnotationBag bag= cast(AnnotationBag) bagMap.get(annotationType);
325 if (bag is null && cast(IAnnotationAccessExtension)fAnnotationAccess ) { 327 if (bag is null && cast(IAnnotationAccessExtension)fAnnotationAccess ) {
326 IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess; 328 IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
327 Object[] superTypes= extension.getSupertypes(annotationType); 329 Object[] superTypes= extension.getSupertypes(stringcast(annotationType));
328 for (int i= 0; i < superTypes.length && bag is null; i++) { 330 for (int i= 0; i < superTypes.length && bag is null; i++) {
329 bag= cast(AnnotationBag) bagMap.get(superTypes[i]); 331 bag= cast(AnnotationBag) bagMap.get(superTypes[i]);
330 } 332 }
331 } 333 }
332 return bag; 334 return bag;