PR# 12650 Context menu does not detect start of feature or class

Problem Report Summary
Submitter: peter_gummer
Category: EiffelStudio
Priority: High
Date: 2007/05/08
Class: Bug
Severity: Serious
Number: 12650
Release: 6.0.6.8140
Confidential: No
Status: Closed
Responsible:
Environment: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Synopsis: Context menu does not detect start of feature or class

Description
In the editor, if the cursor is sitting immediately before the name of a feature or a class, when I hit the context menu key at the bottom right of the keyboard the menu contains no options relevant to the feature or class.

Yet if I do the same thing with the cursor immediately after the feature or class name, the context menu does contain relevant options. This is inconsistent. Why is there a difference depending on whether the cursor is immediately before or after?

Step 9 below demonstrates how inconsistent this is. Performing the same operation of hitting the context menu key, with no other action in between other than hitting the Esc key, produces different results!

The inconsistency doesn't end there. I have often been annoyed by the fact that Ctrl+F3 finds the current word if the cursor is at the start of the word, but not if the cursor is at the end of the word. (I haven't reported this before, because Visual Studio has exactly the same bug and I've sort of got used to it, although it still irritates me.) But note that this is exactly the opposite of the context menu.

(P.S. I love the context meu!)
To Reproduce
1. Open a compiled class in the EiffelStudio editor. FOR ALL SUBSEQUENT STEPS, DO NOT TOUCH THE MOUSE: USE THE KEYBOARD ONLY!

2. Using the arrow keys (not the mouse!), place the cursor immediately after a class in the text. For example (where vertical bar represents the cursor): BOOLEAN|

3. Hit the context menu key. THE WHOLE OF THE CLASS NAME IS HIGHLIGHTED, AND THE CONTEXT MENU CORRECTLY HAS OPTIONS RELEVANT TO THE CLASS.

4. Hit Esc. The context menu disappears.

5. Hit the left arrow. AT THIS POINT THERE IS A BUG: THE CURSOR IS NOW ACTUALLY ONE CHARACTER TO THE LEFT OF THE CLASS, BUT IT IS NOT VISIBLE.

6. Hit Alt+Tab to switch to another application. Then hit Alt+Tab again to switch back to EiffelStudio. The cursor is now visible. For example: | BOOLEAN

7. Hit the right arrow. The cursor is now immediately before the class. For example: |BOOLEAN

8. Hit the context menu key. THE CLASS NAME IS NOT HIGHLIGHTED, AND THE CONTEXT MENU WRONGLY HAS NO OPTIONS RELEVANT TO THE CLASS.

9. Repeat steps 2, 3 and 4. The whole of the class remains highlighted as before. Now hit the context menu key again. THE CONTEXT MENU HAS NO OPTIONS RELEVANT TO THE CLASS.
Problem Report Interactions
From:manus_eiffel    Date:2007/05/10    Status: Closed    Download   
This will be available in rev#68234.

From:manus_eiffel    Date:2007/05/09    Status: Analyzed    Download   
This will be fixed in the next release, including the search thing which works fine in VS 2005, so EiffelStudio needs to catch up.

From:peter_gummer    Date:2007/05/08    Download   
I forgot to mention how I noticed this, and it's important because it emphasises the inconsistency.

When you browse to a class or feature, EiffelStudio places the cursor at the start. If I then want to browse from there to, say, its Callers via the context menu, I have to pointlessly hit the right arrow key before hitting the context menu key. Annoying!