comparison dwtx/jface/text/source/AnnotationBarHoverManager.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
398 * @since 2.1 398 * @since 2.1
399 */ 399 */
400 public this(IVerticalRulerInfo rulerInfo, ISourceViewer sourceViewer, IAnnotationHover annotationHover, IInformationControlCreator creator) { 400 public this(IVerticalRulerInfo rulerInfo, ISourceViewer sourceViewer, IAnnotationHover annotationHover, IInformationControlCreator creator) {
401 super(creator); 401 super(creator);
402 402
403 Assert.isNotNull(sourceViewer); 403 Assert.isNotNull(cast(Object)sourceViewer);
404 404
405 fSourceViewer= sourceViewer; 405 fSourceViewer= sourceViewer;
406 fVerticalRulerInfo= rulerInfo; 406 fVerticalRulerInfo= rulerInfo;
407 fAnnotationHover= annotationHover; 407 fAnnotationHover= annotationHover;
408 408
417 protected void computeInformation() { 417 protected void computeInformation() {
418 fAllowMouseExit= false; 418 fAllowMouseExit= false;
419 MouseEvent event= getHoverEvent(); 419 MouseEvent event= getHoverEvent();
420 IAnnotationHover hover= getHover(event); 420 IAnnotationHover hover= getHover(event);
421 if (hover is null) { 421 if (hover is null) {
422 setInformation(null, null); 422 setInformation(cast(Object)null, null);
423 return; 423 return;
424 } 424 }
425 425
426 int line= getHoverLine(event); 426 int line= getHoverLine(event);
427 427
431 setCustomInformationControlCreator(extension.getHoverControlCreator()); 431 setCustomInformationControlCreator(extension.getHoverControlCreator());
432 range= adaptLineRange(range, line); 432 range= adaptLineRange(range, line);
433 if (range !is null) 433 if (range !is null)
434 setInformation(extension.getHoverInfo(fSourceViewer, range, computeNumberOfVisibleLines()), computeArea(range)); 434 setInformation(extension.getHoverInfo(fSourceViewer, range, computeNumberOfVisibleLines()), computeArea(range));
435 else 435 else
436 setInformation(null, null); 436 setInformation(cast(Object)null, null);
437 437
438 } else { 438 } else {
439 setCustomInformationControlCreator(null); 439 setCustomInformationControlCreator(null);
440 setInformation(hover.getHoverInfo(fSourceViewer, line), computeArea(line)); 440 setInformation(hover.getHoverInfo(fSourceViewer, line), computeArea(line));
441 } 441 }
813 * @nooverride This method is not intended to be re-implemented or extended by clients. 813 * @nooverride This method is not intended to be re-implemented or extended by clients.
814 */ 814 */
815 public InternalAccessor getInternalAccessor() { 815 public InternalAccessor getInternalAccessor() {
816 return new class() InternalAccessor { 816 return new class() InternalAccessor {
817 public IInformationControl getCurrentInformationControl() { 817 public IInformationControl getCurrentInformationControl() {
818 return outer.superGetInternalAccessor().getCurrentInformationControl(); 818 return this.outer.superGetInternalAccessor().getCurrentInformationControl();
819 } 819 }
820 820
821 public void setInformationControlReplacer(InformationControlReplacer replacer) { 821 public void setInformationControlReplacer(InformationControlReplacer replacer) {
822 outer.superGetInternalAccessor().setInformationControlReplacer(replacer); 822 this.outer.superGetInternalAccessor().setInformationControlReplacer(replacer);
823 } 823 }
824 824
825 public InformationControlReplacer getInformationControlReplacer() { 825 public InformationControlReplacer getInformationControlReplacer() {
826 return outer.superGetInternalAccessor().getInformationControlReplacer(); 826 return this.outer.superGetInternalAccessor().getInformationControlReplacer();
827 } 827 }
828 828
829 public bool canReplace(IInformationControl control) { 829 public bool canReplace(IInformationControl control) {
830 return outer.superGetInternalAccessor().canReplace(control); 830 return this.outer.superGetInternalAccessor().canReplace(control);
831 } 831 }
832 832
833 public bool isReplaceInProgress() { 833 public bool isReplaceInProgress() {
834 return outer.superGetInternalAccessor().isReplaceInProgress(); 834 return this.outer.superGetInternalAccessor().isReplaceInProgress();
835 } 835 }
836 836
837 public void replaceInformationControl(bool takeFocus) { 837 public void replaceInformationControl(bool takeFocus) {
838 outer.superGetInternalAccessor().replaceInformationControl(takeFocus); 838 this.outer.superGetInternalAccessor().replaceInformationControl(takeFocus);
839 } 839 }
840 840
841 public void cropToClosestMonitor(Rectangle bounds) { 841 public void cropToClosestMonitor(Rectangle bounds) {
842 outer.superGetInternalAccessor().cropToClosestMonitor(bounds); 842 this.outer.superGetInternalAccessor().cropToClosestMonitor(bounds);
843 } 843 }
844 844
845 public void setHoverEnrichMode(ITextViewerExtension8_EnrichMode mode) { 845 public void setHoverEnrichMode(ITextViewerExtension8_EnrichMode mode) {
846 outer.superGetInternalAccessor().setHoverEnrichMode(mode); 846 this.outer.superGetInternalAccessor().setHoverEnrichMode(mode);
847 } 847 }
848 848
849 public bool getAllowMouseExit() { 849 public bool getAllowMouseExit() {
850 return fAllowMouseExit; 850 return fAllowMouseExit;
851 } 851 }