Nautilus accessor over-generation

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

Nautilus accessor over-generation

Sean P. DeNigris
Administrator
There is:
Nautilus class context menu
1. - Analyze -> Create inst var accessors (which allows you to multiple inst vars, but not omit setters/getters)
- Refactoring
2.   -> Class refactoring -> Generate accessors (which generates all by default, but allows you to omit whichever methods you want)
3.   -> Inst Var Refactoring -> Accessors (which operates on a single inst var, and allows you to omit getter or setter)

#1 seems to add nothing to the party. It's the least flexible and is covered by #2.

My confusion: I was always using #3 and didn't even realize #1 and #2 existed. I started to write code to select multiple inst vars at once in #3 and stumbled upon #1 and #2. Maybe #2 could be duplicated next to #3 with a more-differentiated name.

Slightly OT, it seems that listing the inst var "refactorings" (is adding an inst var really a refactoring?) is kind of a hack. For me, it'd make more sense and be more OO if the browser knew how to deal with inst vars explicitly, maybe as a sidebar to the class definition, or maybe the class definition should be abstracted behind a real UI. i.e. inst var widgets instead of a string...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Nautilus accessor over-generation

Benjamin Van Ryseghem (Pharo)
Since Nautilus is meant to also work without the refactoring engine, I have provided the Analyze menu, which is far lees powerful that the refactoring engine, but it's working out of the box.

Ben

On Apr 3, 2013, at 9:23 PM, Sean P. DeNigris <[hidden email]> wrote:

There is:
Nautilus class context menu
1. - Analyze -> Create inst var accessors (which allows you to multiple inst
vars, but not omit setters/getters)
- Refactoring
2.   -> Class refactoring -> Generate accessors (which generates all by
default, but allows you to omit whichever methods you want)
3.   -> Inst Var Refactoring -> Accessors (which operates on a single inst
var, and allows you to omit getter or setter)

#1 seems to add nothing to the party. It's the least flexible and is covered
by #2.

My confusion: I was always using #3 and didn't even realize #1 and #2
existed. I started to write code to select multiple inst vars at once in #3
and stumbled upon #1 and #2. Maybe #2 could be duplicated next to #3 with a
more-differentiated name.

Slightly OT, it seems that listing the inst var "refactorings" (is adding an
inst var really a refactoring?) is kind of a hack. For me, it'd make more
sense and be more OO if the browser knew how to deal with inst vars
explicitly, maybe as a sidebar to the class definition, or maybe the class
definition should be abstracted behind a real UI. i.e. inst var widgets
instead of a string...



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Nautilus-accessor-over-generation-tp4679480.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Nautilus accessor over-generation

Sean P. DeNigris
Administrator
Benjamin Van Ryseghem-2 wrote
Since Nautilus is meant to also work without the refactoring engine, I have provided the Analyze menu
Maybe it could appear conditionally - only if refactoring is not present - and be called something more similar to "Refactoring" like "Basic Refactoring"...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Nautilus accessor over-generation

Mariano Martinez Peck



On Thu, Apr 4, 2013 at 9:07 AM, Sean P. DeNigris <[hidden email]> wrote:
Benjamin Van Ryseghem-2 wrote
> Since Nautilus is meant to also work without the refactoring engine, I
> have provided the Analyze menu

Maybe it could appear conditionally - only if refactoring is not present -
and be called something more similar to "Refactoring" like "Basic
Refactoring"...


+1   I also found confusing Sean observation. Also, sometimes I did have some of the setters/getters before and I didn't like Nautilus would recreate them anyway (without warning me that some of them were already defined). This is problematic when you use lazy getters (getters in which you set something only when nil).

Best, 
 


-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Nautilus-accessor-over-generation-tp4679480p4679575.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.




--
Mariano
http://marianopeck.wordpress.com