[Idea] method source with it

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

[Idea] method source with it

Mariano Martinez Peck
Very often I need to search a string in the whole code of a package. Someone tell me to select the world and then select "method source with it". This works fine, but it searches in ALL the image. I would like to specify a package for example.

Perhaps there is a way I don't know. If this is the case, please let me know.

Sorry for just telling the idea and not to offering to do it myself. But I think this is better than nothing :)

greetings,

Mariano

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [Idea] method source with it

Mariano Martinez Peck
Ahh and would be extremely good that this paints the results with a particular color. So, you can quickly see the occurrences of the world you were searching.

Cheers,

Mariano

On Tue, Feb 24, 2009 at 10:22 PM, Mariano Martinez Peck <[hidden email]> wrote:
Very often I need to search a string in the whole code of a package. Someone tell me to select the world and then select "method source with it". This works fine, but it searches in ALL the image. I would like to specify a package for example.

Perhaps there is a way I don't know. If this is the case, please let me know.

Sorry for just telling the idea and not to offering to do it myself. But I think this is better than nothing :)

greetings,

Mariano


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Idea] method source with it

Lukas Renggli
In reply to this post by Mariano Martinez Peck
> Sorry for just telling the idea and not to offering to do it myself. But I
> think this is better than nothing :)

The refactoring browser integration into OB provides that functionality.

1. Left-click on an element of the package you want to search.
2. Click on 'Open Environment | Package'.
3. The opened yellow browser scopes all Refactoring Browser actions to
what you see in this browser.
4. Either use 'Open | Search Code' (for parse tree searches) or 'Open
Environment | Find Sources' (for full text regexp search).

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Idea] method source with it

Mariano Martinez Peck
EXCELLENT! I wasn't aware of all that useful features! very good notice.

Some questions.

Is it possible to configurate the search engine to case no sensitive ?

Suppose you have more than 1 match of what you are looking in the same method, is there a way to go one after the other putting the color over the world ?

Thanks lukas!

Mariano

On Wed, Feb 25, 2009 at 4:59 AM, Lukas Renggli <[hidden email]> wrote:
> Sorry for just telling the idea and not to offering to do it myself. But I
> think this is better than nothing :)

The refactoring browser integration into OB provides that functionality.

1. Left-click on an element of the package you want to search.
2. Click on 'Open Environment | Package'.
3. The opened yellow browser scopes all Refactoring Browser actions to
what you see in this browser.
4. Either use 'Open | Search Code' (for parse tree searches) or 'Open
Environment | Find Sources' (for full text regexp search).

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Idea] method source with it

Lukas Renggli
> Is it possible to configurate the search engine to case no sensitive ?

Not at the moment, I noticed myself several times that this would be
useful. If I find time, I will have a look at it tomorrow.

> Suppose you have more than 1 match of what you are looking in the same
> method, is there a way to go one after the other putting the color over the
> world ?

Not without hacking into ParagraphEditor. There is unfortunately no
easy way to highlight several occurrences.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Idea] method source with it

Mariano Martinez Peck


On Sat, Feb 28, 2009 at 8:27 PM, Lukas Renggli <[hidden email]> wrote:
> Is it possible to configurate the search engine to case no sensitive ?

Not at the moment, I noticed myself several times that this would be
useful. If I find time, I will have a look at it tomorrow.

No problem. I was just  asking :)
 


> Suppose you have more than 1 match of what you are looking in the same
> method, is there a way to go one after the other putting the color over the
> world ?

Not without hacking into ParagraphEditor. There is unfortunately no
easy way to highlight several occurrences.

:(  Ok. Thanks anyway for the tip.
 

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Idea] method source with it

Nicolas Cellier-3
In reply to this post by Lukas Renggli
Lukas Renggli <renggli@...> writes:

>
> > Is it possible to configurate the search engine to case no sensitive ?
>
> Not at the moment, I noticed myself several times that this would be
> useful. If I find time, I will have a look at it tomorrow.
>
> > Suppose you have more than 1 match of what you are looking in the same
> > method, is there a way to go one after the other putting the color over the
> > world ?
>
> Not without hacking into ParagraphEditor. There is unfortunately no
> easy way to highlight several occurrences.
>
> Lukas
>


What I did once upon a time in VW:
- add a #backgroundColor->ColorValue text emphasis
- implement graphic rendering for this emphasis
- change the runs for every piece of matching text
  to add #backgroundColor->(ColorValue yellow) (for example)

A little bit more ellaborate than this basic idea:
don't add directly the #backgroundColor emphasis...
...but rather use an indirect one, like #searchedText.
Then let some custom-preferences translate to a real emphasis.
Advantages:
- customisable
- easy to remove all #searchedText preserving other text formatting

Nicolas


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Idea] method source with it

Lukas Renggli
In reply to this post by Mariano Martinez Peck
>> Not at the moment, I noticed myself several times that this would be
>> useful. If I find time, I will have a look at it tomorrow.
>
> No problem. I was just  asking :)

Update in this order:

1. AST-lr.164
2. Refactoring-Core-lr.40
3. OB-Refactory-lr.141
4. OB-Regex-lr.15

To get case insensitive matching when building environments/scopes
make sure that the expression ends with "/i". All the commands include
a regular expression example now, that should help you get started.

Note, that this versions also reorganize the menus a bit, after a
discussion with Stephane and David. Environments are now called
scopes, but other than that it is the same.

Lukas


>
>>
>> > Suppose you have more than 1 match of what you are looking in the same
>> > method, is there a way to go one after the other putting the color over
>> > the
>> > world ?
>>
>> Not without hacking into ParagraphEditor. There is unfortunately no
>> easy way to highlight several occurrences.
>
> :(  Ok. Thanks anyway for the tip.
>
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] [Idea] method source with it

Mariano Martinez Peck
Lukas: good news! thanks for it. I tried to test it but doesn't work for me. I updated the packages you said but after then, I am trying to open a system browser and I get the following error.

I guess I must update another package, but I don't know. Anyway, don't worry. I can test it then when all of these changes are included in pharo image.

thanks again.

MessageNotUnderstood: OBMetaNode>>filters
OBMetaNode(Object)>>doesNotUnderstand: #filters
OBPackageBrowser class>>defaultMetaNode
OBPackageBrowser class(OBBrowser class)>>new
OBPackageBrowser class(OBBrowser class)>>open
OBPackageBrowserAdaptor class(OBSystemBrowserAdaptor class)>>open
DEVToolSet class(StandardToolSet class)>>openClassBrowser
[] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: {[(selArgCount := selector numArgs) = 0   ifTrue: [target perform: selector] ...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
MouseButtonEvent>>sentTo:
ToggleMenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
ToggleMenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:

OBMetaNode(Object)>>doesNotUnderstand: #filters
OBPackageBrowser class>>defaultMetaNode
OBPackageBrowser class(OBBrowser class)>>new
OBPackageBrowser class(OBBrowser class)>>open
OBPackageBrowserAdaptor class(OBSystemBrowserAdaptor class)>>open
DEVToolSet class(StandardToolSet class)>>openClassBrowser
[] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: {[(selArgCount := selector numArgs) = 0   ifTrue: [target perform: selector] ...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
MouseButtonEvent>>sentTo:
ToggleMenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
ToggleMenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:
doesNotUnderstand: aMessage
     "Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector)."
    "Testing: (3 activeProcess)"

    MessageNotUnderstood new
        message: aMessage;
        receiver: self;
        signal.
    ^ aMessage sentTo: self.




On Sun, Mar 1, 2009 at 8:36 AM, Lukas Renggli <[hidden email]> wrote:
>> Not at the moment, I noticed myself several times that this would be
>> useful. If I find time, I will have a look at it tomorrow.
>
> No problem. I was just  asking :)

Update in this order:

1. AST-lr.164
2. Refactoring-Core-lr.40
3. OB-Refactory-lr.141
4. OB-Regex-lr.15

To get case insensitive matching when building environments/scopes
make sure that the expression ends with "/i". All the commands include
a regular expression example now, that should help you get started.

Note, that this versions also reorganize the menus a bit, after a
discussion with Stephane and David. Environments are now called
scopes, but other than that it is the same.

Lukas


>
>>
>> > Suppose you have more than 1 match of what you are looking in the same
>> > method, is there a way to go one after the other putting the color over
>> > the
>> > world ?
>>
>> Not without hacking into ParagraphEditor. There is unfortunately no
>> easy way to highlight several occurrences.
>
> :(  Ok. Thanks anyway for the tip.
>
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project