Need help with dynamically finding packages/categories on pharo

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

Need help with dynamically finding packages/categories on pharo

ashwinshankar77
Hi,
I'm a grad student at UIUC and I'm working on building
an automatic package(category) refactoring and visualization tool for pharo.
As a first step,I need to figure out how I can programmatically get the list of packages/categories in the image.
To do this I tried the following - when I open the 'System Browser'
in pharo,the leftmost pane displays the packages. So I did a bit of reverse
engineering and started looking into the SystemBrowser class to see how
it gets the list of packages.But I'm not able to figure out.

Can you please let me know how I can get the current list of
packages in the image(basically the packages as displayed in leftmost pane
of System Browser) ?
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

Paul DeBruicker
Which Pharo version?

This is probably not ideal but in Pharo1.4 you can right click on the
categories and choose 'reorganize categories'

If you use the 'Finder' to search the source code for the string
'reorganize categories' you end up in OBCmdReorgCats which is the class
that runs the command which generates the category re-organization output.

I didn't try to learn how but from there you ought to be able to find
what you're looking for





On 04/04/2013 10:30 AM, ashwinshankar77 wrote:

> Hi,
> I'm a grad student at UIUC and I'm working on building
> an automatic package(category) refactoring and visualization tool for pharo.
> As a first step,I need to figure out how I can programmatically get the list
> of packages/categories in the image.
> To do this I tried the following - when I open the 'System Browser'
> in pharo,the leftmost pane displays the packages. So I did a bit of reverse
> engineering and started looking into the SystemBrowser class to see how
> it gets the list of packages.But I'm not able to figure out.
>
> Can you please let me know how I can get the current list of
> packages in the image(basically the packages as displayed in leftmost pane
> of System Browser) ?
>
>
>
> --
> View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

Christian Caldeiro
In reply to this post by ashwinshankar77
Run this and you will get an array with all PackageInfo (packages) instances:

PackageInfo allPackages

Cheers
Christian



On Thu, Apr 4, 2013 at 2:30 PM, ashwinshankar77 <[hidden email]> wrote:
Hi,
I'm a grad student at UIUC and I'm working on building
an automatic package(category) refactoring and visualization tool for pharo.
As a first step,I need to figure out how I can programmatically get the list
of packages/categories in the image.
To do this I tried the following - when I open the 'System Browser'
in pharo,the leftmost pane displays the packages. So I did a bit of reverse
engineering and started looking into the SystemBrowser class to see how
it gets the list of packages.But I'm not able to figure out.

Can you please let me know how I can get the current list of
packages in the image(basically the packages as displayed in leftmost pane
of System Browser) ?



--
View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

EstebanLM
which version of Pharo are you using?

because PackageInfo is no longer valid in 2.0, where you need to use: 

RPackage organizer packages

cheers,
Esteban


On Apr 4, 2013, at 8:03 PM, Christian Caldeiro <[hidden email]> wrote:

Run this and you will get an array with all PackageInfo (packages) instances:

PackageInfo allPackages

Cheers
Christian



On Thu, Apr 4, 2013 at 2:30 PM, ashwinshankar77 <[hidden email]> wrote:
Hi,
I'm a grad student at UIUC and I'm working on building
an automatic package(category) refactoring and visualization tool for pharo.
As a first step,I need to figure out how I can programmatically get the list
of packages/categories in the image.
To do this I tried the following - when I open the 'System Browser'
in pharo,the leftmost pane displays the packages. So I did a bit of reverse
engineering and started looking into the SystemBrowser class to see how
it gets the list of packages.But I'm not able to figure out.

Can you please let me know how I can get the current list of
packages in the image(basically the packages as displayed in leftmost pane
of System Browser) ?



--
View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

jfabry
In reply to this post by ashwinshankar77
Hi,

not a direct answer to your question, but what you are doing sounds related to what Veronica Uquillas was (is ?) doing with Ring and Torch. Maybe you might want to check it out, her page is http://soft.vub.ac.be/~vuquilla/Site/Home.html

On Apr 4, 2013, at 1:30 PM, ashwinshankar77 <[hidden email]> wrote:

> Hi,
> I'm a grad student at UIUC and I'm working on building
> an automatic package(category) refactoring and visualization tool for pharo.
> As a first step,I need to figure out how I can programmatically get the list
> of packages/categories in the image.
> To do this I tried the following - when I open the 'System Browser'
> in pharo,the leftmost pane displays the packages. So I did a bit of reverse
> engineering and started looking into the SystemBrowser class to see how
> it gets the list of packages.But I'm not able to figure out.
>
> Can you please let me know how I can get the current list of
> packages in the image(basically the packages as displayed in leftmost pane
> of System Browser) ?
>
>
>
> --
> View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

ashwinshankar77
Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

ashwinshankar77
In reply to this post by Christian Caldeiro
this is what I was looking for :)  ,Thanks !. Then I wanted classes in each
package as well,and I got that by doing  : PackageInfo new systemOrganization
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

ashwinshankar77
In reply to this post by EstebanLM
I'm using 1.4,I got my answer using PackageInfo .
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

ashwinshankar77
In reply to this post by Paul DeBruicker
Thanks ! I'm using version 1.4..
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

EstebanLM
In reply to this post by jfabry
he... still not correct :)

Smalltalk globals organization.

is the correct one.

(look systemOrganization implementation both in RPackage and PackageInfo.

What happens with PackageInfo is that is deprecated, and will be gone for 3.0. PhackageInfo, also, does not keep the data as the system sees it anymore... so better not use it at all, it is there to provide old tool maintainers a good way to adapt.

cheers,
Esteban

On Apr 5, 2013, at 6:04 AM, ashwinshankar77 <[hidden email]> wrote:

> Thanks for all your suggestions !
> Estiban - this is what I was looking for :) . Then I wanted classes in each
> package as well,and I got that by doing  : PackageInfo new
> systemOrganization
>
>
>
>
> --
> View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646p4679723.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

ashwinshankar77
Hi Esteban,
Thanks.I have a new question for you.Now we are trying to find out the packages and its classes
that comes up in Monticello Browser instead of SystemBrowser. Would you know how to get that ?
We are shifting towards Monticello for the following reasons : it seems that packages can inject
methods to other packages(Extensions) when they are loaded from Monticello.
These injected methods start with a '*' in the protocol pane.
So we lose this information if we do 'Smalltalk globals organization'.
Is there a way to get packages and classes that show up on Monticello browser ?

Thanks,
Ashwin
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

xx397
On 05/04/2013 20:52, ashwinshankar77 wrote:

> Hi Esteban,
> Thanks.I have a new question for you.Now we are trying to find out the
> packages and its classes
> that comes up in Monticello Browser instead of SystemBrowser. Would you know
> how to get that ?
> We are shifting towards Monticello for the following reasons : it seems that
> packages can inject
> methods to other packages(Extensions) when they are loaded from Monticello.
> These injected methods start with a '*' in the protocol pane.
> So we lose this information if we do 'Smalltalk globals organization'.
> Is there a way to get packages and classes that show up on Monticello
> browser ?
>
> Thanks,
> Ashwin
>
>
>
> --
> View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646p4679867.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
Try MCWorkingCopy registry

Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

Benjamin Van Ryseghem (Pharo)
Is Pharo 1.4 mandatory ?

Because in Pharo 2.0 we've introduced RPackages exactly to tackle this problem
Ben

On Apr 5, 2013, at 10:05 PM, Chris <[hidden email]> wrote:

On 05/04/2013 20:52, ashwinshankar77 wrote:
Hi Esteban,
Thanks.I have a new question for you.Now we are trying to find out the
packages and its classes
that comes up in Monticello Browser instead of SystemBrowser. Would you know
how to get that ?
We are shifting towards Monticello for the following reasons : it seems that
packages can inject
methods to other packages(Extensions) when they are loaded from Monticello.
These injected methods start with a '*' in the protocol pane.
So we lose this information if we do 'Smalltalk globals organization'.
Is there a way to get packages and classes that show up on Monticello
browser ?

Thanks,
Ashwin



--
View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646p4679867.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Try MCWorkingCopy registry


Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

stephane ducasse
In reply to this post by ashwinshankar77

On Apr 4, 2013, at 7:30 PM, ashwinshankar77 <[hidden email]> wrote:

> Hi,
> I'm a grad student at UIUC and I'm working on building
> an automatic package(category) refactoring and visualization tool for pharo.

Excellent

what tools are you using?

I really suggest you to use Pharo2.0 because 1.4 is one year old and we are working on 3.0
so you will be using a two version old image from us and you will get less accurate information.
In addition pharo 20 got a lot of improvements.


> As a first step,I need to figure out how I can programmatically get the list
> of packages/categories in the image.



> To do this I tried the following - when I open the 'System Browser'
> in pharo,the leftmost pane displays the packages. So I did a bit of reverse
> engineering and started looking into the SystemBrowser class to see how
> it gets the list of packages.But I'm not able to figure out.
>
> Can you please let me know how I can get the current list of
> packages in the image(basically the packages as displayed in leftmost pane
> of System Browser) ?
>
>
>
> --
> View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

Alain Busser
In reply to this post by EstebanLM
Oh my, already thinking about Pharo 3.0 ...

Will there be an automatic recognizing of spoken words so that one will be able to program on Pharo 3.0 on a tablet, without any keyboard, just with the microphone?

Will Pharo 3.0 cook the coffee on morning?

Who knows...

Alain :-D



On Fri, Apr 5, 2013 at 11:19 AM, Esteban Lorenzano <[hidden email]> wrote:
he... still not correct :)

Smalltalk globals organization.

is the correct one.

(look systemOrganization implementation both in RPackage and PackageInfo.

What happens with PackageInfo is that is deprecated, and will be gone for 3.0. PhackageInfo, also, does not keep the data as the system sees it anymore... so better not use it at all, it is there to provide old tool maintainers a good way to adapt.

cheers,
Esteban

On Apr 5, 2013, at 6:04 AM, ashwinshankar77 <[hidden email]> wrote:

> Thanks for all your suggestions !
> Estiban - this is what I was looking for :) . Then I wanted classes in each
> package as well,and I got that by doing  : PackageInfo new
> systemOrganization
>
>
>
>
> --
> View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646p4679723.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>



Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

ashwinshankar77
In reply to this post by EstebanLM
Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

ashwinshankar77
In reply to this post by xx397
Thank you,this helped :)
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

ashwinshankar77
In reply to this post by stephane ducasse
We are using Morphic for visualization and MCWorkingCopy and few other classes to get
package related information. We just started off,so we have not completely figured out what things to use.
Sure,I'll let the others know about using Pharo2.
Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

Tudor Girba-2
Hi,

Perhaps you could also take a look at Moose and the included engines such as Glamour and Roassal.

You can download an image from here:
https://ci.inria.fr/moose/job/moose-latest-dev-4.8/lastSuccessfulBuild/artifact/moose-latest-dev-4.8.zip

Cheers,
Doru


On Apr 8, 2013, at 12:48 AM, ashwinshankar77 <[hidden email]> wrote:

> We are using Morphic for visualization and MCWorkingCopy and few other
> classes to get
> package related information. We just started off,so we have not completely
> figured out what things to use.
> Sure,I'll let the others know about using Pharo2.
>
>
>
> --
> View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646p4680147.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>

--
www.tudorgirba.com

"Speaking louder won't make the point worthier."


Reply | Threaded
Open this post in threaded view
|

Re: Need help with dynamically finding packages/categories on pharo

S Krish
In reply to this post by ashwinshankar77
Extension methods...

I would suggest put a debug point when the "browse" on MC browser is picked.. and go digging in to find what you seek.




On Sat, Apr 6, 2013 at 1:22 AM, ashwinshankar77 <[hidden email]> wrote:
Hi Esteban,
Thanks.I have a new question for you.Now we are trying to find out the
packages and its classes
that comes up in Monticello Browser instead of SystemBrowser. Would you know
how to get that ?
We are shifting towards Monticello for the following reasons : it seems that
packages can inject
methods to other packages(Extensions) when they are loaded from Monticello.
These injected methods start with a '*' in the protocol pane.
So we lose this information if we do 'Smalltalk globals organization'.
Is there a way to get packages and classes that show up on Monticello
browser ?

Thanks,
Ashwin



--
View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories-on-pharo-tp4679646p4679867.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


12