Need help with dynamically finding packages/categories on pharo
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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Thanks ! I'm using version 1.4.. -- View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <ashwinshankar77@gmail.com>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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <christian.caldeiro@gmail.com> 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 <ashwinshankar77@gmail.com> 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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I'm using 1.4,I got my answer using PackageInfo . -- View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 -- View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <ashwinshankar77@gmail.com> 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... 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
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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <ashwinshankar77@gmail.com> 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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Try MCWorkingCopy registry
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 <cpmbailey@btinternet.com> 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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Try MCWorkingCopy registry
Thank you,this helped :) -- View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <ashwinshankar77@gmail.com>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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <estebanlm@gmail.com>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 <ashwinshankar77@gmail.com> 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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Apr 6, 2013, at 4:38 PM, Alain Busser <alain.busser@gmail.com> wrote:
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?
not yet :) But code navigation based on AST, new compiler, vector graphic support, new widget,â¦. Stef
Thanks ! -- View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Thanks ! -- View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Apr 4, 2013, at 7:30 PM, ashwinshankar77 <ashwinshankar77@gmail.com> 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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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/artif... Cheers, Doru On Apr 8, 2013, at 12:48 AM, ashwinshankar77 <ashwinshankar77@gmail.com> 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... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- www.tudorgirba.com "Speaking louder won't make the point worthier."
Nice :) ! thanks for the info.. -- View this message in context: http://forum.world.st/Need-help-with-dynamically-finding-packages-categories... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (11)
-
Alain Busser -
ashwinshankar77 -
Benjamin -
Chris -
Christian Caldeiro -
Esteban Lorenzano -
Johan Fabry -
Paul DeBruicker -
S Krish -
stephane ducasse -
Tudor Girba