From fbb49ebf2c228458a3b1f5f0828c0d6f8d8626d5 Mon Sep 17 00:00:00 2001 From: Anne Etien Date: Fri, 22 Jul 2022 16:17:23 +0200 Subject: [PATCH] Moving the link between Package and TWithClasses in FamixGenerator. Removing it from FamixPharoGenerator. Removing classes method from FamixJavaPackage. The one from TWithClasses will be used. --- src/Famix-Java-Entities/FamixJavaPackage.class.st | 5 ----- src/Famix-MetamodelGeneration/FamixGenerator.class.st | 1 + src/Famix-PharoSmalltalk-Entities/FamixStPackage.class.st | 4 ++-- .../FamixPharoSmalltalkGenerator.class.st | 1 - src/Famix-Traits/FamixTPackage.trait.st | 4 ++-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Famix-Java-Entities/FamixJavaPackage.class.st b/src/Famix-Java-Entities/FamixJavaPackage.class.st index 99f31a8c6..875bebc69 100644 --- a/src/Famix-Java-Entities/FamixJavaPackage.class.st +++ b/src/Famix-Java-Entities/FamixJavaPackage.class.st @@ -115,11 +115,6 @@ FamixJavaPackage >> childrenOfMyKind [ ^ self childEntities allWithSubTypesOf: self class ] -{ #category : #accessing } -FamixJavaPackage >> classes [ - ^ self cacheAt: #classes ifAbsentPut: [ self childEntities select: [ :child | child isClass ] ] -] - { #category : #'Famix-Extensions-accessing' } FamixJavaPackage >> containedEntities [ ^ super containedEntities union: self childEntities diff --git a/src/Famix-MetamodelGeneration/FamixGenerator.class.st b/src/Famix-MetamodelGeneration/FamixGenerator.class.st index 6bf0f49b5..4136b46b5 100644 --- a/src/Famix-MetamodelGeneration/FamixGenerator.class.st +++ b/src/Famix-MetamodelGeneration/FamixGenerator.class.st @@ -1040,6 +1040,7 @@ FamixGenerator >> defineHierarchy [ tPackage --|> tNamedEntity. tPackage --|> #TEntityMetaLevelDependency. tPackage --|> tSourceEntity. + tPackage --|> tWithClasses. tParameter --|> tStructuralEntity. diff --git a/src/Famix-PharoSmalltalk-Entities/FamixStPackage.class.st b/src/Famix-PharoSmalltalk-Entities/FamixStPackage.class.st index 63d8370de..81b392929 100644 --- a/src/Famix-PharoSmalltalk-Entities/FamixStPackage.class.st +++ b/src/Famix-PharoSmalltalk-Entities/FamixStPackage.class.st @@ -1,8 +1,8 @@ Class { #name : #FamixStPackage, #superclass : #FamixStNamedEntity, - #traits : '(FamixTCohesionCouplingMetrics + FamixTPackage + FamixTWithClasses + FamixTWithGlobalVariables + TOODependencyQueries withPrecedenceOf: TOODependencyQueries)', - #classTraits : '(FamixTCohesionCouplingMetrics classTrait + FamixTPackage classTrait + FamixTWithClasses classTrait + FamixTWithGlobalVariables classTrait + TOODependencyQueries classTrait withPrecedenceOf: TOODependencyQueries classTrait)', + #traits : '(FamixTCohesionCouplingMetrics + FamixTPackage + FamixTWithGlobalVariables + TOODependencyQueries withPrecedenceOf: TOODependencyQueries)', + #classTraits : '(FamixTCohesionCouplingMetrics classTrait + FamixTPackage classTrait + FamixTWithGlobalVariables classTrait + TOODependencyQueries classTrait withPrecedenceOf: TOODependencyQueries classTrait)', #category : #'Famix-PharoSmalltalk-Entities-Entities' } diff --git a/src/Famix-PharoSmalltalk-Generator/FamixPharoSmalltalkGenerator.class.st b/src/Famix-PharoSmalltalk-Generator/FamixPharoSmalltalkGenerator.class.st index ee5c40f4f..b09d1d052 100644 --- a/src/Famix-PharoSmalltalk-Generator/FamixPharoSmalltalkGenerator.class.st +++ b/src/Famix-PharoSmalltalk-Generator/FamixPharoSmalltalkGenerator.class.st @@ -144,7 +144,6 @@ FamixPharoSmalltalkGenerator >> defineHierarchy [ package --|> namedEntity. package --|> #TPackage. package --|> #TWithGlobalVariables. - package --|> #TWithClasses. package --|> #TCohesionCouplingMetrics. package --|> #TOODependencyQueries. package withPrecedenceOf: #TOODependencyQueries. diff --git a/src/Famix-Traits/FamixTPackage.trait.st b/src/Famix-Traits/FamixTPackage.trait.st index f39801111..53aefdc4e 100644 --- a/src/Famix-Traits/FamixTPackage.trait.st +++ b/src/Famix-Traits/FamixTPackage.trait.st @@ -8,8 +8,8 @@ Trait { #instVars : [ '#childEntities => FMMany type: #FamixTPackageable opposite: #parentPackage' ], - #traits : 'FamixTNamedEntity + FamixTSourceEntity + TEntityMetaLevelDependency', - #classTraits : 'FamixTNamedEntity classTrait + FamixTSourceEntity classTrait + TEntityMetaLevelDependency classTrait', + #traits : 'FamixTNamedEntity + FamixTSourceEntity + FamixTWithClasses + TEntityMetaLevelDependency', + #classTraits : 'FamixTNamedEntity classTrait + FamixTSourceEntity classTrait + FamixTWithClasses classTrait + TEntityMetaLevelDependency classTrait', #category : #'Famix-Traits-Package' }