Hi Clément,

> On Apr 18, 2018, at 11:45 PM, Clément Bera <[email protected]> wrote:
> 
> I would do that:
> 
> Implementation:
> rootsInsidePackage := [ :packageName |
>       | myPackage |
>       myPackage := RPackageOrganizer default packageNamed: packageName.
>       myPackage definedClasses select: [ :each | each superclass package ~~ 
> myPackage ] ].

Don't forget nil superclasses (for proxy classes) so

each superclass isNil
or: [ each superclass package ~~ myPackage ] ]

> 
> Example use-case:
> rootsInsidePackage value: 'OpalCompiler-Core'
> 
> Is that what you expected ?
> 
>> On Thu, Apr 19, 2018 at 7:19 AM, Stephane Ducasse <[email protected]> 
>> wrote:
>> Hi
>> 
>> Given a package I would like to know the classes that are roots
>> of hierarchy inside the package.
>> 
>> Do we have something like that?
>> 
>> Stef
>> 
> 
> 
> 
> -- 
> Clément Béra
> https://clementbera.github.io/
> https://clementbera.wordpress.com/

Reply via email to