PR# 11064 Pick and drop qualified feature into Watch window does not quite work

Problem Report Summary
Submitter: peter_gummer
Category: EiffelStudio
Priority: Medium
Date: 2006/08/23
Class: Bug
Severity: Non-critical
Number: 11064
Release: 5.7.62804
Confidential: No
Status: Closed
Responsible: jfiat_es
Environment: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Synopsis: Pick and drop qualified feature into Watch window does not quite work

Description
The steps below pick a qualified feature and drop it into the Watch window.
 
On dropping it, the "New Expression" dialog opens, but the Expression field contains only the feature name, unqualified.
To Reproduce
1. Debug a project and stop in a routine that uses a qualified feature (say, a.f).
 
2. Select 'a.f'.

3. Pick it by right-clicking on 'f'. NOTE THAT THIS DESELECTS 'a.f', SO ONLY 'f' IS SELECTED. This is probably the cause of the problem.
 
4. Drop it into the Watch window grid. The "New Expression" dialog contains only 'f'.
Problem Report Interactions
From:peter_gummer    Date:2009/08/14    Download   
Thanks, Jocelyn. This is something I've wished for on several occasions since I reported the problem, so I look forward to seeing the solution. It may be a month or two before I'm ready to try 6.5, however, and I won't really know if I like your solution until I see it.

From:jfiat_es    Date:2009/08/14    Status: Closed    Download   
This issue had been addressed in revision rev#80279 and will be available in version 6.5 .
Now, there is a context menu "Add Selection To" -> watch tools ..


About the fact that "dropping 'f' into the Watch window should not be allowed. The way it is now it just looks like a bug."

I partly agree, if the expression were created right away, I would agree, but how it is done, opening the new expression dialog, this behavior can be useful, in your case, drop the `f' ... then in the text field, you can prepend with "a."

When the `f' is a long feature name, this is appreciated.

So I close this issue. Feel free to reopen if you disagree.


From:manus_eiffel    Date:2007/06/06    Download   
You never pick and drop `a.f' but either `a' or `f'. They are both features. In both cases, they come with the class that defined the feature. So when dropping `f' in the context tool or the watch tool, we receive the same information a class and a feature. We actually don't know that it is a qualified call or not.

I guess in future releases, one could select the text, then the context menu can have an entry to send the selected text into the watch tool.

From:peter_gummer    Date:2006/08/31    Download   
What is the use of being able to pick and drop 'f' into the Watch window, then, without the full expression 'a.f'?

I also don't really understand your explanation about why it doesn't work. If I pick 'a.f' in the Editor and then drop it into the Context tool, it correctly targets the Context tool: it doesn't stupidly ignore the 'a.' and throw up an error.

I realise that in the case of dropping 'a.f' into the Context tool we are talking about a class+feature, whereas in the case of dropping 'a.f' into the Watch window we are talking about an object+feature, so I can see why there may be a technical difficulty. But from the point of view of an end-user, it just seems inconsistent.

At the very least, dropping 'f' into the Watch window should not be allowed. The way it is now it just looks like a bug.

From:jfiat_es    Date:2006/08/23    Status: Analyzed    Download   
This is indeed the expected behavior.
The pick and drop mecanism of the EiffelStudio's editor is not "transporting" the qualified call but only the class or feature stone. (And more generally the Pick and drop mecanism of the editor does not take into account the selected text, but only the pointed token)

That's is to say, when you pick 'f' from 'a.f', the pebble (stone) contains a few information including class data of f, and feature data of 'f'.
When you drop this 'f' pebble into the context tool for instance, it will open the feature tool on routine 'f', the same occurs with the watch tool.

If you want to add the selected text as expression, you must select your text 'a.f' and left click on the 'Create a new expression' button of the watch tool.