Mercurial > projects > dwt-addons
comparison dwtx/jface/text/source/OverviewRulerHoverManager.d @ 134:51e6e63f930e
Regex fix for casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:46:20 +0200 |
parents | 7d818bd32d63 |
children | b6bad70d540a |
comparison
equal
deleted
inserted
replaced
133:7d818bd32d63 | 134:51e6e63f930e |
---|---|
122 int line= getVerticalRulerInfo().toDocumentLineNumber(location.y); | 122 int line= getVerticalRulerInfo().toDocumentLineNumber(location.y); |
123 IAnnotationHover hover= getAnnotationHover(); | 123 IAnnotationHover hover= getAnnotationHover(); |
124 | 124 |
125 IInformationControlCreator controlCreator= null; | 125 IInformationControlCreator controlCreator= null; |
126 if (hover instanceof IAnnotationHoverExtension) | 126 if (hover instanceof IAnnotationHoverExtension) |
127 controlCreator= ((IAnnotationHoverExtension)hover).getHoverControlCreator(); | 127 controlCreator= (cast(IAnnotationHoverExtension)hover).getHoverControlCreator(); |
128 setCustomInformationControlCreator(controlCreator); | 128 setCustomInformationControlCreator(controlCreator); |
129 | 129 |
130 setInformation(hover.getHoverInfo(getSourceViewer(), line), computeArea(location.y)); | 130 setInformation(hover.getHoverInfo(getSourceViewer(), line), computeArea(location.y)); |
131 } | 131 } |
132 | 132 |
136 * @param y y-coordinate in the vertical ruler | 136 * @param y y-coordinate in the vertical ruler |
137 * @return the graphical extend where the hover is valid | 137 * @return the graphical extend where the hover is valid |
138 */ | 138 */ |
139 private Rectangle computeArea(int y) { | 139 private Rectangle computeArea(int y) { |
140 // This is OK (see constructor) | 140 // This is OK (see constructor) |
141 IOverviewRuler overviewRuler= (IOverviewRuler) getVerticalRulerInfo(); | 141 IOverviewRuler overviewRuler= cast(IOverviewRuler) getVerticalRulerInfo(); |
142 | 142 |
143 int hover_height= overviewRuler.getAnnotationHeight(); | 143 int hover_height= overviewRuler.getAnnotationHeight(); |
144 int hover_width= getVerticalRulerInfo().getControl().getSize().x; | 144 int hover_width= getVerticalRulerInfo().getControl().getSize().x; |
145 | 145 |
146 // Calculate y-coordinate for hover | 146 // Calculate y-coordinate for hover |