MessageBrowser labelling improved

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

MessageBrowser labelling improved

timrowledge
Something that has irritated me for ages has finally driven me to bang on it and make things a smidge less annoying.

When you open a message browser (with an 'implementors of' for example) it normally starts up with a perfectly reasonable looking label; like 'Senders of add:rn:imm:ror: (4)' in my image today. Click on one of the listed methods and the label gets changed to the less helpful 'senders of add:'. Sigh.

What happens is that the message name passed to the tool building gets 'processed' and a multi-argument keyword gets truncated to the first part of the message - hence #add:rn:imm:ror: -> #add:. This seems to have been done to allow the auto-select to try to find the first instance of the relevant message in the code. However, several layers of changes over the years appear to have combined to make things a bit more complex than necessary and a couple of simple changes can make the window label more consistent.

Instead of keeping an array of pre-processed message names we can keep the entire thing. When the method is selected and the text view updated it can be passed a processed message name. That way the window label that is derived from the message can stay 'correct'. There is still one weirdness that I can't be fussed with today, where the window label when nothing is selected become e.g. 'Senders of add:rn:imm:ror: (4)'. I can see that having the number of instances attached might be interesting but it becomes a bit pointless as soon as you use the message tracing to add in some senders or implementors - now there are more than the original number!

We could - should - improve the way the message is found and selected in the text view. Right now it is a trivial string search for the first case of the shortened selector. We do better than this in the debugger, so maybe someone might like to try using the same tricks to highlight the first case of the full message, which would have the nice extra bonus of not 'finding' in the comments.

The attached changeset seems to do the job but I've been wrong before and might have missed something.



tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: DNPG: Do Not Pass Go





MessageBowserLabelling.1.cs (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: MessageBrowser labelling improved

marcel.taeumel
Hi Tim.

+1 with the little addition in #autoSelectString as described in the attached change set.

Best,
Marcel

Am 24.11.2019 02:48:28 schrieb tim Rowledge <[hidden email]>:

Something that has irritated me for ages has finally driven me to bang on it and make things a smidge less annoying.

When you open a message browser (with an 'implementors of' for example) it normally starts up with a perfectly reasonable looking label; like 'Senders of add:rn:imm:ror: (4)' in my image today. Click on one of the listed methods and the label gets changed to the less helpful 'senders of add:'. Sigh.

What happens is that the message name passed to the tool building gets 'processed' and a multi-argument keyword gets truncated to the first part of the message - hence #add:rn:imm:ror: -> #add:. This seems to have been done to allow the auto-select to try to find the first instance of the relevant message in the code. However, several layers of changes over the years appear to have combined to make things a bit more complex than necessary and a couple of simple changes can make the window label more consistent.

Instead of keeping an array of pre-processed message names we can keep the entire thing. When the method is selected and the text view updated it can be passed a processed message name. That way the window label that is derived from the message can stay 'correct'. There is still one weirdness that I can't be fussed with today, where the window label when nothing is selected become e.g. 'Senders of add:rn:imm:ror: (4)'. I can see that having the number of instances attached might be interesting but it becomes a bit pointless as soon as you use the message tracing to add in some senders or implementors - now there are more than the original number!

We could - should - improve the way the message is found and selected in the text view. Right now it is a trivial string search for the first case of the shortened selector. We do better than this in the debugger, so maybe someone might like to try using the same tricks to highlight the first case of the full message, which would have the nice extra bonus of not 'finding' in the comments.

The attached changeset seems to do the job but I've been wrong before and might have missed something.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: DNPG: Do Not Pass Go






MessageBowserLabelling.2.cs (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: MessageBrowser labelling improved

timrowledge


> On 2019-11-25, at 12:32 AM, Marcel Taeumel <[hidden email]> wrote:
>
> Hi Tim.
>
> +1 with the little addition in #autoSelectString as described in the attached change set.

OK; that means I can drop the fiddling with the autoSelectStrings in MessageTrace>>#messageListIndex: and keep it in one place. Nice.

Does anyone have any objections to this?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: EFBI: Emulate Five-volt Battery Intermittently



Reply | Threaded
Open this post in threaded view
|

Re: MessageBrowser labelling improved

Chris Muller-3
HI Tim, this has been a compromise / bug since the beginning, I didn't review it (on a short vacation right now), but just wanted to say thanks for fixing it.

On Mon, Nov 25, 2019 at 5:31 PM tim Rowledge <[hidden email]> wrote:


> On 2019-11-25, at 12:32 AM, Marcel Taeumel <[hidden email]> wrote:
>
> Hi Tim.
>
> +1 with the little addition in #autoSelectString as described in the attached change set.

OK; that means I can drop the fiddling with the autoSelectStrings in MessageTrace>>#messageListIndex: and keep it in one place. Nice.

Does anyone have any objections to this?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: EFBI: Emulate Five-volt Battery Intermittently