Skip to content

Commit

Permalink
Merge pull request #747 from moosetechnology/716-Generated-entity-com…
Browse files Browse the repository at this point in the history
…ments-can-break-tables

Remove lines from comments in generated entity comments
  • Loading branch information
Gabriel-Darbord authored Mar 29, 2024
2 parents eec9d16 + 71917d2 commit f6405d1
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 23 deletions.
3 changes: 1 addition & 2 deletions src/Famix-Java-Entities/FamixJavaContainerEntity.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
| Relation | Origin | Opposite | Type | Comment |
|---|
| `definedAnnotationTypes` | `FamixTWithAnnotationTypes` | `annotationTypesContainer` | `FamixTAnnotationType` | The container in which the AnnotationTypes may be declared|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
Expand Down
3 changes: 1 addition & 2 deletions src/Famix-Java-Entities/FamixJavaException.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
| `attributes` | `FamixTWithAttributes` | `parentType` | `FamixTAttribute` | List of attributes declared by this type.|
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
| `methods` | `FamixTWithMethods` | `parentType` | `FamixTMethod` | Methods declared by this type.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
### Outgoing dependencies
| Relation | Origin | Opposite | Type | Comment |
Expand Down
3 changes: 1 addition & 2 deletions src/Famix-Java-Entities/FamixJavaTWithInterfaces.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ I can contain interfaces (Packages, Methods, Classes...)
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
Expand Down
10 changes: 7 additions & 3 deletions src/Famix-MetamodelBuilder-Core/FmxMBBehavior.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ FmxMBBehavior >> classGeneralization: anObject [

{ #category : #accessing }
FmxMBBehavior >> commentWithRelations [
"It is sometimes hard to find our way in all the methods and relations of a moose entity. To help with this I am adding informations in the class comments about the different kind of relations of the model."
"It is sometimes hard to find our way through all the methods and relations of a moose entity. To help, I add information in the class comments about the different kind of relations in the model."

^ String streamContents: [ :aStream |
aStream nextPutAll: self comment.
Expand Down Expand Up @@ -165,7 +165,9 @@ FmxMBBehavior >> commentWithRelations [
nextPutAll: '` | `';
nextPutAll: strategy relationSide oppositeType;
nextPutAll: '` | ';
nextPutAll: strategy relationSide comment;
nextPutAll: (strategy relationSide comment
copyWithRegex: (String with: Character cr with: $+)
matchesReplacedWith: ' ');
nextPut: $|;
cr ].

Expand All @@ -192,7 +194,9 @@ FmxMBBehavior >> commentWithRelations [
nextPutAll: '` | ';
print: property defaultValue;
nextPutAll: ' | ';
nextPutAll: property comment;
nextPutAll: (property comment
copyWithRegex: (String with: Character cr with: $+)
matchesReplacedWith: ' ');
nextPut: $|;
cr ] ] ]
]
Expand Down
3 changes: 1 addition & 2 deletions src/Famix-PharoSmalltalk-Entities/FamixStNamespace.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
| Relation | Origin | Opposite | Type | Comment |
|---|
| `globalVariables` | `FamixTWithGlobalVariables` | `parentScope` | `FamixTGlobalVariable` | Global variables defined in the scope, if any.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
### Other
| Relation | Origin | Opposite | Type | Comment |
Expand Down
3 changes: 1 addition & 2 deletions src/Famix-PharoSmalltalk-Entities/FamixStPackage.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
|---|
| `childEntities` | `FamixTPackage` | `parentPackage` | `FamixTPackageable` | |
| `globalVariables` | `FamixTWithGlobalVariables` | `parentScope` | `FamixTGlobalVariable` | Global variables defined in the scope, if any.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
### Other
| Relation | Origin | Opposite | Type | Comment |
Expand Down
3 changes: 1 addition & 2 deletions src/Famix-Test3-Entities/FamixTest3PrimitiveType.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
### Incoming dependencies
| Relation | Origin | Opposite | Type | Comment |
Expand Down
3 changes: 1 addition & 2 deletions src/Famix-Traits/FamixTWithClasses.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
Expand Down
3 changes: 1 addition & 2 deletions src/Famix-Traits/FamixTWithTypes.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
### Other
| Relation | Origin | Opposite | Type | Comment |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
| Relation | Origin | Opposite | Type | Comment |
|---|
| `childEntities` | `FamixTPackage` | `parentPackage` | `FamixTPackageable` | |
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any.
#types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
### Other
| Relation | Origin | Opposite | Type | Comment |
Expand Down

0 comments on commit f6405d1

Please sign in to comment.