Hierarchy (roots) of package
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
I would do that: Implementation: rootsInsidePackage := [ :packageName | | myPackage | myPackage := RPackageOrganizer default packageNamed: packageName. myPackage definedClasses select: [ :each | 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 <stepharo.self@gmail.com> 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/
Hi Clément,
On Apr 18, 2018, at 11:45 PM, Clément Bera <bera.clement@gmail.com> 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 <stepharo.self@gmail.com> 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/
Thanks Eliot. On Thu, Apr 19, 2018 at 3:06 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Clément,
On Apr 18, 2018, at 11:45 PM, Clément Bera <bera.clement@gmail.com> 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 <stepharo.self@gmail.com> 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/
Thanks Clément this is a nice way to do it. I was thinking about a more complex solution. Tx! On Thu, Apr 19, 2018 at 8:45 AM, Clément Bera <bera.clement@gmail.com> wrote:
I would do that:
Implementation: rootsInsidePackage := [ :packageName | | myPackage | myPackage := RPackageOrganizer default packageNamed: packageName. myPackage definedClasses select: [ :each | 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 <stepharo.self@gmail.com> 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/
participants (3)
-
Clément Bera -
Eliot Miranda -
Stephane Ducasse