Mercurial > projects > dwt-addons
comparison dwtx/jface/text/source/LineChangeHover.d @ 134:51e6e63f930e
Regex fix for casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:46:20 +0200 |
parents | c4fb132a086c |
children | 65801ad2b265 |
comparison
equal
deleted
inserted
replaced
133:7d818bd32d63 | 134:51e6e63f930e |
---|---|
183 * added controls how many lines are added - added lines are | 183 * added controls how many lines are added - added lines are |
184 */ | 184 */ |
185 String text= ""; //$NON-NLS-1$ | 185 String text= ""; //$NON-NLS-1$ |
186 int added= 0; | 186 int added= 0; |
187 for (Iterator it= diffInfos.iterator(); it.hasNext();) { | 187 for (Iterator it= diffInfos.iterator(); it.hasNext();) { |
188 ILineDiffInfo info= (ILineDiffInfo)it.next(); | 188 ILineDiffInfo info= cast(ILineDiffInfo)it.next(); |
189 String[] original= info.getOriginalText(); | 189 String[] original= info.getOriginalText(); |
190 int type= info.getChangeType(); | 190 int type= info.getChangeType(); |
191 int i= 0; | 191 int i= 0; |
192 if (type is ILineDiffInfo.ADDED) | 192 if (type is ILineDiffInfo.ADDED) |
193 added++; | 193 added++; |
238 | 238 |
239 if (model is null) | 239 if (model is null) |
240 return null; | 240 return null; |
241 | 241 |
242 if (model instanceof IAnnotationModelExtension) { | 242 if (model instanceof IAnnotationModelExtension) { |
243 IAnnotationModel diffModel= ((IAnnotationModelExtension)model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID); | 243 IAnnotationModel diffModel= (cast(IAnnotationModelExtension)model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID); |
244 if (diffModel !is null) | 244 if (diffModel !is null) |
245 model= diffModel; | 245 model= diffModel; |
246 } | 246 } |
247 if (model instanceof ILineDiffer) { | 247 if (model instanceof ILineDiffer) { |
248 if (model instanceof ILineDifferExtension2 && ((ILineDifferExtension2)model).isSuspended()) | 248 if (model instanceof ILineDifferExtension2 && (cast(ILineDifferExtension2)model).isSuspended()) |
249 return null; | 249 return null; |
250 return (ILineDiffer)model; | 250 return cast(ILineDiffer)model; |
251 } | 251 } |
252 return null; | 252 return null; |
253 } | 253 } |
254 | 254 |
255 /** | 255 /** |
386 * @since 3.2 | 386 * @since 3.2 |
387 */ | 387 */ |
388 public IInformationControlCreator getInformationPresenterControlCreator() { | 388 public IInformationControlCreator getInformationPresenterControlCreator() { |
389 return new IInformationControlCreator() { | 389 return new IInformationControlCreator() { |
390 public IInformationControl createInformationControl(Shell parent) { | 390 public IInformationControl createInformationControl(Shell parent) { |
391 return new DefaultInformationControl(parent, (ToolBarManager)null, null); | 391 return new DefaultInformationControl(parent, cast(ToolBarManager)null, null); |
392 } | 392 } |
393 }; | 393 }; |
394 } | 394 } |
395 } | 395 } |