Well I'm certainly glad that you cared to get the tests back up to
scratch - and it makes our whole community more productive. A big
thanks for this!
I'm just a bit embarrassed that in our community - we keep talking
about how we have these great refactoring tools (that were invented in
smalltalk) - but it looks like in Pharo (and I guess Squeak) - they've
fallen a bit behind in terms of usability.
My scenario is a very frequent one - and it should be possible to do
effortlessly (and I think that the pieces are in place to do it).
Maybe at ESUG we can rally some energy to help support some of these
things (hold an appeal fund... not money - but contributions). I want
to help - I just am not sure how to yet - and sometimes this is partly
my surprise to discover that some of the things I thought already
worked - don't.
Maybe in the show us your projects demo's it might be worth replaying
this scenario and showing how it works in Pharo, and how it works in
Eclipse (and maybe another Smalltalk) - and then showing some of the
features available in the refactoring engine and trying to get support
for improving it. This along with useful keyboard shortcuts are the
things that eat away at the awesome productiveness I've noticed in
other areas.
Tim
On 6 Aug 2010, at 13:03, Lukas Renggli wrote:
On 6 August 2010 13:04, Tim Mackinnon <[email protected]> wrote:
Hmmm - (again if you can please be patient with me)... I really am
missing
something big here?
So in my example class X and Y are subclasses of WAComponent -
which has
tons of subclasses (it could be even worse, they could subclass
Object?). So
does this mean that I should create my superclass A first?
E.g. I create a new subclass of WAComponent, called A. I then make
X and Y
subclass A. Now I can do the "Refactor Class | Create Subclass"
refactoring,
and so I have to call it A2 (ultimately I only want A - but if
needs must).
Then I do get the prompt that you are referring to and can select
both X and
Y. Finally it just offers to make me class A2 but unlike what I was
trying
below it doesn't offer to move up any methods or instance
variables????
So this doesn't work? And furthermore it seem much more convoluted
than it
should be?
I don't know.
Keep in mind that nobody really cares about OmniBrowser, the
Refactoring Engine, and all the other development tools. A few years
ago they were just rotting along, most tests were broken and the
refactoring code base was on outdated code from the last century. I am
maintaining these tools because they make me more productive, not
because it is fun.
I would love to use something as sophisticated as Eclipse, but I don't
have interest to do that myself. So I just continue to fix and enhance
what works for me. If somebody else provides something better, I am
happy to give it a try.
Lukas
I don't understand why Refactor Class | Create Superclass doesn't
prompt me
for other peer classes (this is what I want - in fact what I
really, really
want is to select 2 classes in the first place).
Maybe I'm being really stupid, or does no-one use this refactoring
in Pharo?
It would seem that my scenario is a very common one - so I'm
struggling with
this. And frustratingly it seems that all the horsepower to do
this, is
built into the tools but they just don't use them in an intuitive
way?
Tim
On 6 Aug 2010, at 11:18, Lukas Renggli wrote:
Select the superclass of your classes X and Y and perform the
'create
subclass' refactoring. A dialog asks you to choose the subclasses of
your new class.
This old website describes most of the refactorings:
http://st-www.cs.illinois.edu/users/brant/Refactory/Refactorings.html
.
There is also a description in the tooltips of the menu actions.
Lukas
On 6 August 2010 11:47, Tim Mackinnon <[email protected]> wrote:
Hi Lukas - sorry to keep this thread going, but I don't quite
understand
what you mean? Partly I think the issue is that over the years I've
become
very familiar with the Eclipse/IntelliJ refactorings (and how they
approach
things) and I've slowly forgotten how they work in smalltalk
(although -
in
Dolphin they seem to more closely match Eclipse/IntelliJ - adding
to my
confusion in Pharo).
To give some context, I had a class X, then I copied it to create
class Y
-
made some changes and got something useful working. However X and
Y are
mostly the same - so deserve a superclass. This sounds to me like
standard
Refactor Class | Create Superclass refactoring (available in the
context
menu). Is this what you are referring to? (And this is a
seaside30.rc
image). Is this the create class refactoring you are referring
to? It
doesn't sound like it?
The one I am referring to just asks me for a name of a superclass
and
shows
me the method changes it will make (and I can remove those which
I don't
deem common) - but they only apply to the single class I ran the
refactoring
for - say X. This then leaves me with Y which still needs work.
I was
expecting somewhere where it would ask me if there are any other
classes
to
consider for the refactoring (or better still - let me multi-select
several
classes before I do the "create superclass" in the first place -
which
apparently is very hard in Pharo for some reason?).
So is there some other browser, or menu option that I am missing?
Tim
On 6 Aug 2010, at 00:31, Lukas Renggli wrote:
Good point. I've been struggling with multiple selection too
e.g. when
setting the refactoring scope. There's an entry called
"selection..."
but
since I've never been able to select more than one item from a
list,
selecting "selection..." has the same effect as
“category" (when in a
category list of course).
So is there some way of applying a refactoring to more than one
class?
What
is that refactoring scope menu item - is there some way to
specify 2 or
more
classes in there? Why is this so hard?
The refactoring scope is something completely different. It
selects
the part of the system that is considered by a refactoring.
Did you ever try to go through the whole create-class
refactoring? I
get a dialog that offers me to select multiple classes.
Lukas
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-
project
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project