From e4caf15be9836d6014434861820be58ed05f720e Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 21 Nov 2024 16:40:32 +0100 Subject: [PATCH 1/5] Extract TCanBeStub from TSourcedEntity Because all sourced entities cannot all be stub --- .../FamixJavaAccess.class.st | 1 - .../FamixJavaConcretization.class.st | 6 - .../FamixJavaImplementation.class.st | 6 - .../FamixJavaImport.class.st | 6 - .../FamixJavaInheritance.class.st | 6 - .../FamixJavaInvocation.class.st | 1 - .../FamixJavaParameterConcretization.class.st | 6 - .../FamixJavaReference.class.st | 6 - .../FamixJavaSourcedEntity.class.st | 6 - .../FamixGenerator.class.st | 268 +++++++----------- .../FamixStAccess.class.st | 1 - .../FamixStInheritance.class.st | 6 - .../FamixStInvocation.class.st | 1 - .../FamixStReference.class.st | 6 - .../FamixStSourcedEntity.class.st | 6 - .../FamixTest1Association.class.st | 6 - .../FamixTest1SourcedEntity.class.st | 6 - .../FamixTest2Inheritance.class.st | 6 - .../FamixTest2SourcedEntity.class.st | 6 - .../FamixTest3Access.class.st | 1 - .../FamixTest3Invocation.class.st | 1 - .../FamixTest3Reference.class.st | 6 - .../FamixTest3SourcedEntity.class.st | 6 - .../FamixTest6SourcedEntity.class.st | 6 - .../FamixTest7Inheritance.class.st | 6 - .../FamixTest7SourcedEntity.class.st | 6 - .../FamixTest8Infection.class.st | 1 - .../FamixTest8Residence.class.st | 6 - .../FamixTestComposedAssociation.class.st | 6 - .../FamixTestComposed1SourcedEntity.class.st | 6 - .../FamixTestComposed2SourcedEntity.class.st | 6 - src/Famix-Traits/FamixTAccess.trait.st | 1 - src/Famix-Traits/FamixTAssociation.trait.st | 6 - src/Famix-Traits/FamixTCanBeStub.trait.st | 51 ++++ .../FamixTConcretization.trait.st | 6 - .../FamixTDereferencedInvocation.trait.st | 1 - src/Famix-Traits/FamixTFileInclude.trait.st | 6 - .../FamixTImplementation.trait.st | 6 - src/Famix-Traits/FamixTImport.trait.st | 6 - src/Famix-Traits/FamixTInheritance.trait.st | 6 - src/Famix-Traits/FamixTInvocation.trait.st | 1 - src/Famix-Traits/FamixTNamespace.trait.st | 4 +- src/Famix-Traits/FamixTPackage.trait.st | 4 +- .../FamixTParameterConcretization.trait.st | 6 - src/Famix-Traits/FamixTReference.trait.st | 6 - src/Famix-Traits/FamixTSourceEntity.trait.st | 22 -- .../FamixTStructuralEntity.trait.st | 4 +- src/Famix-Traits/FamixTTraitUsage.trait.st | 6 - src/Famix-Traits/FamixTType.trait.st | 4 +- .../FamixTWithStatements.trait.st | 4 +- .../MooseMSEImporterTestInheritance.class.st | 6 - ...MooseMSEImporterTestSourcedEntity.class.st | 6 - 52 files changed, 156 insertions(+), 419 deletions(-) create mode 100644 src/Famix-Traits/FamixTCanBeStub.trait.st diff --git a/src/Famix-Java-Entities/FamixJavaAccess.class.st b/src/Famix-Java-Entities/FamixJavaAccess.class.st index cadc5ab5..a33ca50f 100644 --- a/src/Famix-Java-Entities/FamixJavaAccess.class.st +++ b/src/Famix-Java-Entities/FamixJavaAccess.class.st @@ -25,7 +25,6 @@ | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `isWrite` | `Boolean` | false | Write access| " diff --git a/src/Famix-Java-Entities/FamixJavaConcretization.class.st b/src/Famix-Java-Entities/FamixJavaConcretization.class.st index 19e19ca2..1c3970ae 100644 --- a/src/Famix-Java-Entities/FamixJavaConcretization.class.st +++ b/src/Famix-Java-Entities/FamixJavaConcretization.class.st @@ -21,12 +21,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Java-Entities/FamixJavaImplementation.class.st b/src/Famix-Java-Entities/FamixJavaImplementation.class.st index ec6bccf7..ff0d1cb1 100644 --- a/src/Famix-Java-Entities/FamixJavaImplementation.class.st +++ b/src/Famix-Java-Entities/FamixJavaImplementation.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Java-Entities/FamixJavaImport.class.st b/src/Famix-Java-Entities/FamixJavaImport.class.st index 47e7b43e..56ae013a 100644 --- a/src/Famix-Java-Entities/FamixJavaImport.class.st +++ b/src/Famix-Java-Entities/FamixJavaImport.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Java-Entities/FamixJavaInheritance.class.st b/src/Famix-Java-Entities/FamixJavaInheritance.class.st index adc2489f..aa7aec3b 100644 --- a/src/Famix-Java-Entities/FamixJavaInheritance.class.st +++ b/src/Famix-Java-Entities/FamixJavaInheritance.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Java-Entities/FamixJavaInvocation.class.st b/src/Famix-Java-Entities/FamixJavaInvocation.class.st index 74391453..39016edd 100644 --- a/src/Famix-Java-Entities/FamixJavaInvocation.class.st +++ b/src/Famix-Java-Entities/FamixJavaInvocation.class.st @@ -26,7 +26,6 @@ | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `signature` | `String` | nil | Signature of the message being sent| " diff --git a/src/Famix-Java-Entities/FamixJavaParameterConcretization.class.st b/src/Famix-Java-Entities/FamixJavaParameterConcretization.class.st index cb665765..dc989e97 100644 --- a/src/Famix-Java-Entities/FamixJavaParameterConcretization.class.st +++ b/src/Famix-Java-Entities/FamixJavaParameterConcretization.class.st @@ -21,12 +21,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Java-Entities/FamixJavaReference.class.st b/src/Famix-Java-Entities/FamixJavaReference.class.st index 5ca9020f..16379dd3 100644 --- a/src/Famix-Java-Entities/FamixJavaReference.class.st +++ b/src/Famix-Java-Entities/FamixJavaReference.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Java-Entities/FamixJavaSourcedEntity.class.st b/src/Famix-Java-Entities/FamixJavaSourcedEntity.class.st index 8e2e89b5..3c4e49ab 100644 --- a/src/Famix-Java-Entities/FamixJavaSourcedEntity.class.st +++ b/src/Famix-Java-Entities/FamixJavaSourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-MetamodelGeneration/FamixGenerator.class.st b/src/Famix-MetamodelGeneration/FamixGenerator.class.st index 4d4ab01b..7fcb0556 100644 --- a/src/Famix-MetamodelGeneration/FamixGenerator.class.st +++ b/src/Famix-MetamodelGeneration/FamixGenerator.class.st @@ -129,7 +129,8 @@ Class { 'tConcretization', 'tParameterConcretization', 'tShadowable', - 'tShadower' + 'tShadower', + 'tCanBeStub' ], #category : #'Famix-MetamodelGeneration' } @@ -1131,11 +1132,11 @@ FamixGenerator >> defineHierarchy [ tNamespace --|> tNamedEntity. tNamespace --|> #TEntityMetaLevelDependency. - tNamespace --|> tSourceEntity. + tNamespace --|> tCanBeStub. tPackage --|> tNamedEntity. tPackage --|> #TEntityMetaLevelDependency. - tPackage --|> tSourceEntity. + tPackage --|> tCanBeStub. tParameter --|> tStructuralEntity. @@ -1147,7 +1148,7 @@ FamixGenerator >> defineHierarchy [ tStructuralEntity --|> tNamedEntity. tStructuralEntity --|> #TEntityMetaLevelDependency. - tStructuralEntity --|> tSourceEntity. + tStructuralEntity --|> tCanBeStub. tStructuralEntity --|> tAccessible. tStructuralEntity --|> tTypedEntity. @@ -1159,7 +1160,7 @@ FamixGenerator >> defineHierarchy [ tType --|> tReferenceable. tType --|> tNamedEntity. tType --|> #TEntityMetaLevelDependency. - tType --|> tSourceEntity. + tType --|> tCanBeStub. tUnknownVariable --|> tStructuralEntity. @@ -1167,7 +1168,7 @@ FamixGenerator >> defineHierarchy [ tWithStatements --|> tWithAccesses. tWithStatements --|> tWithInvocations. - tWithStatements --|> tSourceEntity. + tWithStatements --|> tCanBeStub. tWithStatements --|> tWithReferences. tConcretization --|> tAssociation. @@ -1177,6 +1178,8 @@ FamixGenerator >> defineHierarchy [ tGenericParameterType --|> tType. tException --|> tThrowable. + + tCanBeStub --|> tSourceEntity ] { #category : #definition } @@ -1227,7 +1230,7 @@ FamixGenerator >> defineProperties [ (tComment property: #content type: #String) comment: 'Content of the comment as a String'. - (tSourceEntity property: #isStub type: #Boolean defaultValue: false) + (tCanBeStub property: #isStub type: #Boolean defaultValue: false) comment: 'Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.'. @@ -1645,218 +1648,165 @@ FamixGenerator >> defineTraits [ tCanBeAbstract := builder newTraitNamed: #TCanBeAbstract. tCanBeFinal := builder newTraitNamed: #TCanBeFinal. - tAccess := builder newTraitNamed: #TAccess. - tAccess comment: self commentForTAccess. + tAccess := builder newTraitNamed: #TAccess comment: self commentForTAccess. tAccess withTesting. - tAccessible := builder newTraitNamed: #TAccessible. - tAccessible comment: self commentForTAccessible. + tAccessible := builder newTraitNamed: #TAccessible comment: self commentForTAccessible. - tAnnotationInstance := builder newTraitNamed: #TAnnotationInstance. - tAnnotationInstance comment: self commentForTAnnotationInstance. + tAnnotationInstance := builder newTraitNamed: #TAnnotationInstance comment: self commentForTAnnotationInstance. tAnnotationInstance withGroup. - tAnnotationInstanceAttribute := builder newTraitNamed: #TAnnotationInstanceAttribute. - tAnnotationInstanceAttribute comment: self commentForTAnnotationInstanceAttribute. + tAnnotationInstanceAttribute := builder newTraitNamed: #TAnnotationInstanceAttribute comment: self commentForTAnnotationInstanceAttribute. - tAnnotationType := builder newTraitNamed: #TAnnotationType. - tAnnotationType comment: self commentForTAnnotationType. + tAnnotationType := builder newTraitNamed: #TAnnotationType comment: self commentForTAnnotationType. tAnnotationType withGroup. - tAnnotationTypeAttribute := builder newTraitNamed: #TAnnotationTypeAttribute. - tAnnotationTypeAttribute comment: self commentForTAnnotationTypeAttribute. + tAnnotationTypeAttribute := builder newTraitNamed: #TAnnotationTypeAttribute comment: self commentForTAnnotationTypeAttribute. - tAssociation := builder newTraitNamed: #TAssociation. - tAssociation comment: self commentForTAssociation. + tAssociation := builder newTraitNamed: #TAssociation comment: self commentForTAssociation. tAssociation withTesting. - tAttribute := builder newTraitNamed: #TAttribute. - tAttribute comment: self commentForTAttribute. + tAttribute := builder newTraitNamed: #TAttribute comment: self commentForTAttribute. tAttribute withTesting. tCanBeClassSide := builder newTraitNamed: #TCanBeClassSide. - tComment := builder newTraitNamed: #TComment. - tComment comment: self commentForTComment. + tComment := builder newTraitNamed: #TComment comment: self commentForTComment. - tCompilationUnit := builder newTraitNamed: #TCompilationUnit. - tCompilationUnit comment: self commentForTCompilationUnit. + tCompilationUnit := builder newTraitNamed: #TCompilationUnit comment: self commentForTCompilationUnit. - tClass := builder newTraitNamed: #TClass. - tClass comment: self commentForTClass. + tClass := builder newTraitNamed: #TClass comment: self commentForTClass. tClass withTesting. tClassMetrics := builder newTraitNamed: #TClassMetrics. tClassGroup := tClass withGroup. - tDereferencedInvocation := builder newTraitNamed: #TDereferencedInvocation. - tDereferencedInvocation comment: self commentForTDereferencedInvocation. + tDereferencedInvocation := builder newTraitNamed: #TDereferencedInvocation comment: self commentForTDereferencedInvocation. - tEnumValue := builder newTraitNamed: #TEnumValue. - tEnumValue comment: self commentForTEnumValue. + tEnumValue := builder newTraitNamed: #TEnumValue comment: self commentForTEnumValue. tEnumValue withTesting. - tEnum := builder newTraitNamed: #TEnum. - tEnum comment: self commentForTEnum. + tEnum := builder newTraitNamed: #TEnum comment: self commentForTEnum. - tException := builder newTraitNamed: #TException. - tException comment: self commentForTException. + tException := builder newTraitNamed: #TException comment: self commentForTException. tException withTesting. - tFile := builder newTraitNamed: #TFile. - tFile comment: self commentForTFile. + tFile := builder newTraitNamed: #TFile comment: self commentForTFile. tFile withGroup. - tFolder := builder newTraitNamed: #TFolder. - tFolder comment: self commentForTFolder. + tFolder := builder newTraitNamed: #TFolder comment: self commentForTFolder. tFolder withGroup. tFileSystemEntity := builder newTraitNamed: #TFileSystemEntity. - tFileAnchor := builder newTraitNamed: #TFileAnchor. - tFileAnchor comment: self commentForTFileAnchor. + tFileAnchor := builder newTraitNamed: #TFileAnchor comment: self commentForTFileAnchor. tFileAnchor withTesting. - tFileNavigation := builder newTraitNamed: #TFileNavigation. - tFileNavigation comment: self commentForTFileNavigation. + tFileNavigation := builder newTraitNamed: #TFileNavigation comment: self commentForTFileNavigation. - tIndexedFileNavigation := builder newTraitNamed: #TIndexedFileNavigation. - tIndexedFileNavigation comment: self commentForTIndexedFileNavigation. + tIndexedFileNavigation := builder newTraitNamed: #TIndexedFileNavigation comment: self commentForTIndexedFileNavigation. - tFileInclude := builder newTraitNamed: #TFileInclude. - tFileInclude comment: self commentForTFileInclude. + tFileInclude := builder newTraitNamed: #TFileInclude comment: self commentForTFileInclude. - tFunction := builder newTraitNamed: #TFunction. - tFunction comment: self commentForTFunction. + tFunction := builder newTraitNamed: #TFunction comment: self commentForTFunction. tFunction withTesting. - tGlobalVariable := builder newTraitNamed: #TGlobalVariable. - tGlobalVariable comment: self commentForTGlobalVariable. + tGlobalVariable := builder newTraitNamed: #TGlobalVariable comment: self commentForTGlobalVariable. tGlobalVariable withGroup. tGlobalVariable withTesting. - tWithGlobalVariables := builder newTraitNamed: #TWithGlobalVariables. - tWithGlobalVariables comment: self commentForTWithGlobalVariables. + tWithGlobalVariables := builder newTraitNamed: #TWithGlobalVariables comment: self commentForTWithGlobalVariables. - tHeader := builder newTraitNamed: #THeader. - tHeader comment: self commentForTHeader. + tHeader := builder newTraitNamed: #THeader comment: self commentForTHeader. - tImplicitVariable := builder newTraitNamed: #TImplicitVariable. - tImplicitVariable comment: self commentForTImplicitVariable. + tImplicitVariable := builder newTraitNamed: #TImplicitVariable comment: self commentForTImplicitVariable. tImplicitVariable withTesting. tImport := builder newTraitNamed: #TImport. tImportable := builder newTraitNamed: #TImportable. tWithImports := builder newTraitNamed: #TWithImports. - tInheritance := builder newTraitNamed: #TInheritance. - tInheritance comment: self commentForTInheritance. + tInheritance := builder newTraitNamed: #TInheritance comment: self commentForTInheritance. tInheritance withTesting. - tInvocable := builder newTraitNamed: #TInvocable. - tInvocable comment: self commentForTInvocable. + tInvocable := builder newTraitNamed: #TInvocable comment: self commentForTInvocable. - tInvocation := builder newTraitNamed: #TInvocation. - tInvocation comment: self commentForTInvocation. + tInvocation := builder newTraitNamed: #TInvocation comment: self commentForTInvocation. tInvocation withTesting. tInvocation withGroup. tInvocationsReceiver := builder newTraitNamed: #TInvocationsReceiver. tInvocationsReceiver comment: self commentForTInvocationsReceiver. - tLambda := builder newTraitNamed: #TLambda. - tLambda comment: self commentForTLambda. + tLambda := builder newTraitNamed: #TLambda comment: self commentForTLambda. - tLocalVariable := builder newTraitNamed: #TLocalVariable. - tLocalVariable comment: self commentForTLocalVariable. + tLocalVariable := builder newTraitNamed: #TLocalVariable comment: self commentForTLocalVariable. tLocalVariable withTesting. - tMethod := builder newTraitNamed: #TMethod. - tMethod comment: self commentForTMethod. + tMethod := builder newTraitNamed: #TMethod comment: self commentForTMethod. tMethod withTesting. tMethod withGroup. tMethodMetrics := builder newTraitNamed: #TMethodMetrics. - tHasKind := builder newTraitNamed: #THasKind. - tHasKind comment: self commentForTHasKind. + tHasKind := builder newTraitNamed: #THasKind comment: self commentForTHasKind. - tModule := builder newTraitNamed: #TModule. - tModule comment: self commentForTModule. + tModule := builder newTraitNamed: #TModule comment: self commentForTModule. tModule withTesting. - tNamedEntity := builder newTraitNamed: #TNamedEntity. - tNamedEntity comment: self commentForTNamed. + tNamedEntity := builder newTraitNamed: #TNamedEntity comment: self commentForTNamed. - tNamespace := builder newTraitNamed: #TNamespace. - tNamespace comment: self commentForTNamespace. + tNamespace := builder newTraitNamed: #TNamespace comment: self commentForTNamespace. tNamespace withTesting. tNamespace withGroup. - tPackage := builder newTraitNamed: #TPackage. - tPackage comment: self commentForTPackage. + tPackage := builder newTraitNamed: #TPackage comment: self commentForTPackage. tPackage withTesting. tPackage withGroup. - tPackageable := builder newTraitNamed: #TPackageable. - tPackageable comment: self commentForTPackageable. + tPackageable := builder newTraitNamed: #TPackageable comment: self commentForTPackageable. - tParameter := builder newTraitNamed: #TParameter. - tParameter comment: self commentForTParameter. + tParameter := builder newTraitNamed: #TParameter comment: self commentForTParameter. - tPreprocessorDefine := builder newTraitNamed: #TPreprocessorDefine. - tPreprocessorDefine comment: self commentForTPreprocessorDefine. + tPreprocessorDefine := builder newTraitNamed: #TPreprocessorDefine comment: self commentForTPreprocessorDefine. - tPreprocessorIfdef := builder newTraitNamed: #TPreprocessorIfdef. - tPreprocessorIfdef comment: self commentForTPreprocessorIfdef. + tPreprocessorIfdef := builder newTraitNamed: #TPreprocessorIfdef comment: self commentForTPreprocessorIfdef. tPrimitiveType := builder newTraitNamed: #TPrimitiveType. tPrimitiveType withTesting. - tReference := builder newTraitNamed: #TReference. - tReference comment: self commentForTReference. + tReference := builder newTraitNamed: #TReference comment: self commentForTReference. tReference withTesting. - tReferenceable := builder newTraitNamed: #TReferenceable. - tReferenceable comment: self commentForTReferenceable. + tReferenceable := builder newTraitNamed: #TReferenceable comment: self commentForTReferenceable. - tRelativeSourceAnchor := builder newTraitNamed: #TRelativeSourceAnchor. - tRelativeSourceAnchor comment: self commentForTRelativeSourceAnchor. + tRelativeSourceAnchor := builder newTraitNamed: #TRelativeSourceAnchor comment: self commentForTRelativeSourceAnchor. - tSourceAnchor := builder newTraitNamed: #TSourceAnchor. - tSourceAnchor comment: self commentForTSourceAnchor. + tSourceAnchor := builder newTraitNamed: #TSourceAnchor comment: self commentForTSourceAnchor. - tSourceEntity := builder newTraitNamed: #TSourceEntity. - tSourceEntity comment: self commentForTSourceEntity. + tSourceEntity := builder newTraitNamed: #TSourceEntity comment: self commentForTSourceEntity. - tSourceLanguage := builder newTraitNamed: #TSourceLanguage. - tSourceLanguage comment: self commentForTSourceLanguage. + tSourceLanguage := builder newTraitNamed: #TSourceLanguage comment: self commentForTSourceLanguage. - tStructuralEntity := builder newTraitNamed: #TStructuralEntity. - tStructuralEntity comment: self commentForTStructuralEntity. + tStructuralEntity := builder newTraitNamed: #TStructuralEntity comment: self commentForTStructuralEntity. tStructuralEntity withTesting. - tTemplate := builder newTraitNamed: #TTemplate. - tTemplate comment: self commentForTTemplate. + tTemplate := builder newTraitNamed: #TTemplate comment: self commentForTTemplate. - tTemplateUser := builder newTraitNamed: #TTemplateUser. - tTemplateUser comment: self commentForTTemplateUser. + tTemplateUser := builder newTraitNamed: #TTemplateUser comment: self commentForTTemplateUser. - tTrait := builder newTraitNamed: #TTrait. - tTrait comment: self commentForTTrait. + tTrait := builder newTraitNamed: #TTrait comment: self commentForTTrait. tTraitUsage := builder newTraitNamed: #TTraitUsage. tTraitUser := builder newTraitNamed: #TTraitUser. - tType := builder newTraitNamed: #TType. - tType comment: self commentForTType. + tType := builder newTraitNamed: #TType comment: self commentForTType. tType withTesting. tTypeGroup := tType withGroup. - tTypeAlias := builder newTraitNamed: #TTypeAlias. - tTypeAlias comment: self commentForTTypeAlias. + tTypeAlias := builder newTraitNamed: #TTypeAlias comment: self commentForTTypeAlias. tTypedAnnotationInstance := builder newTraitNamed: #TTypedAnnotationInstance. tTypedAnnotationInstance comment: self commentForTTypedAnnotationInstance. @@ -1902,65 +1852,45 @@ FamixGenerator >> defineTraits [ tWithExceptions := builder newTraitNamed: #TWithExceptions. tWithExceptions comment: self commentForTWithExceptions. - tWithFileIncludes := builder newTraitNamed: #TWithFileIncludes. - tWithFileIncludes comment: self commentForTWithFileIncludes. + tWithFileIncludes := builder newTraitNamed: #TWithFileIncludes comment: self commentForTWithFileIncludes. - tWithFiles := builder newTraitNamed: #TWithFiles. - tWithFiles comment: self commentForTWithFiles. + tWithFiles := builder newTraitNamed: #TWithFiles comment: self commentForTWithFiles. - tWithFunctions := builder newTraitNamed: #TWithFunctions. - tWithFunctions comment: self commentForTWithFunctions. + tWithFunctions := builder newTraitNamed: #TWithFunctions comment: self commentForTWithFunctions. - tWithHeaders := builder newTraitNamed: #TWithHeaders. - tWithHeaders comment: self commentForTWithHeader. + tWithHeaders := builder newTraitNamed: #TWithHeaders comment: self commentForTWithHeader. - tWithImplicitVariables := builder newTraitNamed: #TWithImplicitVariables. - tWithImplicitVariables comment: self commentForTWithImplicitVariables. + tWithImplicitVariables := builder newTraitNamed: #TWithImplicitVariables comment: self commentForTWithImplicitVariables. - tWithInheritances := builder newTraitNamed: #TWithInheritances. - tWithInheritances comment: self commentForTWithInheritances. + tWithInheritances := builder newTraitNamed: #TWithInheritances comment: self commentForTWithInheritances. - tWithInvocations := builder newTraitNamed: #TWithInvocations. - tWithInvocations comment: self commentForTWithInvocations. + tWithInvocations := builder newTraitNamed: #TWithInvocations comment: self commentForTWithInvocations. - tWithLambdas := builder newTraitNamed: #TWithLambdas. - tWithLambdas comment: self commentForTWithLambdas. + tWithLambdas := builder newTraitNamed: #TWithLambdas comment: self commentForTWithLambdas. - tWithLocalVariables := builder newTraitNamed: #TWithLocalVariables. - tWithLocalVariables comment: self commentForTWithLocalVariables. + tWithLocalVariables := builder newTraitNamed: #TWithLocalVariables comment: self commentForTWithLocalVariables. - tWithMethods := builder newTraitNamed: #TWithMethods. - tWithMethods comment: self commentForTWithMethods. + tWithMethods := builder newTraitNamed: #TWithMethods comment: self commentForTWithMethods. - tDefinedInModule := builder newTraitNamed: #TDefinedInModule. - tDefinedInModule comment: self commentForTDefinedInModule. + tDefinedInModule := builder newTraitNamed: #TDefinedInModule comment: self commentForTDefinedInModule. - tWithParameters := builder newTraitNamed: #TWithParameters. - tWithParameters comment: self commentForTWithParameters. + tWithParameters := builder newTraitNamed: #TWithParameters comment: self commentForTWithParameters. - tWithReferences := builder newTraitNamed: #TWithReferences. - tWithReferences comment: self commentForTWithReferences. + tWithReferences := builder newTraitNamed: #TWithReferences comment: self commentForTWithReferences. - tHasSignature := builder newTraitNamed: #THasSignature. - tHasSignature comment: self commentForTHasSignature. + tHasSignature := builder newTraitNamed: #THasSignature comment: self commentForTHasSignature. - tWithSourceLanguages := builder newTraitNamed: #TWithSourceLanguages. - tWithSourceLanguages comment: self commentForTWithSourceLanguage. + tWithSourceLanguages := builder newTraitNamed: #TWithSourceLanguages comment: self commentForTWithSourceLanguage. - tWithTemplates := builder newTraitNamed: #TWithTemplates. - tWithTemplates comment: self commentForTWithTemplates. + tWithTemplates := builder newTraitNamed: #TWithTemplates comment: self commentForTWithTemplates. - tWithTraits := builder newTraitNamed: #TWithTraits. - tWithTraits comment: self commentForTWithTraits. + tWithTraits := builder newTraitNamed: #TWithTraits comment: self commentForTWithTraits. - tWithTypeAliases := builder newTraitNamed: #TWithTypeAliases. - tWithTypeAliases comment: self commentForTWithTypeAliases. + tWithTypeAliases := builder newTraitNamed: #TWithTypeAliases comment: self commentForTWithTypeAliases. - tWithTypes := builder newTraitNamed: #TWithTypes. - tWithTypes comment: self commentForTWithTypes. + tWithTypes := builder newTraitNamed: #TWithTypes comment: self commentForTWithTypes. - tHasImmediateSource := builder newTraitNamed: #THasImmediateSource. - tHasImmediateSource comment: self commentForTHasImmediateSource. + tHasImmediateSource := builder newTraitNamed: #THasImmediateSource comment: self commentForTHasImmediateSource. tHasModifiers := builder newTraitNamed: #THasModifiers. tHasVisibility := builder newTraitNamed: #THasVisibility. @@ -1975,37 +1905,29 @@ FamixGenerator >> defineTraits [ tLCOMMetrics := builder newTraitNamed: #TLCOMMetrics. - tImplementable := builder newTraitNamed: #TImplementable. - tImplementable comment: self commentForTImplementable. + tImplementable := builder newTraitNamed: #TImplementable comment: self commentForTImplementable. - tCanImplement := builder newTraitNamed: #TCanImplement. - tCanImplement comment: self commentForTCanImplement. + tCanImplement := builder newTraitNamed: #TCanImplement comment: self commentForTCanImplement. tImplementation := builder newTraitNamed: #TImplementation. - tParametricEntity := builder newTraitNamed: #TParametricEntity. - tParametricEntity comment: self commentForTParametricEntity. + tParametricEntity := builder newTraitNamed: #TParametricEntity comment: self commentForTParametricEntity. tParametricEntity withTesting. - tConcreteParameterType := builder newTraitNamed: #TConcreteParameterType. - tConcreteParameterType comment: self commentForTConcreteParameterType. + tConcreteParameterType := builder newTraitNamed: #TConcreteParameterType comment: self commentForTConcreteParameterType. - tGenericParameterType := builder newTraitNamed: #TGenericParameterType. - tGenericParameterType comment: self commentForTGenericParameterType. + tGenericParameterType := builder newTraitNamed: #TGenericParameterType comment: self commentForTGenericParameterType. - tConcretization := builder newTraitNamed: #TConcretization. - tConcretization comment: self commentForTConcretization. + tConcretization := builder newTraitNamed: #TConcretization comment: self commentForTConcretization. - tParameterConcretization := builder newTraitNamed: #TParameterConcretization. - tParameterConcretization comment: self commentForTParameterConcretization. + tParameterConcretization := builder newTraitNamed: #TParameterConcretization comment: self commentForTParameterConcretization. - tThrowable := builder newTraitNamed: #TThrowable. - tThrowable comment: self commentForTThrowable. + tThrowable := builder newTraitNamed: #TThrowable comment: self commentForTThrowable. - tShadowable := builder newTraitNamed: #TShadowable. + tShadowable := builder newTraitNamed: #TShadowable comment: self commentForTShadowable. tShadowable withTesting. - tShadowable comment: self commentForTShadowable. - tShadower := builder newTraitNamed: #TShadower. - tShadower comment: self commentForTShadower + tShadower := builder newTraitNamed: #TShadower comment: self commentForTShadower. + + tCanBeStub := builder newTraitNamed: #TCanBeStub. ] diff --git a/src/Famix-PharoSmalltalk-Entities/FamixStAccess.class.st b/src/Famix-PharoSmalltalk-Entities/FamixStAccess.class.st index aebe7edc..1cd518d1 100644 --- a/src/Famix-PharoSmalltalk-Entities/FamixStAccess.class.st +++ b/src/Famix-PharoSmalltalk-Entities/FamixStAccess.class.st @@ -25,7 +25,6 @@ | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `isWrite` | `Boolean` | false | Write access| " diff --git a/src/Famix-PharoSmalltalk-Entities/FamixStInheritance.class.st b/src/Famix-PharoSmalltalk-Entities/FamixStInheritance.class.st index 181379c9..3a974e80 100644 --- a/src/Famix-PharoSmalltalk-Entities/FamixStInheritance.class.st +++ b/src/Famix-PharoSmalltalk-Entities/FamixStInheritance.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-PharoSmalltalk-Entities/FamixStInvocation.class.st b/src/Famix-PharoSmalltalk-Entities/FamixStInvocation.class.st index 745dbaac..1ae71663 100644 --- a/src/Famix-PharoSmalltalk-Entities/FamixStInvocation.class.st +++ b/src/Famix-PharoSmalltalk-Entities/FamixStInvocation.class.st @@ -26,7 +26,6 @@ | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `signature` | `String` | nil | Signature of the message being sent| " diff --git a/src/Famix-PharoSmalltalk-Entities/FamixStReference.class.st b/src/Famix-PharoSmalltalk-Entities/FamixStReference.class.st index 609a2e1e..37c47f01 100644 --- a/src/Famix-PharoSmalltalk-Entities/FamixStReference.class.st +++ b/src/Famix-PharoSmalltalk-Entities/FamixStReference.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-PharoSmalltalk-Entities/FamixStSourcedEntity.class.st b/src/Famix-PharoSmalltalk-Entities/FamixStSourcedEntity.class.st index 720ab864..7beb3250 100644 --- a/src/Famix-PharoSmalltalk-Entities/FamixStSourcedEntity.class.st +++ b/src/Famix-PharoSmalltalk-Entities/FamixStSourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test1-Entities/FamixTest1Association.class.st b/src/Famix-Test1-Entities/FamixTest1Association.class.st index 12e3d5bb..56f75716 100644 --- a/src/Famix-Test1-Entities/FamixTest1Association.class.st +++ b/src/Famix-Test1-Entities/FamixTest1Association.class.st @@ -10,12 +10,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test1-Entities/FamixTest1SourcedEntity.class.st b/src/Famix-Test1-Entities/FamixTest1SourcedEntity.class.st index 112c297d..e5ff24fb 100644 --- a/src/Famix-Test1-Entities/FamixTest1SourcedEntity.class.st +++ b/src/Famix-Test1-Entities/FamixTest1SourcedEntity.class.st @@ -10,12 +10,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test2-Entities/FamixTest2Inheritance.class.st b/src/Famix-Test2-Entities/FamixTest2Inheritance.class.st index d5fe6397..ed7a0b68 100644 --- a/src/Famix-Test2-Entities/FamixTest2Inheritance.class.st +++ b/src/Famix-Test2-Entities/FamixTest2Inheritance.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test2-Entities/FamixTest2SourcedEntity.class.st b/src/Famix-Test2-Entities/FamixTest2SourcedEntity.class.st index 72f3e5e8..22a8fbbc 100644 --- a/src/Famix-Test2-Entities/FamixTest2SourcedEntity.class.st +++ b/src/Famix-Test2-Entities/FamixTest2SourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test3-Entities/FamixTest3Access.class.st b/src/Famix-Test3-Entities/FamixTest3Access.class.st index 79196d7d..baa96ad7 100644 --- a/src/Famix-Test3-Entities/FamixTest3Access.class.st +++ b/src/Famix-Test3-Entities/FamixTest3Access.class.st @@ -25,7 +25,6 @@ | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `isWrite` | `Boolean` | false | Write access| " diff --git a/src/Famix-Test3-Entities/FamixTest3Invocation.class.st b/src/Famix-Test3-Entities/FamixTest3Invocation.class.st index 0a7ccb1a..a802df39 100644 --- a/src/Famix-Test3-Entities/FamixTest3Invocation.class.st +++ b/src/Famix-Test3-Entities/FamixTest3Invocation.class.st @@ -26,7 +26,6 @@ | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `signature` | `String` | nil | Signature of the message being sent| " diff --git a/src/Famix-Test3-Entities/FamixTest3Reference.class.st b/src/Famix-Test3-Entities/FamixTest3Reference.class.st index 49ec0c72..1c543d3e 100644 --- a/src/Famix-Test3-Entities/FamixTest3Reference.class.st +++ b/src/Famix-Test3-Entities/FamixTest3Reference.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test3-Entities/FamixTest3SourcedEntity.class.st b/src/Famix-Test3-Entities/FamixTest3SourcedEntity.class.st index e2b3253f..7e8b93fd 100644 --- a/src/Famix-Test3-Entities/FamixTest3SourcedEntity.class.st +++ b/src/Famix-Test3-Entities/FamixTest3SourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test6-Entities/FamixTest6SourcedEntity.class.st b/src/Famix-Test6-Entities/FamixTest6SourcedEntity.class.st index 86e619b7..e8fb95b7 100644 --- a/src/Famix-Test6-Entities/FamixTest6SourcedEntity.class.st +++ b/src/Famix-Test6-Entities/FamixTest6SourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test7-Entities/FamixTest7Inheritance.class.st b/src/Famix-Test7-Entities/FamixTest7Inheritance.class.st index 4746dead..64ac9e4c 100644 --- a/src/Famix-Test7-Entities/FamixTest7Inheritance.class.st +++ b/src/Famix-Test7-Entities/FamixTest7Inheritance.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test7-Entities/FamixTest7SourcedEntity.class.st b/src/Famix-Test7-Entities/FamixTest7SourcedEntity.class.st index a75911c3..76bd01e6 100644 --- a/src/Famix-Test7-Entities/FamixTest7SourcedEntity.class.st +++ b/src/Famix-Test7-Entities/FamixTest7SourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test8-Entities/FamixTest8Infection.class.st b/src/Famix-Test8-Entities/FamixTest8Infection.class.st index 343d75ea..56fd151c 100644 --- a/src/Famix-Test8-Entities/FamixTest8Infection.class.st +++ b/src/Famix-Test8-Entities/FamixTest8Infection.class.st @@ -26,7 +26,6 @@ | Name | Type | Default value | Comment | |---| | `isInvasive` | `Boolean` | false | | -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Test8-Entities/FamixTest8Residence.class.st b/src/Famix-Test8-Entities/FamixTest8Residence.class.st index d155669a..906866fc 100644 --- a/src/Famix-Test8-Entities/FamixTest8Residence.class.st +++ b/src/Famix-Test8-Entities/FamixTest8Residence.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-TestComposedMetamodel-Entities/FamixTestComposedAssociation.class.st b/src/Famix-TestComposedMetamodel-Entities/FamixTestComposedAssociation.class.st index b86dc10f..e377154a 100644 --- a/src/Famix-TestComposedMetamodel-Entities/FamixTestComposedAssociation.class.st +++ b/src/Famix-TestComposedMetamodel-Entities/FamixTestComposedAssociation.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-TestComposedSubmetamodel1-Entities/FamixTestComposed1SourcedEntity.class.st b/src/Famix-TestComposedSubmetamodel1-Entities/FamixTestComposed1SourcedEntity.class.st index a93a30b3..bb601299 100644 --- a/src/Famix-TestComposedSubmetamodel1-Entities/FamixTestComposed1SourcedEntity.class.st +++ b/src/Famix-TestComposedSubmetamodel1-Entities/FamixTestComposed1SourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-TestComposedSubmetamodel2-Entities/FamixTestComposed2SourcedEntity.class.st b/src/Famix-TestComposedSubmetamodel2-Entities/FamixTestComposed2SourcedEntity.class.st index ca83acde..49f96b7d 100644 --- a/src/Famix-TestComposedSubmetamodel2-Entities/FamixTestComposed2SourcedEntity.class.st +++ b/src/Famix-TestComposedSubmetamodel2-Entities/FamixTestComposed2SourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Famix-Traits/FamixTAccess.trait.st b/src/Famix-Traits/FamixTAccess.trait.st index c7586ca1..3fe79b0a 100644 --- a/src/Famix-Traits/FamixTAccess.trait.st +++ b/src/Famix-Traits/FamixTAccess.trait.st @@ -38,7 +38,6 @@ For each access in the source code, there is one famix access created even if it | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `isWrite` | `Boolean` | false | Write access| " diff --git a/src/Famix-Traits/FamixTAssociation.trait.st b/src/Famix-Traits/FamixTAssociation.trait.st index b0c0ed57..1e690ff8 100644 --- a/src/Famix-Traits/FamixTAssociation.trait.st +++ b/src/Famix-Traits/FamixTAssociation.trait.st @@ -28,12 +28,6 @@ will produce two invocation associations first from method a to method b, and se | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTCanBeStub.trait.st b/src/Famix-Traits/FamixTCanBeStub.trait.st new file mode 100644 index 00000000..4c31d71a --- /dev/null +++ b/src/Famix-Traits/FamixTCanBeStub.trait.st @@ -0,0 +1,51 @@ +" +## Relations +====================== + +### Other +| Relation | Origin | Opposite | Type | Comment | +|---| +| `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| + +" +Trait { + #name : #FamixTCanBeStub, + #instVars : [ + '#isStub => FMProperty defaultValue: false' + ], + #traits : 'FamixTSourceEntity', + #classTraits : 'FamixTSourceEntity classTrait', + #category : #'Famix-Traits-Traits' +} + +{ #category : #meta } +FamixTCanBeStub classSide >> annotation [ + + + + + ^ self +] + +{ #category : #accessing } +FamixTCanBeStub >> isStub [ + + + + + ^ isStub ifNil: [ isStub := false ] +] + +{ #category : #accessing } +FamixTCanBeStub >> isStub: anObject [ + + isStub := anObject +] diff --git a/src/Famix-Traits/FamixTConcretization.trait.st b/src/Famix-Traits/FamixTConcretization.trait.st index 0de77ea8..b3cf9a64 100644 --- a/src/Famix-Traits/FamixTConcretization.trait.st +++ b/src/Famix-Traits/FamixTConcretization.trait.st @@ -21,12 +21,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTDereferencedInvocation.trait.st b/src/Famix-Traits/FamixTDereferencedInvocation.trait.st index 4ba166bc..10d07857 100644 --- a/src/Famix-Traits/FamixTDereferencedInvocation.trait.st +++ b/src/Famix-Traits/FamixTDereferencedInvocation.trait.st @@ -33,7 +33,6 @@ It has a referencer which is the pointer variable | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `signature` | `String` | nil | Signature of the message being sent| " diff --git a/src/Famix-Traits/FamixTFileInclude.trait.st b/src/Famix-Traits/FamixTFileInclude.trait.st index 16931b27..4a7a102f 100644 --- a/src/Famix-Traits/FamixTFileInclude.trait.st +++ b/src/Famix-Traits/FamixTFileInclude.trait.st @@ -12,12 +12,6 @@ | `target` | `FamixTFileInclude` | `incomingIncludeRelations` | `FamixTWithFileIncludes` | The file that is included| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTImplementation.trait.st b/src/Famix-Traits/FamixTImplementation.trait.st index a413a1a6..01015d8a 100644 --- a/src/Famix-Traits/FamixTImplementation.trait.st +++ b/src/Famix-Traits/FamixTImplementation.trait.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTImport.trait.st b/src/Famix-Traits/FamixTImport.trait.st index 6999ca48..7b5f5cdd 100644 --- a/src/Famix-Traits/FamixTImport.trait.st +++ b/src/Famix-Traits/FamixTImport.trait.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTInheritance.trait.st b/src/Famix-Traits/FamixTInheritance.trait.st index 7705e3da..47b054c9 100644 --- a/src/Famix-Traits/FamixTInheritance.trait.st +++ b/src/Famix-Traits/FamixTInheritance.trait.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTInvocation.trait.st b/src/Famix-Traits/FamixTInvocation.trait.st index 259686d3..fe2df6aa 100644 --- a/src/Famix-Traits/FamixTInvocation.trait.st +++ b/src/Famix-Traits/FamixTInvocation.trait.st @@ -37,7 +37,6 @@ will produce one invocation association from current method to a variable anObje | Name | Type | Default value | Comment | |---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | `signature` | `String` | nil | Signature of the message being sent| " diff --git a/src/Famix-Traits/FamixTNamespace.trait.st b/src/Famix-Traits/FamixTNamespace.trait.st index 12766099..138fe867 100644 --- a/src/Famix-Traits/FamixTNamespace.trait.st +++ b/src/Famix-Traits/FamixTNamespace.trait.st @@ -25,8 +25,8 @@ When an entity is placed inside a namespace, the fully qualified name (mooseName " Trait { #name : #FamixTNamespace, - #traits : 'FamixTNamedEntity + FamixTSourceEntity + TEntityMetaLevelDependency', - #classTraits : 'FamixTNamedEntity classTrait + FamixTSourceEntity classTrait + TEntityMetaLevelDependency classTrait', + #traits : 'FamixTCanBeStub + FamixTNamedEntity + TEntityMetaLevelDependency', + #classTraits : 'FamixTCanBeStub classTrait + FamixTNamedEntity classTrait + TEntityMetaLevelDependency classTrait', #category : #'Famix-Traits-Named' } diff --git a/src/Famix-Traits/FamixTPackage.trait.st b/src/Famix-Traits/FamixTPackage.trait.st index 52e69802..3b7abbed 100644 --- a/src/Famix-Traits/FamixTPackage.trait.st +++ b/src/Famix-Traits/FamixTPackage.trait.st @@ -31,8 +31,8 @@ Trait { #instVars : [ '#childEntities => FMMany type: #FamixTPackageable opposite: #parentPackage' ], - #traits : 'FamixTNamedEntity + FamixTSourceEntity + TEntityMetaLevelDependency', - #classTraits : 'FamixTNamedEntity classTrait + FamixTSourceEntity classTrait + TEntityMetaLevelDependency classTrait', + #traits : 'FamixTCanBeStub + FamixTNamedEntity + TEntityMetaLevelDependency', + #classTraits : 'FamixTCanBeStub classTrait + FamixTNamedEntity classTrait + TEntityMetaLevelDependency classTrait', #category : #'Famix-Traits-Package' } diff --git a/src/Famix-Traits/FamixTParameterConcretization.trait.st b/src/Famix-Traits/FamixTParameterConcretization.trait.st index dfaed0bb..7996da91 100644 --- a/src/Famix-Traits/FamixTParameterConcretization.trait.st +++ b/src/Famix-Traits/FamixTParameterConcretization.trait.st @@ -21,12 +21,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTReference.trait.st b/src/Famix-Traits/FamixTReference.trait.st index 52d39552..d71f6dd3 100644 --- a/src/Famix-Traits/FamixTReference.trait.st +++ b/src/Famix-Traits/FamixTReference.trait.st @@ -32,12 +32,6 @@ Note that FamixTReference was defined between two FamixTContainerEntity entities | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTSourceEntity.trait.st b/src/Famix-Traits/FamixTSourceEntity.trait.st index b2b0058e..d5e7a929 100644 --- a/src/Famix-Traits/FamixTSourceEntity.trait.st +++ b/src/Famix-Traits/FamixTSourceEntity.trait.st @@ -10,18 +10,11 @@ FamixTSourcedEntity models any fact in a program source and it is the superclass | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { #name : #FamixTSourceEntity, #instVars : [ - '#isStub => FMProperty defaultValue: false', '#sourceAnchor => FMOne type: #FamixTSourceAnchor opposite: #element' ], #category : #'Famix-Traits-SourceAnchor' @@ -80,21 +73,6 @@ FamixTSourceEntity >> hasSourceAnchor [ ^ self sourceAnchor isNotNil ] -{ #category : #accessing } -FamixTSourceEntity >> isStub [ - - - - - ^ isStub ifNil: [ isStub := false ] -] - -{ #category : #accessing } -FamixTSourceEntity >> isStub: anObject [ - - isStub := anObject -] - { #category : #'source anchor' } FamixTSourceEntity >> multipleFileAnchorClass [ ^ self mooseModel diff --git a/src/Famix-Traits/FamixTStructuralEntity.trait.st b/src/Famix-Traits/FamixTStructuralEntity.trait.st index cf52140e..a14d4b1d 100644 --- a/src/Famix-Traits/FamixTStructuralEntity.trait.st +++ b/src/Famix-Traits/FamixTStructuralEntity.trait.st @@ -27,8 +27,8 @@ FamixTStructuralEntity is the abstract superclass for basic data structure in th " Trait { #name : #FamixTStructuralEntity, - #traits : 'FamixTAccessible + FamixTNamedEntity + FamixTSourceEntity + FamixTTypedEntity + TEntityMetaLevelDependency', - #classTraits : 'FamixTAccessible classTrait + FamixTNamedEntity classTrait + FamixTSourceEntity classTrait + FamixTTypedEntity classTrait + TEntityMetaLevelDependency classTrait', + #traits : 'FamixTAccessible + FamixTCanBeStub + FamixTNamedEntity + FamixTTypedEntity + TEntityMetaLevelDependency', + #classTraits : 'FamixTAccessible classTrait + FamixTCanBeStub classTrait + FamixTNamedEntity classTrait + FamixTTypedEntity classTrait + TEntityMetaLevelDependency classTrait', #category : #'Famix-Traits-Traits' } diff --git a/src/Famix-Traits/FamixTTraitUsage.trait.st b/src/Famix-Traits/FamixTTraitUsage.trait.st index 7eac20cd..9e658330 100644 --- a/src/Famix-Traits/FamixTTraitUsage.trait.st +++ b/src/Famix-Traits/FamixTTraitUsage.trait.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Trait { diff --git a/src/Famix-Traits/FamixTType.trait.st b/src/Famix-Traits/FamixTType.trait.st index c6a54443..1d6b9d67 100644 --- a/src/Famix-Traits/FamixTType.trait.st +++ b/src/Famix-Traits/FamixTType.trait.st @@ -40,8 +40,8 @@ Trait { '#typeContainer => FMOne type: #FamixTWithTypes opposite: #types', '#typedEntities => FMMany type: #FamixTTypedEntity opposite: #declaredType' ], - #traits : 'FamixTNamedEntity + FamixTReferenceable + FamixTSourceEntity + TEntityMetaLevelDependency', - #classTraits : 'FamixTNamedEntity classTrait + FamixTReferenceable classTrait + FamixTSourceEntity classTrait + TEntityMetaLevelDependency classTrait', + #traits : 'FamixTCanBeStub + FamixTNamedEntity + FamixTReferenceable + TEntityMetaLevelDependency', + #classTraits : 'FamixTCanBeStub classTrait + FamixTNamedEntity classTrait + FamixTReferenceable classTrait + TEntityMetaLevelDependency classTrait', #category : #'Famix-Traits-Type' } diff --git a/src/Famix-Traits/FamixTWithStatements.trait.st b/src/Famix-Traits/FamixTWithStatements.trait.st index 8e08adc5..53fcf09c 100644 --- a/src/Famix-Traits/FamixTWithStatements.trait.st +++ b/src/Famix-Traits/FamixTWithStatements.trait.st @@ -25,8 +25,8 @@ " Trait { #name : #FamixTWithStatements, - #traits : 'FamixTSourceEntity + FamixTWithAccesses + FamixTWithInvocations + FamixTWithReferences', - #classTraits : 'FamixTSourceEntity classTrait + FamixTWithAccesses classTrait + FamixTWithInvocations classTrait + FamixTWithReferences classTrait', + #traits : 'FamixTCanBeStub + FamixTWithAccesses + FamixTWithInvocations + FamixTWithReferences', + #classTraits : 'FamixTCanBeStub classTrait + FamixTWithAccesses classTrait + FamixTWithInvocations classTrait + FamixTWithReferences classTrait', #category : #'Famix-Traits-Behavioral' } diff --git a/src/Moose-Core-Tests-Entities/MooseMSEImporterTestInheritance.class.st b/src/Moose-Core-Tests-Entities/MooseMSEImporterTestInheritance.class.st index f92e64db..412bc90d 100644 --- a/src/Moose-Core-Tests-Entities/MooseMSEImporterTestInheritance.class.st +++ b/src/Moose-Core-Tests-Entities/MooseMSEImporterTestInheritance.class.st @@ -20,12 +20,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { diff --git a/src/Moose-Core-Tests-Entities/MooseMSEImporterTestSourcedEntity.class.st b/src/Moose-Core-Tests-Entities/MooseMSEImporterTestSourcedEntity.class.st index e157f5c3..747da55b 100644 --- a/src/Moose-Core-Tests-Entities/MooseMSEImporterTestSourcedEntity.class.st +++ b/src/Moose-Core-Tests-Entities/MooseMSEImporterTestSourcedEntity.class.st @@ -8,12 +8,6 @@ | `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| -## Properties -====================== - -| Name | Type | Default value | Comment | -|---| -| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| " Class { From aca4e29c20e125480f05ea1d05448456abb3c20e Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 21 Nov 2024 16:50:27 +0100 Subject: [PATCH 2/5] Remove ad hoc #isStub on java methods --- src/Famix-Java-Entities/FamixJavaMethod.class.st | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Famix-Java-Entities/FamixJavaMethod.class.st b/src/Famix-Java-Entities/FamixJavaMethod.class.st index 7e0dc403..c4bcdd87 100644 --- a/src/Famix-Java-Entities/FamixJavaMethod.class.st +++ b/src/Famix-Java-Entities/FamixJavaMethod.class.st @@ -251,11 +251,6 @@ FamixJavaMethod >> isSetter [ self outgoingInvocations isEmpty ] ] ] ] ] ] ] -{ #category : #printing } -FamixJavaMethod >> isStub [ - ^ super isStub or: [ self parentType isNotNil and: [ self parentType isStub ] ] -] - { #category : #testing } FamixJavaMethod >> isSurelyInvokedBy: aFAMIXMethod [ | outgoingInvo | From 0fc218a5c0e505c94edfc3888b86d3de7714086e Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 21 Nov 2024 16:55:15 +0100 Subject: [PATCH 3/5] Remove useless test --- src/Famix-Java-Tests/FamixJavaMethodTest.class.st | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Famix-Java-Tests/FamixJavaMethodTest.class.st b/src/Famix-Java-Tests/FamixJavaMethodTest.class.st index d51f18a3..df6578b9 100644 --- a/src/Famix-Java-Tests/FamixJavaMethodTest.class.st +++ b/src/Famix-Java-Tests/FamixJavaMethodTest.class.st @@ -208,16 +208,6 @@ FamixJavaMethodTest >> testIsSetter [ self assert: method isSetter ] -{ #category : #tests } -FamixJavaMethodTest >> testIsStubWhenParentIsStub [ - | aClass | - aClass := FamixJavaClass new. - method parentType: aClass. - aClass isStub: true. - self assert: aClass isStub. - self assert: method isStub -] - { #category : #tests } FamixJavaMethodTest >> testOverriddenMethod [ From c115cc11ee99bf586a0b156945377c9e7748b5a4 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 21 Nov 2024 17:00:10 +0100 Subject: [PATCH 4/5] Deprecated MooseEntity>>#isStub: --- src/Famix-Deprecated/MooseEntity.extension.st | 7 +++++++ src/Moose-Core-Tests/MooseEntityTest.class.st | 10 ---------- src/Moose-Core/MooseEntity.class.st | 7 ++----- 3 files changed, 9 insertions(+), 15 deletions(-) create mode 100644 src/Famix-Deprecated/MooseEntity.extension.st diff --git a/src/Famix-Deprecated/MooseEntity.extension.st b/src/Famix-Deprecated/MooseEntity.extension.st new file mode 100644 index 00000000..86f5a871 --- /dev/null +++ b/src/Famix-Deprecated/MooseEntity.extension.st @@ -0,0 +1,7 @@ +Extension { #name : #MooseEntity } + +{ #category : #'*Famix-Deprecated' } +MooseEntity >> isStub: boolean [ + + self deprecated: 'If an entity can be stub, it should have the TCanBeStub trait.' +] diff --git a/src/Moose-Core-Tests/MooseEntityTest.class.st b/src/Moose-Core-Tests/MooseEntityTest.class.st index a55acf34..4d740216 100644 --- a/src/Moose-Core-Tests/MooseEntityTest.class.st +++ b/src/Moose-Core-Tests/MooseEntityTest.class.st @@ -20,16 +20,6 @@ MooseEntityTest >> testAnnotation [ self assert: (methodProperty includesKey: #abstract) ] -{ #category : #tests } -MooseEntityTest >> testIsStub [ - self deny: self actualClass new isStub. - self - assert: - (self actualClass new - attributeAt: #privateIsStub put: true; - yourself) isStub -] - { #category : #tests } MooseEntityTest >> testLocalMooseModel [ | element model | diff --git a/src/Moose-Core/MooseEntity.class.st b/src/Moose-Core/MooseEntity.class.st index 3a94523d..bb2ba144 100644 --- a/src/Moose-Core/MooseEntity.class.st +++ b/src/Moose-Core/MooseEntity.class.st @@ -194,12 +194,9 @@ MooseEntity >> isQueryable [ { #category : #testing } MooseEntity >> isStub [ - ^ self attributeAt: #privateIsStub ifAbsent: [ false ] -] + "I'll be overriden in TCanBeStub if the applies." -{ #category : #testing } -MooseEntity >> isStub: boolean [ - ^ self attributeAt: #privateIsStub put: boolean + ^ false ] { #category : #accessing } From d9b8c0b2a6700f1fa811f88ee1f20c0424d9fd22 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 21 Nov 2024 17:08:20 +0100 Subject: [PATCH 5/5] Fix tests --- src/Moose-Core-Tests/MooseAbstractGroupTest.class.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Moose-Core-Tests/MooseAbstractGroupTest.class.st b/src/Moose-Core-Tests/MooseAbstractGroupTest.class.st index d5f4e8f6..13913a20 100644 --- a/src/Moose-Core-Tests/MooseAbstractGroupTest.class.st +++ b/src/Moose-Core-Tests/MooseAbstractGroupTest.class.st @@ -499,10 +499,10 @@ MooseAbstractGroupTest >> testWithoutStubs [ | stubEntity1 stubEntity2 | - stubEntity1 := MooseEntity new + stubEntity1 := FamixTest1Class new isStub: true; yourself. - stubEntity2 := MooseEntity new + stubEntity2 := FamixTest1Class new isStub: true; yourself. group