quick question about refactoring scope

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

quick question about refactoring scope

aizcorbe
Hi all, i have been working with Lint and traits on Pharo for some time, and i found something a little strange, if you select for a package/category refactoring scope>selection you get a new browser with just the classes on that package/category.  Is there any reason for skipping the traits on the package or it is just a bug?

 Cheers

ps: anyway i created a new "full selection" which also includes the contained traits on the new browser, if someone want it i could publish it to monticello  
Reply | Threaded
Open this post in threaded view
|

Re: quick question about refactoring scope

Lukas Renggli
The refactoring engine has a flattened view. It does not "see" traits,
only their methods if added in a class.

Lukas

On 4 December 2010 16:44, aizcorbe <[hidden email]> wrote:

>
> Hi all, i have been working with Lint and traits on Pharo for some time, and
> i found something a little strange, if you select for a package/category
> refactoring scope>selection you get a new browser with just the classes on
> that package/category.  Is there any reason for skipping the traits on the
> package or it is just a bug?
>
>  Cheers
>
> ps: anyway i created a new "full selection" which also includes the
> contained traits on the new browser, if someone want it i could publish it
> to monticello
>
> --
> View this message in context: http://forum.world.st/quick-question-about-refactoring-scope-tp3072683p3072683.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>



--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: quick question about refactoring scope

aizcorbe
That sounds strange, since i could want to refactor traits too.  Also, i'm working on a set of Lint rules to check some specific Trait issues.  Shouldn't be any way to select some Traits to run Lint rules over them (some things different than their methods)?
Reply | Threaded
Open this post in threaded view
|

Re: quick question about refactoring scope

Lukas Renggli
Traits make everything extremely complex.

If Lint would see traits we would have an explosion of cases to
consider for each rule: should it run on classes (yes/no), should it
run on traits (yes/no), should it run on class methods (yes/no),
should it run on trait methods (yes/no), should it run on imported
trait methods (yes/no). Out of the box most lint rules do not make
sense on traits and even break when being run on traits.

The change model of the refactoring engine can create traits, remove
traits and add and remove methods from traits. As well it supports the
definition of trait imports and undoing these operations. Traits are
not reified in the code model itself though, but that could be added
following RBClass and RBMetaclass if somebody is interested in doing
that.

Refactorings do not work on traits, but again the existing
refactorings probably don't make sense or wouldn't work because they
are targeted at classes. Again, new refactorings could be written if
the code model would be reified.

Lukas

On 4 December 2010 17:57, aizcorbe <[hidden email]> wrote:

>
> That sounds strange, since i could want to refactor traits too.  Also, i'm
> working on a set of Lint rules to check some specific Trait issues.
> Shouldn't be any way to select some Traits to run Lint rules over them (some
> things different than their methods)?
> --
> View this message in context: http://forum.world.st/quick-question-about-refactoring-scope-tp3072683p3072758.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>



--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: quick question about refactoring scope

aizcorbe
These are some of the issues i'm facing rigth now on my thesis.  Thanks for the response, it is usefull for me

Cheers