Mercurial > projects > dwt-addons
comparison dwtx/jface/text/TextViewerHoverManager.d @ 138:b6bad70d540a
Regex instanceof changes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 02:26:23 +0200 |
parents | 65801ad2b265 |
children | 26688fec6d23 |
comparison
equal
deleted
inserted
replaced
137:25170b5a8951 | 138:b6bad70d540a |
---|---|
307 bool hasFinished= false; | 307 bool hasFinished= false; |
308 try { | 308 try { |
309 if (fThread !is null) { | 309 if (fThread !is null) { |
310 Object information; | 310 Object information; |
311 try { | 311 try { |
312 if (hover instanceof ITextHoverExtension2) | 312 if ( cast(ITextHoverExtension2)hover ) |
313 information= (cast(ITextHoverExtension2)hover).getHoverInfo2(fTextViewer, region); | 313 information= (cast(ITextHoverExtension2)hover).getHoverInfo2(fTextViewer, region); |
314 else | 314 else |
315 information= hover.getHoverInfo(fTextViewer, region); | 315 information= hover.getHoverInfo(fTextViewer, region); |
316 } catch (ArrayIndexOutOfBoundsException x) { | 316 } catch (ArrayIndexOutOfBoundsException x) { |
317 /* | 317 /* |
320 * computing the hover info (see bug 32848). | 320 * computing the hover info (see bug 32848). |
321 */ | 321 */ |
322 information= null; | 322 information= null; |
323 } | 323 } |
324 | 324 |
325 if (hover instanceof ITextHoverExtension) | 325 if ( cast(ITextHoverExtension)hover ) |
326 setCustomInformationControlCreator((cast(ITextHoverExtension) hover).getHoverControlCreator()); | 326 setCustomInformationControlCreator((cast(ITextHoverExtension) hover).getHoverControlCreator()); |
327 else | 327 else |
328 setCustomInformationControlCreator(null); | 328 setCustomInformationControlCreator(null); |
329 | 329 |
330 setInformation(information, area); | 330 setInformation(information, area); |
408 int widgetOffset= styledText.getOffsetAtLocation(new Point(x, y)); | 408 int widgetOffset= styledText.getOffsetAtLocation(new Point(x, y)); |
409 Point p= styledText.getLocationAtOffset(widgetOffset); | 409 Point p= styledText.getLocationAtOffset(widgetOffset); |
410 if (p.x > x) | 410 if (p.x > x) |
411 widgetOffset--; | 411 widgetOffset--; |
412 | 412 |
413 if (fTextViewer instanceof ITextViewerExtension5) { | 413 if ( cast(ITextViewerExtension5)fTextViewer ) { |
414 ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer; | 414 ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer; |
415 return extension.widgetOffset2ModelOffset(widgetOffset); | 415 return extension.widgetOffset2ModelOffset(widgetOffset); |
416 } | 416 } |
417 | 417 |
418 return widgetOffset + fTextViewer._getVisibleRegionOffset(); | 418 return widgetOffset + fTextViewer._getVisibleRegionOffset(); |