Issue 4821 in pharo: Fixing changedMessageList to adapt to MessageList use (vs MessageSet R.I.P.)

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

Issue 4821 in pharo: Fixing changedMessageList to adapt to MessageList use (vs MessageSet R.I.P.)

pharo
Status: Accepted
Owner: [hidden email]
Labels: Milestone-1.4

New issue 4821 by [hidden email]: Fixing changedMessageList to adapt  
to MessageList use (vs MessageSet R.I.P.)
http://code.google.com/p/pharo/issues/detail?id=4821

Stef,

On 17 Sep 2011, at 13:41, Stéphane Ducasse wrote:

Veronica

I did the following:
        - compute and store the category since the changeRecord does not have it.

storing the category is not needed since you set the ring method asActive

        - turn the RGMethodDefinition asActive so that the FlatBrowser can display  
the source of the method

It will always get it from the compiled method.


To see that in action:
        changeSorter open
                browse changeset (b)

This part is tricky, I was clicking on the contextual menu of the  
changeSorter  on "Browse Change Set (B)"  and you get a different browser  
where no protocol is displayed.
I assume this should open the FlatBrowser, right? to me it looks like older  
behavior


I cleaned a bit the code (specially those ugly local variables):

changedMessageList
        "Used by a message set browser to access the list view information."

        | messageList |
        messageList := OrderedCollection new.
        changeRecords associationsDo: [:clAssoc | | className classIsMeta |
                className := clAssoc key asSymbol.
                classIsMeta := (className findTokens: ' ') size > 1.

                (clAssoc value allChangeTypes includes: #comment) ifTrue:
                        [messageList add:
                                (RGCommentDefinition new
                                        parentName: className) ].

                clAssoc value methodChangeTypes associationsDo: [:mAssoc |
                        (#(remove addedThenRemoved) includes: mAssoc value) ifFalse:
                                [messageList add:
                                        ((RGMethodDefinition named: mAssoc key)
                                                parentName: className;
                                                isMetaSide: classIsMeta) asActive ]]].
        ^ messageList asArray sort


** the method for getting the protocol could be removed
** found something missing for comments (they should also behavior like  
methods). Will do that tomorrow!!


Veronica


Stef


changedMessageList
        "Used by a message set browser to access the list view information."

        | messageList |
        messageList := OrderedCollection new.
        changeRecords associationsDo: [:clAssoc | | classNameInParts  
classNameInFull |
                classNameInFull := clAssoc key asString.
                classNameInParts := classNameInFull findTokens: ' '.

                (clAssoc value allChangeTypes includes: #comment) ifTrue:
                        [messageList add:
                                (RGCommentDefinition new
                                        parentName: clAssoc key asSymbol)].

                clAssoc value methodChangeTypes associationsDo: [:mAssoc |
                        (#(remove addedThenRemoved) includes: mAssoc value) ifFalse:
                                [messageList add:
                                        ((RGMethodDefinition named: mAssoc key)
                                                protocol: (self protocolFor: mAssoc key definedIn: classNameInParts  
first asSymbol isMeta:  (classNameInParts size > 1));
                                                parentName: clAssoc key asSymbol;
                                                isMetaSide: (classNameInParts size > 1)) asActive
                                               
                                                ]]].
        ^ messageList asArray sort




On Sep 17, 2011, at 12:04 PM, Stéphane Ducasse wrote:

Hi veronica

Apparently in the ChangeSet the RG method definition have nil protocols.
Do you have one idea where it could come from.
I imagine when created but I should look for it.

Ben I'm removing the latest reference to ChangedMessageSet and it was used  
by the
ChangeSorter. So I'm making sure that flat list is robust when protocol  
returns nil.

Stef






_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4821 in pharo: Fixing changedMessageList to adapt to MessageList use (vs MessageSet R.I.P.)

pharo
Updates:
        Status: FixToInclude

Comment #1 on issue 4821 by [hidden email]: Fixing  
changedMessageList to adapt to MessageList use (vs MessageSet R.I.P.)
http://code.google.com/p/pharo/issues/detail?id=4821

changedMessageList
        "Used by a message set browser to access the list view information."

        | messageList |
        messageList := OrderedCollection new.
        changeRecords associationsDo: [:clAssoc | | className classIsMeta |
                className := clAssoc key asSymbol.
                classIsMeta := (className findTokens: ' ') size > 1.

                (clAssoc value allChangeTypes includes: #comment) ifTrue:
                        [messageList add:
                                (RGCommentDefinition new
                                        parentName: className) ].

                clAssoc value methodChangeTypes associationsDo: [:mAssoc |
                        (#(remove addedThenRemoved) includes: mAssoc value) ifFalse:
                                [messageList add:
                                        ((RGMethodDefinition named: mAssoc key)
                                                parentName: className;
                                                isMetaSide: classIsMeta) asActive ]]].
        ^ messageList asArray sort


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4821 in pharo: Fixing changedMessageList to adapt to MessageList use (vs MessageSet R.I.P.)

pharo
Updates:
        Status: Closed

Comment #2 on issue 4821 by [hidden email]: Fixing  
changedMessageList to adapt to MessageList use (vs MessageSet R.I.P.)
http://code.google.com/p/pharo/issues/detail?id=4821

in 14151


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker