@@ -157,7 +157,7 @@ protected Point computeMenuLocation(Tree tree) {
157157 Rectangle bounds = items [0 ].getBounds ();
158158 Rectangle intersect = clientArea .intersection (bounds );
159159 if (intersect != null && intersect .height == bounds .height ) {
160- return new Point (Math .max (0 , bounds .x + getAverageCharWith (tree ) * CHAR_INDENT ),
160+ return new Point (Math .max (0 , bounds .x + getAverageCharWidth (tree ) * CHAR_INDENT ),
161161 bounds .y + bounds .height );
162162 }
163163 return null ;
@@ -171,7 +171,7 @@ protected Point computeMenuLocation(Tree tree) {
171171 Point result = findBestLocation (getIncludedPositions (rectangles , clientArea ),
172172 tree .toControl (cursorLocation ));
173173 if (result != null ) {
174- result .x = result .x + getAverageCharWith (tree ) * CHAR_INDENT ;
174+ result .x = result .x + getAverageCharWidth (tree ) * CHAR_INDENT ;
175175 }
176176 return result ;
177177 }
@@ -198,7 +198,7 @@ protected Point computeMenuLocation(Table table) {
198198 Rectangle iBounds = items [0 ].getImageBounds (0 );
199199 Rectangle intersect = clientArea .intersection (bounds );
200200 if (intersect != null && intersect .height == bounds .height ) {
201- return new Point (Math .max (0 , bounds .x + iBounds .width + getAverageCharWith (table ) * CHAR_INDENT ),
201+ return new Point (Math .max (0 , bounds .x + iBounds .width + getAverageCharWidth (table ) * CHAR_INDENT ),
202202 bounds .y + bounds .height );
203203 }
204204 return null ;
@@ -214,7 +214,7 @@ protected Point computeMenuLocation(Table table) {
214214 Point result = findBestLocation (getIncludedPositions (rectangles , clientArea ),
215215 table .toControl (cursorLocation ));
216216 if (result != null ) {
217- result .x = result .x + iBounds .width + getAverageCharWith (table ) * CHAR_INDENT ;
217+ result .x = result .x + iBounds .width + getAverageCharWidth (table ) * CHAR_INDENT ;
218218 }
219219 return result ;
220220 }
@@ -257,7 +257,7 @@ private Point findBestLocation(Point[] points, Point relativeCursor) {
257257 return result ;
258258 }
259259
260- private int getAverageCharWith (Control control ) {
260+ private int getAverageCharWidth (Control control ) {
261261 GC gc = null ;
262262 try {
263263 gc = new GC (control );
0 commit comments