ISSUE 2557 : NewTextMorph Refactorings and Tests

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

ISSUE 2557 : NewTextMorph Refactorings and Tests

Fernando olivero
SLICE-Issue-2557-NewTextMorphRefactorings-FernandoOlivero.11


I've published to the inbox several major refactoring s to NewTextMorph and CodeMorph. Added a bunch of tests too.

The basic idea behind CodeMorph is that an instance of codeMorph holds a target and displays a certain aspect of it.

For example the first example displays the method source and the second, only the selectorWithArguments, of the same method.

morph := CodeMorph new.
morph target: ( CodeMorph >> #styler: ).

morph beCode.
self assert: morph text asString = 'styler: aStyler
        styler := aStyler ' .
         
morph beSelectorWithArguments.
self assert: morph text asString = 'styler: aStyler'.


Lukas, i think now we would be able to easily provide a single line editor for OB, when performing renaming or other selector/arguments or class name refactorings. If you are interested let me now and we can code them together. (  take a look at NewTextMorphTest>>testSelectorWithArguments ).


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

Re: ISSUE 2557 : NewTextMorph Refactorings and Tests

Stéphane Ducasse
thanks we will integrate that in 1.2

On Jun 16, 2010, at 1:51 PM, Fernando olivero wrote:

> SLICE-Issue-2557-NewTextMorphRefactorings-FernandoOlivero.11
>
>
> I've published to the inbox several major refactoring s to NewTextMorph and CodeMorph. Added a bunch of tests too.
>
> The basic idea behind CodeMorph is that an instance of codeMorph holds a target and displays a certain aspect of it.
>
> For example the first example displays the method source and the second, only the selectorWithArguments, of the same method.
>
> morph := CodeMorph new.
> morph target: ( CodeMorph >> #styler: ).
>
> morph beCode.
> self assert: morph text asString = 'styler: aStyler
> styler := aStyler ' .
>
> morph beSelectorWithArguments.
> self assert: morph text asString = 'styler: aStyler'.
>
>
> Lukas, i think now we would be able to easily provide a single line editor for OB, when performing renaming or other selector/arguments or class name refactorings. If you are interested let me now and we can code them together. (  take a look at NewTextMorphTest>>testSelectorWithArguments ).
>
>
> Fernando
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


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