Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
August 2010
- 112 participants
- 1765 messages
Re: [Pharo-project] LaTeX to (gulp) Word and related stuff
by Hernán Morales Durand
Have you tried PDF-XChange ?
http://www.tracker-software.com/product/pdf-xchange-viewer
Cheers,
Hernán
2010/8/6 Schwab,Wilhelm K <bschwab(a)anest.ufl.edu>:
> Hello all,
>
> From PBE and a previous post, I see that I am not alone in using LaTeX. Â I once asked about editors, Lyx, Kile and TextMate were mentioned, along with emacs and vi. Â To folks who have mastered the latter, you have my respect :)
>
> TextMate appears to be a Mac-only item, but searches indicated that scribes tries to do the same thing on Linux. Â I have been using TexMaker and after customizing the quick build to apply latexpdf twice and to NOT view the result on its own (not sure why that was important, but it was), and a separate launcher for the pdf viewer, I'm pretty happy.
>
> In working on a paper, I inevitably got the "send me a copy so I can edit it with track changes." Â TTH did a surprisingly nice job of making an HTML document. Â OpenOffice did an ok job of loading it, but insists on linking the images and AFAICT pointedly refuses to embed them in a simple way. Â Do any of you have a solution to that problem? Â I would like to work as much as possible in latex and then export to Word for coauthors. Â Thoughts/recommendations/warnings?
>
> Bill
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
Aug. 6, 2010
Re: [Pharo-project] How do you extract a superclass if you can't select multiple classes?
by Tim Mackinnon
>
> I think people are aware that even in commercial Smalltalks the tools
> are decades behind the state of the art in Eclipse.
Well its fortunate the our language works in dog years, so is that
10/7 ;)
Seriously - I think you've shown that with a good engine (which I'm
hoping it is - it seemed that way when I first came across a few bits
in Dolphin) - and a bit of knowledge (although you have tons - but I'm
hoping we can follow in your footsteps), a few people could make a big
impact on what is possible (I certainly don't find it easy to even
contemplate writing these things in Eclipse, as the model is very
complicated).
>
> Have a look the method #refactoring in ORCmdCreateSubclassRefactoring
> and ORCmdCreateSuperclassRefactoring. Maybe you can improve something
> in terms of UI -> Refactoring Engine interaction?
I will certainly have a look - and maybe with a bit of guidance at
ESUG I might be able to make a difference too.
> There are already numerous refactorings that I "ported" from Eclipse:
I just took these for granted... I've been "spoiled" while being away,
and had forgotten what the original base set was. I LOVE the generate
multiple accessors (and the ability to edit that list and remove ones
you don't want). I sometimes which it was a bit more tickable - but
the alt-x (or right click) on an item works reasonably well.
> As well as some new Smalltalk specific ones:
Nice.
Thanks as always for your contributions on this - its inspiring
Tim
Aug. 6, 2010
[Pharo-project] LaTeX to (gulp) Word and related stuff
by Schwab,Wilhelm K
Hello all,
>From PBE and a previous post, I see that I am not alone in using LaTeX. I once asked about editors, Lyx, Kile and TextMate were mentioned, along with emacs and vi. To folks who have mastered the latter, you have my respect :)
TextMate appears to be a Mac-only item, but searches indicated that scribes tries to do the same thing on Linux. I have been using TexMaker and after customizing the quick build to apply latexpdf twice and to NOT view the result on its own (not sure why that was important, but it was), and a separate launcher for the pdf viewer, I'm pretty happy.
In working on a paper, I inevitably got the "send me a copy so I can edit it with track changes." TTH did a surprisingly nice job of making an HTML document. OpenOffice did an ok job of loading it, but insists on linking the images and AFAICT pointedly refuses to embed them in a simple way. Do any of you have a solution to that problem? I would like to work as much as possible in latex and then export to Word for coauthors. Thoughts/recommendations/warnings?
Bill
Aug. 6, 2010
Re: [Pharo-project] How do you extract a superclass if you can't select multiple classes?
by Lukas Renggli
> 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.
I think people are aware that even in commercial Smalltalks the tools
are decades behind the state of the art in Eclipse.
> 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.
Have a look the method #refactoring in ORCmdCreateSubclassRefactoring
and ORCmdCreateSuperclassRefactoring. Maybe you can improve something
in terms of UI -> Refactoring Engine interaction?
> 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.
There are already numerous refactorings that I "ported" from Eclipse:
- create multiple accessors at once
- generate equal/hash
- generate printString
- pretty print
- make class concrete
- swap method
As well as some new Smalltalk specific ones:
- create cascade
- split cascade
Lukas
--
Lukas Renggli
www.lukas-renggli.ch
Aug. 6, 2010
Re: [Pharo-project] How do you extract a superclass if you can't select multiple classes?
by Tim Mackinnon
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 <tamackinnon(a)gmail.com> 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 <tamackinnon(a)gmail.com> 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
>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-
>>>>> project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>>
>>> --
>>> Lukas Renggli
>>> www.lukas-renggli.ch
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 6, 2010
Re: [Pharo-project] XML Parser, Monticello and unicode?
by Henrik Johansen
On Aug 5, 2010, at 5:37 34PM, Norbert Hartl wrote:
> I'm trying to port the newest XML Parser from squeaksource to gemstone. In XML-Parser-AlexandreBergel.73 there is a unicode test introduced with a longer unicode xml snippet. From this release on I cannot load or merge anything.
>
> Besides that the xml snippet looks very strange it loads in pharo but not in gemstone. Unpacking the mcz on the console and examine the content showed that the encoding is indeed weird. I don't know what it is but it is neither ascii nor utf-8. Pharo loaded the snippet into a WideString instance.
>
> How does monticello handle WideString instances when written to a file?
Rather randomly. ;)
If you merely need to export a package so you can import in gemstone, you could change:
MCMczWriter >> addString: internalString at: path
| member utfConverter utfStringStream|
utfConverter := TextConverter newForEncoding: 'utf8'. "(Or whatever other format Gemstone thinks .mcz definitions will be)"
utfStringStream := RWBinaryOrTextStream on: String new.
utfStringStream binary.
utfConverter class writeBOMOn: utfStringStream.
utfStringStream ascii.
utfConverter nextPutAll: internalString toStream: utfStringStream.
member := zip addString: utfStringStream contents asString as: path.
member desiredCompressionMethod: ZipArchive compressionDeflated
(Alternatively use String new writeStream if you don't need/want to write BOM).
Doing changes like this in the base image is unlikely without further investigation, as it would probably break reading new packages (saved in proper utf8) containing WideStrings into old images.
I haven't read the import code, but if the binary format is preferred by old images if available, it might be a reasonable compromise saving the source in utf8, provided you also include the binary file.
Cheers,
Henry
PS. Another fun fact I encountered when porting Assets:
Monticello uses MethodReference>>source, which kindly converts all LF / CRLFs in your source / strings in the source to CR.
So you can forget f.ex. trying to save arbitrary ByteArrays as strings in your code, and expect them to work the same when converting back to ByteArray after saving to monticello :)
Aug. 6, 2010
Re: [Pharo-project] How do you extract a superclass if you can't select multiple classes?
by Lukas Renggli
On 6 August 2010 13:04, Tim Mackinnon <tamackinnon(a)gmail.com> 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 <tamackinnon(a)gmail.com> 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
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
--
Lukas Renggli
www.lukas-renggli.ch
Aug. 6, 2010
Re: [Pharo-project] How do you extract a superclass if you can't select multiple classes?
by Max Leske
I agree. From a desing perspective, it's totally contra intutitive that multiple selection isn't possible in the browser. And (at least when comming from other systems) it is even more confusing to have the refactoring browser show an item "selection..." when you weren't able to select more than one item.
I'm not implying that the browser doesn't supply a way to perform the refactorings, only as Tim's and my problems show, I see a problem in the design, an unnessecary one even.
But since I don't know what the plans are for OmniBrowser... Maybe there's already a replacement or update coming along?
Max
On 06.08.2010, at 13:04, Tim Mackinnon 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 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 <tamackinnon(a)gmail.com> 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
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 6, 2010
Re: [Pharo-project] How do you extract a superclass if you can't select multiple classes?
by Tim Mackinnon
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 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 <tamackinnon(a)gmail.com> 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
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 6, 2010
Re: [Pharo-project] How do you extract a superclass if you can't select multiple classes?
by Lukas Renggli
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 <tamackinnon(a)gmail.com> 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
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
--
Lukas Renggli
www.lukas-renggli.ch
Aug. 6, 2010