From 9760de06a82d3391aa67183a05bf50ea67da2eb7 Mon Sep 17 00:00:00 2001 From: uNouss Date: Fri, 31 May 2024 11:31:14 +0200 Subject: [PATCH] Fix the trait conflict occurs in `FamixF77ProgramFile` Fixed issue #45 Co-authored-by: melkiyasser --- .../FamixF77Entity.class.st | 14 ++++++++++++++ .../FamixF77NamedEntity.class.st | 7 +++++++ .../FamixF77ProgramFile.class.st | 6 +++--- .../FamixFortran77Generator.class.st | 2 +- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/Famix-Fortran77-Entities/FamixF77Entity.class.st b/src/Famix-Fortran77-Entities/FamixF77Entity.class.st index 7fdee75..6917626 100644 --- a/src/Famix-Fortran77-Entities/FamixF77Entity.class.st +++ b/src/Famix-Fortran77-Entities/FamixF77Entity.class.st @@ -49,6 +49,13 @@ FamixF77Entity >> isBehavioural [ ^ false ] +{ #category : #testing } +FamixF77Entity >> isFileAnchor [ + + + ^ false +] + { #category : #testing } FamixF77Entity >> isInvocation [ @@ -63,6 +70,13 @@ FamixF77Entity >> isLocalVariable [ ^ false ] +{ #category : #testing } +FamixF77Entity >> isNamedEntity [ + + + ^ false +] + { #category : #testing } FamixF77Entity >> isQueryable [ diff --git a/src/Famix-Fortran77-Entities/FamixF77NamedEntity.class.st b/src/Famix-Fortran77-Entities/FamixF77NamedEntity.class.st index 8ad49d3..504730e 100644 --- a/src/Famix-Fortran77-Entities/FamixF77NamedEntity.class.st +++ b/src/Famix-Fortran77-Entities/FamixF77NamedEntity.class.st @@ -31,3 +31,10 @@ FamixF77NamedEntity class >> isAbstract [ ^ self == FamixF77NamedEntity ] + +{ #category : #testing } +FamixF77NamedEntity >> isNamedEntity [ + + + ^ true +] diff --git a/src/Famix-Fortran77-Entities/FamixF77ProgramFile.class.st b/src/Famix-Fortran77-Entities/FamixF77ProgramFile.class.st index 21adb63..e43c21e 100644 --- a/src/Famix-Fortran77-Entities/FamixF77ProgramFile.class.st +++ b/src/Famix-Fortran77-Entities/FamixF77ProgramFile.class.st @@ -35,12 +35,12 @@ a fortran file Class { #name : #FamixF77ProgramFile, #superclass : #FamixF77NamedEntity, - #traits : 'FamixTCompilationUnit + FamixTSourceEntity + TEntityMetaLevelDependency', + #traits : 'FamixTCompilationUnit + (FamixTSourceEntity - {#sourceText}) + TEntityMetaLevelDependency', #classTraits : 'FamixTCompilationUnit classTrait + FamixTSourceEntity classTrait + TEntityMetaLevelDependency classTrait', #instVars : [ - '#version => FMProperty', '#filename => FMProperty', - '#programUnits => FMMany type: #FamixF77ProgramUnit opposite: #programFile' + '#programUnits => FMMany type: #FamixF77ProgramUnit opposite: #programFile', + '#version => FMProperty' ], #category : #'Famix-Fortran77-Entities-Entities' } diff --git a/src/Famix-Fortran77-Generator/FamixFortran77Generator.class.st b/src/Famix-Fortran77-Generator/FamixFortran77Generator.class.st index 447c33c..81ab865 100644 --- a/src/Famix-Fortran77-Generator/FamixFortran77Generator.class.st +++ b/src/Famix-Fortran77-Generator/FamixFortran77Generator.class.st @@ -216,9 +216,9 @@ FamixFortran77Generator >> defineHierarchy [ parameter --|> #TParameter. programFile --|> namedEntity. + programFile inheritsFromTrait: #TSourceEntity without: { #sourceText }. programFile --|> #TCompilationUnit. programFile --|> #TEntityMetaLevelDependency. - programFile --|> #TSourceEntity. programUnit --|> namedEntity. programUnit --|> #TSourceEntity.