From 9d42c5f7298e2a381044616d6f58ff93c086b155 Mon Sep 17 00:00:00 2001 From: ClotildeToullec Date: Fri, 28 Feb 2025 10:10:09 +0100 Subject: [PATCH] Make FamixTFileSystemEntity a TNamedEntity. --- .../FamixGenerator.class.st | 1 + src/Famix-Test1-Entities/FamixTest1File.class.st | 6 ++++++ src/Famix-Test1-Entities/FamixTest1Folder.class.st | 6 ++++++ .../FamixTest1TEntityCreator.trait.st | 14 ++++++++++++++ src/Famix-Traits/FamixTCompilationUnit.trait.st | 6 ++++++ src/Famix-Traits/FamixTFile.trait.st | 6 ++++++ src/Famix-Traits/FamixTFileSystemEntity.trait.st | 8 ++++++++ src/Famix-Traits/FamixTFolder.trait.st | 6 ++++++ src/Famix-Traits/FamixTHeader.trait.st | 6 ++++++ 9 files changed, 59 insertions(+) diff --git a/src/Famix-MetamodelGeneration/FamixGenerator.class.st b/src/Famix-MetamodelGeneration/FamixGenerator.class.st index 7f441983..a5cd75f7 100644 --- a/src/Famix-MetamodelGeneration/FamixGenerator.class.st +++ b/src/Famix-MetamodelGeneration/FamixGenerator.class.st @@ -1084,6 +1084,7 @@ FamixGenerator >> defineHierarchy [ tException --|> tClass. + tFileSystemEntity --|> tNamedEntity. tFile --|> tFileSystemEntity. tFileInclude --|> tAssociation. diff --git a/src/Famix-Test1-Entities/FamixTest1File.class.st b/src/Famix-Test1-Entities/FamixTest1File.class.st index 6cd424a5..a8674421 100644 --- a/src/Famix-Test1-Entities/FamixTest1File.class.st +++ b/src/Famix-Test1-Entities/FamixTest1File.class.st @@ -13,6 +13,12 @@ | `entities` | `FamixTFile` | `containerFiles` | `FamixTWithFiles` | List of entities defined in the file| +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `name` | `String` | nil | Basic name of the entity, not full reference.| " Class { diff --git a/src/Famix-Test1-Entities/FamixTest1Folder.class.st b/src/Famix-Test1-Entities/FamixTest1Folder.class.st index 21d231cf..27cce1b4 100644 --- a/src/Famix-Test1-Entities/FamixTest1Folder.class.st +++ b/src/Famix-Test1-Entities/FamixTest1Folder.class.st @@ -13,6 +13,12 @@ | `childrenFileSystemEntities` | `FamixTFolder` | `parentFolder` | `FamixTFileSystemEntity` | List of entities contained in this folder.| +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `name` | `String` | nil | Basic name of the entity, not full reference.| " Class { diff --git a/src/Famix-Test1-Entities/FamixTest1TEntityCreator.trait.st b/src/Famix-Test1-Entities/FamixTest1TEntityCreator.trait.st index b6f85df0..9931b520 100644 --- a/src/Famix-Test1-Entities/FamixTest1TEntityCreator.trait.st +++ b/src/Famix-Test1-Entities/FamixTest1TEntityCreator.trait.st @@ -74,6 +74,13 @@ FamixTest1TEntityCreator >> newFileAnchor [ ^ self add: FamixTest1FileAnchor new ] +{ #category : #'entity creation' } +FamixTest1TEntityCreator >> newFileNamed: aName [ + + + ^ self add: (FamixTest1File named: aName) +] + { #category : #'entity creation' } FamixTest1TEntityCreator >> newFolder [ @@ -81,6 +88,13 @@ FamixTest1TEntityCreator >> newFolder [ ^ self add: FamixTest1Folder new ] +{ #category : #'entity creation' } +FamixTest1TEntityCreator >> newFolderNamed: aName [ + + + ^ self add: (FamixTest1Folder named: aName) +] + { #category : #'entity creation' } FamixTest1TEntityCreator >> newIndexedFileAnchor [ diff --git a/src/Famix-Traits/FamixTCompilationUnit.trait.st b/src/Famix-Traits/FamixTCompilationUnit.trait.st index 77ef3e37..8e84384d 100644 --- a/src/Famix-Traits/FamixTCompilationUnit.trait.st +++ b/src/Famix-Traits/FamixTCompilationUnit.trait.st @@ -16,6 +16,12 @@ I represent a compilation unit file. Typically a .c or .cpp file | `entities` | `FamixTFile` | `containerFiles` | `FamixTWithFiles` | List of entities defined in the file| +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `name` | `String` | nil | Basic name of the entity, not full reference.| " Trait { diff --git a/src/Famix-Traits/FamixTFile.trait.st b/src/Famix-Traits/FamixTFile.trait.st index ce0248cc..12f69341 100644 --- a/src/Famix-Traits/FamixTFile.trait.st +++ b/src/Famix-Traits/FamixTFile.trait.st @@ -15,6 +15,12 @@ It represents a file in the file system. | `entities` | `FamixTFile` | `containerFiles` | `FamixTWithFiles` | List of entities defined in the file| +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `name` | `String` | nil | Basic name of the entity, not full reference.| " Trait { diff --git a/src/Famix-Traits/FamixTFileSystemEntity.trait.st b/src/Famix-Traits/FamixTFileSystemEntity.trait.st index 6f467f3d..995b5425 100644 --- a/src/Famix-Traits/FamixTFileSystemEntity.trait.st +++ b/src/Famix-Traits/FamixTFileSystemEntity.trait.st @@ -8,6 +8,12 @@ | `parentFolder` | `FamixTFileSystemEntity` | `childrenFileSystemEntities` | `FamixTFolder` | Folder entity containing this file.| +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `name` | `String` | nil | Basic name of the entity, not full reference.| " Trait { @@ -15,6 +21,8 @@ Trait { #instVars : [ '#parentFolder => FMOne type: #FamixTFolder opposite: #childrenFileSystemEntities' ], + #traits : 'FamixTNamedEntity', + #classTraits : 'FamixTNamedEntity classTrait', #category : #'Famix-Traits-File' } diff --git a/src/Famix-Traits/FamixTFolder.trait.st b/src/Famix-Traits/FamixTFolder.trait.st index 4af6f5b2..0c2959a5 100644 --- a/src/Famix-Traits/FamixTFolder.trait.st +++ b/src/Famix-Traits/FamixTFolder.trait.st @@ -15,6 +15,12 @@ It represents a folder in the file system. It can contain other files or folders | `childrenFileSystemEntities` | `FamixTFolder` | `parentFolder` | `FamixTFileSystemEntity` | List of entities contained in this folder.| +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `name` | `String` | nil | Basic name of the entity, not full reference.| " Trait { diff --git a/src/Famix-Traits/FamixTHeader.trait.st b/src/Famix-Traits/FamixTHeader.trait.st index 3b3d6b90..6ef53c2e 100644 --- a/src/Famix-Traits/FamixTHeader.trait.st +++ b/src/Famix-Traits/FamixTHeader.trait.st @@ -16,6 +16,12 @@ I represent a header file. Typically a .h or .hpp | `entities` | `FamixTFile` | `containerFiles` | `FamixTWithFiles` | List of entities defined in the file| +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `name` | `String` | nil | Basic name of the entity, not full reference.| " Trait {