change n same words in browser with one action

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

change n same words in browser with one action

Sabine Manaa
Hi,

double clicking on one word in the system browser selects this word in one color and all other appearances of this wort in another color. This is nice. Is there a possibility to change ALL the occurences of this word in one action? I did noch find this feature yet.

I do not mean the search and replace dialog - to many clicks while developing.

Greetings Sabine
Reply | Threaded
Open this post in threaded view
|

RE: change n same words in browser with one action

Robert Sirois
Which browser? Sounds like a built-in feature, not necessarily a universal DOM or JavaScript thing; although, you probably could emulate that.

RS

> Date: Fri, 28 Sep 2012 00:51:10 -0700

> From: [hidden email]
> To: [hidden email]
> Subject: [Seaside] change n same words in browser with one action
>
> Hi,
>
> double clicking on one word in the system browser selects this word in one
> color and all other appearances of this wort in another color. This is nice.
> Is there a possibility to change ALL the occurences of this word in one
> action? I did noch find this feature yet.
>
> I do not mean the search and replace dialog - to many clicks while
> developing.
>
> Greetings Sabine
>
>
>
> --
> View this message in context: http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Paul DeBruicker
I'm guessing its the OmniBrowser or similar and this question will get a
better response on the Pharo list.  So I cc'd it.





On 09/28/2012 07:57 AM, Robert Sirois wrote:

> Which browser? Sounds like a built-in feature, not necessarily a
> universal DOM or JavaScript thing; although, you probably could emulate
> that.
>
> RS
>
>  > Date: Fri, 28 Sep 2012 00:51:10 -0700
>  > From: [hidden email]
>  > To: [hidden email]
>  > Subject: [Seaside] change n same words in browser with one action
>  >
>  > Hi,
>  >
>  > double clicking on one word in the system browser selects this word
> in one
>  > color and all other appearances of this wort in another color. This
> is nice.
>  > Is there a possibility to change ALL the occurences of this word in one
>  > action? I did noch find this feature yet.
>  >
>  > I do not mean the search and replace dialog - to many clicks while
>  > developing.
>  >
>  > Greetings Sabine
>  >
>  >
>  >
>  > --
>  > View this message in context:
> http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
>  > Sent from the Seaside General mailing list archive at Nabble.com.
>  > _______________________________________________
>  > seaside mailing list
>  > [hidden email]
>  > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Igor Stasenko
Yes, you can do it using highly advanced "search & replace" technology
(available via 'find' menu item in text context menu, or just
cmd-f-f).
We should patent it, btw.

;)


On 28 September 2012 17:35, Paul DeBruicker <[hidden email]> wrote:

> I'm guessing its the OmniBrowser or similar and this question will get a
> better response on the Pharo list.  So I cc'd it.
>
>
>
>
> On 09/28/2012 07:57 AM, Robert Sirois wrote:
>>
>> Which browser? Sounds like a built-in feature, not necessarily a
>> universal DOM or JavaScript thing; although, you probably could emulate
>> that.
>>
>> RS
>>
>>  > Date: Fri, 28 Sep 2012 00:51:10 -0700
>>  > From: [hidden email]
>>  > To: [hidden email]
>>  > Subject: [Seaside] change n same words in browser with one action
>>  >
>>  > Hi,
>>  >
>>  > double clicking on one word in the system browser selects this word
>> in one
>>  > color and all other appearances of this wort in another color. This
>> is nice.
>>  > Is there a possibility to change ALL the occurences of this word in one
>>  > action? I did noch find this feature yet.
>>  >
>>  > I do not mean the search and replace dialog - to many clicks while
>>  > developing.
>>  >
>>  > Greetings Sabine
>>  >
>>  >
>>  >
>>  > --
>>  > View this message in context:
>>
>> http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
>>  > Sent from the Seaside General mailing list archive at Nabble.com.
>>  > _______________________________________________
>>  > seaside mailing list
>>  > [hidden email]
>>  > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
Best regards,
Igor Stasenko.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Sabine Manaa
I wrote system browser. I will post it to the Pharo list. Thank you.

On Fri, Sep 28, 2012 at 6:02 PM, Igor Stasenko [via Smalltalk] <[hidden email]> wrote:
Yes, you can do it using highly advanced "search & replace" technology
(available via 'find' menu item in text context menu, or just
cmd-f-f).
We should patent it, btw.

;)


On 28 September 2012 17:35, Paul DeBruicker <[hidden email]> wrote:

> I'm guessing its the OmniBrowser or similar and this question will get a
> better response on the Pharo list.  So I cc'd it.
>
>
>
>
> On 09/28/2012 07:57 AM, Robert Sirois wrote:
>>
>> Which browser? Sounds like a built-in feature, not necessarily a
>> universal DOM or JavaScript thing; although, you probably could emulate
>> that.
>>
>> RS
>>
>>  > Date: Fri, 28 Sep 2012 00:51:10 -0700
>>  > From: [hidden email]
>>  > To: [hidden email]
>>  > Subject: [Seaside] change n same words in browser with one action

>>  >
>>  > Hi,
>>  >
>>  > double clicking on one word in the system browser selects this word
>> in one
>>  > color and all other appearances of this wort in another color. This
>> is nice.
>>  > Is there a possibility to change ALL the occurences of this word in one
>>  > action? I did noch find this feature yet.
>>  >
>>  > I do not mean the search and replace dialog - to many clicks while
>>  > developing.
>>  >
>>  > Greetings Sabine
>>  >
>>  >
>>  >
>>  > --
>>  > View this message in context:
>>
>> http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
>>  > Sent from the Seaside General mailing list archive at Nabble.com.
>>  > _______________________________________________
>>  > seaside mailing list
>>  > [hidden email]
>>  > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
Best regards,
Igor Stasenko.
_______________________________________________
seaside mailing list
If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372p4649451.html
To unsubscribe from change n same words in browser with one action, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

hernanmd
In reply to this post by Sabine Manaa
You may use the Refactoring Browser from OmniBrowser to do that.

1) Open a scoped browser, i.e. select a method, contextual menu ->
Refactoring scope -> Selection (you may filter by multiple methods,
categories, classes or packages depending your current selection in OB)
2) In the new browser window, select method, contextual menu -> Refactor
-> Source Regex...

For example given the method:

test1
        | var1 var2 var3 var4 |
       
        var3 := #symbol1.
        var4 := 'cadena1'.
        var1 := 'my first testString'.
        var2 := 'my second testString'.
        ^ var1 foobar , var2 foobar

a regex refactoring replacing #symbol1 with 'symbol1' and 'testString'
with 'myString' could be:

ORSourceRegexRefactoring new
        "Example 1: Replace symbols with strings"
        replace: '#(\w+)' with: '''$1''' ignoreCase: false;
        "Example 2: Replace occurrences of a string with another string"
        replace: '#*testString' with: 'myString';
        yourself

3) Open menu on the refactoring source code, click Accept (DO NOT use
the keyboard commands)
4) A new browser window will let you accept, filter, or cancel the
refactorings.

If you want to modify message patterns/nodes, use the Refactor ->
Rewrite code... templates. Take a look at:
http://st-www.cs.illinois.edu/users/brant/Refactory/Rewrite.html to
learn about the rewrite rules.
Hope it helps.
Cheers,

Hernán


On 28/09/2012 4:51, Sabine Knöfel wrote:

> Hi,
>
> double clicking on one word in the system browser selects this word in one
> color and all other appearances of this wort in another color. This is nice.
> Is there a possibility to change ALL the occurences of this word in one
> action? I did noch find this feature yet.
>
> I do not mean the search and replace dialog - to many clicks while
> developing.
>
> Greetings Sabine
>
>
>
> --
> View this message in context: http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Sabine Manaa
Thank you Hernán,

the refactoring browser is a very powerful tool.

But I need something quite easy. See the example screenshot. I just started to rename the parameter "aHtmlRoot" to "html".

Now I have to doubleclick each single "aHtmlRoot" and paste "html". This is boring. It would like that all the highlighted words change in the same moment, I change the first one. This could be switched on in the system settings.

This situation occurs at least daily to me. Am I the only one?

Greetings Sabine

PS: yes I know about cascading, this is not the point here;-)



On Fri, Sep 28, 2012 at 7:42 PM, Hernán Morales Durand <[hidden email]> wrote:
You may use the Refactoring Browser from OmniBrowser to do that.

1) Open a scoped browser, i.e. select a method, contextual menu -> Refactoring scope -> Selection (you may filter by multiple methods, categories, classes or packages depending your current selection in OB)
2) In the new browser window, select method, contextual menu -> Refactor -> Source Regex...

For example given the method:

test1
        | var1 var2 var3 var4 |
       
        var3 := #symbol1.
        var4 := 'cadena1'.
        var1 := 'my first testString'.
        var2 := 'my second testString'.
        ^ var1 foobar , var2 foobar

a regex refactoring replacing #symbol1 with 'symbol1' and 'testString' with 'myString' could be:

ORSourceRegexRefactoring new
        "Example 1: Replace symbols with strings"
        replace: '#(\w+)' with: '''$1''' ignoreCase: false;
        "Example 2: Replace occurrences of a string with another string"
        replace: '#*testString' with: 'myString';
        yourself

3) Open menu on the refactoring source code, click Accept (DO NOT use the keyboard commands)
4) A new browser window will let you accept, filter, or cancel the refactorings.

If you want to modify message patterns/nodes, use the Refactor -> Rewrite code... templates. Take a look at: http://st-www.cs.illinois.edu/users/brant/Refactory/Rewrite.html to learn about the rewrite rules.
Hope it helps.
Cheers,

Hernán



On 28/09/2012 4:51, Sabine Knöfel wrote:
Hi,

double clicking on one word in the system browser selects this word in one
color and all other appearances of this wort in another color. This is nice.
Is there a possibility to change ALL the occurences of this word in one
action? I did noch find this feature yet.

I do not mean the search and replace dialog - to many clicks while
developing.

Greetings Sabine



--
View this message in context: http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

html.JPG (62K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Igor Stasenko
ah, ok.. you want something simpler than search&replace ..

i remember in Squeak there was something, that you could select a
piece of text, then type something,
and then press cmd-g (if i remember) to search for same occurrence and
replace it again.
but i am not sure if it works in pharo.

On 28 September 2012 20:23, Sabine Knöfel <[hidden email]> wrote:

> Thank you Hernán,
>
> the refactoring browser is a very powerful tool.
>
> But I need something quite easy. See the example screenshot. I just started
> to rename the parameter "aHtmlRoot" to "html".
>
> Now I have to doubleclick each single "aHtmlRoot" and paste "html". This is
> boring. It would like that all the highlighted words change in the same
> moment, I change the first one. This could be switched on in the system
> settings.
>
> This situation occurs at least daily to me. Am I the only one?
>
> Greetings Sabine
>
> PS: yes I know about cascading, this is not the point here;-)
>
>
>
>
> On Fri, Sep 28, 2012 at 7:42 PM, Hernán Morales Durand
> <[hidden email]> wrote:
>>
>> You may use the Refactoring Browser from OmniBrowser to do that.
>>
>> 1) Open a scoped browser, i.e. select a method, contextual menu ->
>> Refactoring scope -> Selection (you may filter by multiple methods,
>> categories, classes or packages depending your current selection in OB)
>> 2) In the new browser window, select method, contextual menu -> Refactor
>> -> Source Regex...
>>
>> For example given the method:
>>
>> test1
>>         | var1 var2 var3 var4 |
>>
>>         var3 := #symbol1.
>>         var4 := 'cadena1'.
>>         var1 := 'my first testString'.
>>         var2 := 'my second testString'.
>>         ^ var1 foobar , var2 foobar
>>
>> a regex refactoring replacing #symbol1 with 'symbol1' and 'testString'
>> with 'myString' could be:
>>
>> ORSourceRegexRefactoring new
>>         "Example 1: Replace symbols with strings"
>>         replace: '#(\w+)' with: '''$1''' ignoreCase: false;
>>         "Example 2: Replace occurrences of a string with another string"
>>         replace: '#*testString' with: 'myString';
>>         yourself
>>
>> 3) Open menu on the refactoring source code, click Accept (DO NOT use the
>> keyboard commands)
>> 4) A new browser window will let you accept, filter, or cancel the
>> refactorings.
>>
>> If you want to modify message patterns/nodes, use the Refactor -> Rewrite
>> code... templates. Take a look at:
>> http://st-www.cs.illinois.edu/users/brant/Refactory/Rewrite.html to learn
>> about the rewrite rules.
>> Hope it helps.
>> Cheers,
>>
>> Hernán
>>
>>
>>
>> On 28/09/2012 4:51, Sabine Knöfel wrote:
>>>
>>> Hi,
>>>
>>> double clicking on one word in the system browser selects this word in
>>> one
>>> color and all other appearances of this wort in another color. This is
>>> nice.
>>> Is there a possibility to change ALL the occurences of this word in one
>>> action? I did noch find this feature yet.
>>>
>>> I do not mean the search and replace dialog - to many clicks while
>>> developing.
>>>
>>> Greetings Sabine
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
>>> Sent from the Seaside General mailing list archive at Nabble.com.
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



--
Best regards,
Igor Stasenko.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Sabine Manaa
Hi Igor,

yes! ;-)
As far as I remember it was possible in VisualWorks, too.
But I did not find it in Pharo.

Sabine


On Fri, Sep 28, 2012 at 8:41 PM, Igor Stasenko <[hidden email]> wrote:
ah, ok.. you want something simpler than search&replace ..

i remember in Squeak there was something, that you could select a
piece of text, then type something,
and then press cmd-g (if i remember) to search for same occurrence and
replace it again.
but i am not sure if it works in pharo.

On 28 September 2012 20:23, Sabine Knöfel <[hidden email]> wrote:
> Thank you Hernán,
>
> the refactoring browser is a very powerful tool.
>
> But I need something quite easy. See the example screenshot. I just started
> to rename the parameter "aHtmlRoot" to "html".
>
> Now I have to doubleclick each single "aHtmlRoot" and paste "html". This is
> boring. It would like that all the highlighted words change in the same
> moment, I change the first one. This could be switched on in the system
> settings.
>
> This situation occurs at least daily to me. Am I the only one?
>
> Greetings Sabine
>
> PS: yes I know about cascading, this is not the point here;-)
>
>
>
>
> On Fri, Sep 28, 2012 at 7:42 PM, Hernán Morales Durand
> <[hidden email]> wrote:
>>
>> You may use the Refactoring Browser from OmniBrowser to do that.
>>
>> 1) Open a scoped browser, i.e. select a method, contextual menu ->
>> Refactoring scope -> Selection (you may filter by multiple methods,
>> categories, classes or packages depending your current selection in OB)
>> 2) In the new browser window, select method, contextual menu -> Refactor
>> -> Source Regex...
>>
>> For example given the method:
>>
>> test1
>>         | var1 var2 var3 var4 |
>>
>>         var3 := #symbol1.
>>         var4 := 'cadena1'.
>>         var1 := 'my first testString'.
>>         var2 := 'my second testString'.
>>         ^ var1 foobar , var2 foobar
>>
>> a regex refactoring replacing #symbol1 with 'symbol1' and 'testString'
>> with 'myString' could be:
>>
>> ORSourceRegexRefactoring new
>>         "Example 1: Replace symbols with strings"
>>         replace: '#(\w+)' with: '''$1''' ignoreCase: false;
>>         "Example 2: Replace occurrences of a string with another string"
>>         replace: '#*testString' with: 'myString';
>>         yourself
>>
>> 3) Open menu on the refactoring source code, click Accept (DO NOT use the
>> keyboard commands)
>> 4) A new browser window will let you accept, filter, or cancel the
>> refactorings.
>>
>> If you want to modify message patterns/nodes, use the Refactor -> Rewrite
>> code... templates. Take a look at:
>> http://st-www.cs.illinois.edu/users/brant/Refactory/Rewrite.html to learn
>> about the rewrite rules.
>> Hope it helps.
>> Cheers,
>>
>> Hernán
>>
>>
>>
>> On 28/09/2012 4:51, Sabine Knöfel wrote:
>>>
>>> Hi,
>>>
>>> double clicking on one word in the system browser selects this word in
>>> one
>>> color and all other appearances of this wort in another color. This is
>>> nice.
>>> Is there a possibility to change ALL the occurences of this word in one
>>> action? I did noch find this feature yet.
>>>
>>> I do not mean the search and replace dialog - to many clicks while
>>> developing.
>>>
>>> Greetings Sabine
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
>>> Sent from the Seaside General mailing list archive at Nabble.com.
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



--
Best regards,
Igor Stasenko.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

hernanmd
In reply to this post by Sabine Manaa

Something like this?

http://wiki.squeak.org/squeak/900

I don't know if it's still possibe in Pharo.

Notice you have to manually select, type and replace each method. The RB
rewriter can do that automatically for you.
Cheers,

Hernán

On 28/09/2012 15:23, Sabine Knöfel wrote:

> Thank you Hernán,
>
> the refactoring browser is a very powerful tool.
>
> But I need something quite easy. See the example screenshot. I just
> started to rename the parameter "aHtmlRoot" to "html".
>
> Now I have to doubleclick each single "aHtmlRoot" and paste "html". This
> is boring. It would like that all the highlighted words change in the
> same moment, I change the first one. This could be switched on in the
> system settings.
>
> This situation occurs at least daily to me. Am I the only one?
>
> Greetings Sabine
>
> PS: yes I know about cascading, this is not the point here;-)
>
>
>
> On Fri, Sep 28, 2012 at 7:42 PM, Hernán Morales Durand
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     You may use the Refactoring Browser from OmniBrowser to do that.
>
>     1) Open a scoped browser, i.e. select a method, contextual menu ->
>     Refactoring scope -> Selection (you may filter by multiple methods,
>     categories, classes or packages depending your current selection in OB)
>     2) In the new browser window, select method, contextual menu ->
>     Refactor -> Source Regex...
>
>     For example given the method:
>
>     test1
>              | var1 var2 var3 var4 |
>
>              var3 := #symbol1.
>              var4 := 'cadena1'.
>              var1 := 'my first testString'.
>              var2 := 'my second testString'.
>              ^ var1 foobar , var2 foobar
>
>     a regex refactoring replacing #symbol1 with 'symbol1' and
>     'testString' with 'myString' could be:
>
>     ORSourceRegexRefactoring new
>              "Example 1: Replace symbols with strings"
>              replace: '#(\w+)' with: '''$1''' ignoreCase: false;
>              "Example 2: Replace occurrences of a string with another
>     string"
>              replace: '#*testString' with: 'myString';
>              yourself
>
>     3) Open menu on the refactoring source code, click Accept (DO NOT
>     use the keyboard commands)
>     4) A new browser window will let you accept, filter, or cancel the
>     refactorings.
>
>     If you want to modify message patterns/nodes, use the Refactor ->
>     Rewrite code... templates. Take a look at:
>     http://st-www.cs.illinois.edu/__users/brant/Refactory/Rewrite.__html
>     <http://st-www.cs.illinois.edu/users/brant/Refactory/Rewrite.html>
>     to learn about the rewrite rules.
>     Hope it helps.
>     Cheers,
>
>     Hernán
>
>
>
>     On 28/09/2012 4:51, Sabine Knöfel wrote:
>
>         Hi,
>
>         double clicking on one word in the system browser selects this
>         word in one
>         color and all other appearances of this wort in another color.
>         This is nice.
>         Is there a possibility to change ALL the occurences of this word
>         in one
>         action? I did noch find this feature yet.
>
>         I do not mean the search and replace dialog - to many clicks while
>         developing.
>
>         Greetings Sabine
>
>
>
>         --
>         View this message in context:
>         http://forum.world.st/change-__n-same-words-in-browser-with-__one-action-tp4649372.html
>         <http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html>
>         Sent from the Seaside General mailing list archive at Nabble.com.
>         _________________________________________________
>         seaside mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         http://lists.squeakfoundation.__org/cgi-bin/mailman/listinfo/__seaside
>         <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
>
>
>     _________________________________________________
>     seaside mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.squeakfoundation.__org/cgi-bin/mailman/listinfo/__seaside
>     <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
>
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Sabine Manaa
yes, exactly like this: http://wiki.squeak.org/squeak/900

Bert Freudenberg added the following:

Tip: You do not have to perform a "find" for the "replace" to work.
Just select a word you want to have replaced, overtype it with your
new word, and hit (ctrl-j). Very handy for renaming variables.

This would be perfect.



On Fri, Sep 28, 2012 at 8:49 PM, Hernán Morales Durand [via Smalltalk]
<[hidden email]> wrote:

>
>
> Something like this?
>
> http://wiki.squeak.org/squeak/900
>
> I don't know if it's still possibe in Pharo.
>
> Notice you have to manually select, type and replace each method. The RB
> rewriter can do that automatically for you.
> Cheers,
>
> Hernán
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Bob Arning-2
In reply to this post by Sabine Manaa
squeak does that with cmd-j and ctrl-j


On 9/28/12 2:23 PM, Sabine Knöfel wrote:
Thank you Hernán,

the refactoring browser is a very powerful tool.

But I need something quite easy. See the example screenshot. I just started to rename the parameter "aHtmlRoot" to "html".

Now I have to doubleclick each single "aHtmlRoot" and paste "html". This is boring. It would like that all the highlighted words change in the same moment, I change the first one. This could be switched on in the system settings.

This situation occurs at least daily to me. Am I the only one?

Greetings Sabine

PS: yes I know about cascading, this is not the point here;-)



On Fri, Sep 28, 2012 at 7:42 PM, Hernán Morales Durand <[hidden email]> wrote:
You may use the Refactoring Browser from OmniBrowser to do that.

1) Open a scoped browser, i.e. select a method, contextual menu -> Refactoring scope -> Selection (you may filter by multiple methods, categories, classes or packages depending your current selection in OB)
2) In the new browser window, select method, contextual menu -> Refactor -> Source Regex...

For example given the method:

test1
        | var1 var2 var3 var4 |
       
        var3 := #symbol1.
        var4 := 'cadena1'.
        var1 := 'my first testString'.
        var2 := 'my second testString'.
        ^ var1 foobar , var2 foobar

a regex refactoring replacing #symbol1 with 'symbol1' and 'testString' with 'myString' could be:

ORSourceRegexRefactoring new
        "Example 1: Replace symbols with strings"
        replace: '#(\w+)' with: '''$1''' ignoreCase: false;
        "Example 2: Replace occurrences of a string with another string"
        replace: '#*testString' with: 'myString';
        yourself

3) Open menu on the refactoring source code, click Accept (DO NOT use the keyboard commands)
4) A new browser window will let you accept, filter, or cancel the refactorings.

If you want to modify message patterns/nodes, use the Refactor -> Rewrite code... templates. Take a look at: http://st-www.cs.illinois.edu/users/brant/Refactory/Rewrite.html to learn about the rewrite rules.
Hope it helps.
Cheers,

Hernán



On 28/09/2012 4:51, Sabine Knöfel wrote:
Hi,

double clicking on one word in the system browser selects this word in one
color and all other appearances of this wort in another color. This is nice.
Is there a possibility to change ALL the occurences of this word in one
action? I did noch find this feature yet.

I do not mean the search and replace dialog - to many clicks while
developing.

Greetings Sabine



--
View this message in context: http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Gastón Dall' Oglio
In reply to this post by hernanmd
Hello.

Something like Syncron-Edit in Lazarus? See:

I know, that is Pascal, your eyes hurts :P

Regards.


2012/9/28 Hernán Morales Durand <[hidden email]>

Something like this?

http://wiki.squeak.org/squeak/900

I don't know if it's still possibe in Pharo.

Notice you have to manually select, type and replace each method. The RB rewriter can do that automatically for you.
Cheers,

Hernán


On 28/09/2012 15:23, Sabine Knöfel wrote:
Thank you Hernán,

the refactoring browser is a very powerful tool.

But I need something quite easy. See the example screenshot. I just
started to rename the parameter "aHtmlRoot" to "html".

Now I have to doubleclick each single "aHtmlRoot" and paste "html". This
is boring. It would like that all the highlighted words change in the
same moment, I change the first one. This could be switched on in the
system settings.

This situation occurs at least daily to me. Am I the only one?

Greetings Sabine

PS: yes I know about cascading, this is not the point here;-)



On Fri, Sep 28, 2012 at 7:42 PM, Hernán Morales Durand
<[hidden email] <mailto:[hidden email]>> wrote:

    You may use the Refactoring Browser from OmniBrowser to do that.

    1) Open a scoped browser, i.e. select a method, contextual menu ->
    Refactoring scope -> Selection (you may filter by multiple methods,
    categories, classes or packages depending your current selection in OB)
    2) In the new browser window, select method, contextual menu ->
    Refactor -> Source Regex...

    For example given the method:

    test1
             | var1 var2 var3 var4 |

             var3 := #symbol1.
             var4 := 'cadena1'.
             var1 := 'my first testString'.
             var2 := 'my second testString'.
             ^ var1 foobar , var2 foobar

    a regex refactoring replacing #symbol1 with 'symbol1' and
    'testString' with 'myString' could be:

    ORSourceRegexRefactoring new
             "Example 1: Replace symbols with strings"
             replace: '#(\w+)' with: '''$1''' ignoreCase: false;
             "Example 2: Replace occurrences of a string with another
    string"
             replace: '#*testString' with: 'myString';
             yourself

    3) Open menu on the refactoring source code, click Accept (DO NOT
    use the keyboard commands)
    4) A new browser window will let you accept, filter, or cancel the
    refactorings.

    If you want to modify message patterns/nodes, use the Refactor ->
    Rewrite code... templates. Take a look at:
    http://st-www.cs.illinois.edu/__users/brant/Refactory/Rewrite.__html

    <http://st-www.cs.illinois.edu/users/brant/Refactory/Rewrite.html>
    to learn about the rewrite rules.
    Hope it helps.
    Cheers,

    Hernán



    On 28/09/2012 4:51, Sabine Knöfel wrote:

        Hi,

        double clicking on one word in the system browser selects this
        word in one
        color and all other appearances of this wort in another color.
        This is nice.
        Is there a possibility to change ALL the occurences of this word
        in one
        action? I did noch find this feature yet.

        I do not mean the search and replace dialog - to many clicks while
        developing.

        Greetings Sabine



        --
        View this message in context:
        http://forum.world.st/change-__n-same-words-in-browser-with-__one-action-tp4649372.html

        <http://forum.world.st/change-n-same-words-in-browser-with-one-action-tp4649372.html>
        Sent from the Seaside General mailing list archive at Nabble.com.
        _________________________________________________
        seaside mailing list
        seaside@lists.__squeakfoundation.org
        <mailto:[hidden email]>
        http://lists.squeakfoundation.__org/cgi-bin/mailman/listinfo/__seaside
        <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>


    _________________________________________________
    seaside mailing list
    seaside@lists.__squeakfoundation.org
    <mailto:[hidden email]>
    http://lists.squeakfoundation.__org/cgi-bin/mailman/listinfo/__seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Chris Muller-3
In reply to this post by Sabine Manaa
> yes, exactly like this: http://wiki.squeak.org/squeak/900
>
> Bert Freudenberg added the following:
>
> Tip: You do not have to perform a "find" for the "replace" to work.
> Just select a word you want to have replaced, overtype it with your
> new word, and hit (ctrl-j). Very handy for renaming variables.
>
> This would be perfect.

You should not expect that -- Pharo used to have it but it was removed
in favor of a more mainstream editor look-and-feel -- so that it be
would more attractive to new users.  Command+J / Control+J are just
two of several powerful code-editing capabilities Pharo originally
inherited from Squeak, along with my other favorites Command+E =
Exchange the last two selections and Command+[, (, {, or | = Surround
the highlighted text with that bracket-type pair.  (not sure if those
are still there in Pharo).

Pharo favors _familiarity_ for new users somewhat at the cost of
productivity for its experienced users.  It somewhat resembles eclipse
-- with pop-up dialogs and a seemingly "modal" philosophy.  Squeak, by
constrast, has kept pushing the "simple-but-powerful" philosphy of its
IDE to near extremes.  While it's less familiar for new uesrs, once
learned, general navigation and editing require _far fewer_ gestures.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Igor Stasenko
On 28 September 2012 21:40, Chris Muller <[hidden email]> wrote:

>> yes, exactly like this: http://wiki.squeak.org/squeak/900
>>
>> Bert Freudenberg added the following:
>>
>> Tip: You do not have to perform a "find" for the "replace" to work.
>> Just select a word you want to have replaced, overtype it with your
>> new word, and hit (ctrl-j). Very handy for renaming variables.
>>
>> This would be perfect.
>
> You should not expect that -- Pharo used to have it but it was removed
> in favor of a more mainstream editor look-and-feel -- so that it be
> would more attractive to new users.  Command+J / Control+J are just
> two of several powerful code-editing capabilities Pharo originally
> inherited from Squeak, along with my other favorites Command+E =
> Exchange the last two selections and Command+[, (, {, or | = Surround
> the highlighted text with that bracket-type pair.  (not sure if those
> are still there in Pharo).
>

Now what would be really cool is to have a documentation about all
those, and make them easily
discoverable. I worked with Squeak long enough, and didn't saw
anything close to that.
I said that it is 'command-g' instead 'command-j' exactly because of
that, because you never know...
And for me it was always felt like:
 - let user discover shortcuts by pressing random key combinations and
see what happens.
And then tell me, what are the chances that people will understand
what exactly cmd-j does without
reading documentation? In 99% of cases it will be 'oh.. what was just happen' ..
This is about "more attractive".
And if you hiding knowledge behind sealed doors, don't be surprised
that someone will come and build a new library with open doors,
replacing yours.
This is, what i think, happens with shortcuts changes in Pharo, except
form those which was remapped.

> Pharo favors _familiarity_ for new users somewhat at the cost of
> productivity for its experienced users.  It somewhat resembles eclipse
> -- with pop-up dialogs and a seemingly "modal" philosophy.  Squeak, by
> constrast, has kept pushing the "simple-but-powerful" philosphy of its
> IDE to near extremes.  While it's less familiar for new uesrs, once
> learned, general navigation and editing require _far fewer_ gestures.
>
Another thing, is that i first time hear that pharo is in favor of
newcomers at expense of experienced users.
I am not involved in changes to key bindings / shortcuts, but i doubt
that people, who doing that, making changes having such strange aim.
I think they are focused on making it good for newcomers and
experienced users both. Otherwise i don't see much sense in doing this
at all, and would be first who will be against it.

 _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
Best regards,
Igor Stasenko.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: change n same words in browser with one action

Bob Arning-2
World menu - help - command key help

On 9/28/12 9:33 PM, Igor Stasenko wrote:
Now what would be really cool is to have a documentation about all
those, and make them easily
discoverable. I worked with Squeak long enough, and didn't saw
anything close to that.
I said that it is 'command-g' instead 'command-j' exactly because of
that, because you never know...


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside