Skip to content

Commit

Permalink
Merge pull request #682 from moosetechnology/improve-class-comments
Browse files Browse the repository at this point in the history
First iteration for better generated class comments
  • Loading branch information
jecisc authored Jan 16, 2024
2 parents 296df77 + 8754aa8 commit 40fd49a
Show file tree
Hide file tree
Showing 331 changed files with 4,321 additions and 30 deletions.
7 changes: 7 additions & 0 deletions src/Famix-Deprecated/FamixTHasModifiers.trait.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"
## Properties
======================
- Named: #modifiers Type: String Comment: Generic container for language dependent modifiers.
"
Trait {
#name : #FamixTHasModifiers,
#instVars : [
Expand Down
20 changes: 20 additions & 0 deletions src/Famix-Java-Entities/FamixJavaAccess.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
"
## Relations
======================
### Association source
- Relation: #accessor Type: #FamixTWithAccesses Opposite: #accesses Comment: Behavioural entity making the access to the variable. from-side of the association
### Association target
- Relation: #variable Type: #FamixTAccessible Opposite: #incomingAccesses Comment: Variable accessed. to-side of the association
### Other
- Relation: #next Type: #FamixTAssociation Opposite: #previous Comment: Next association in an ordered collection of associations. Currently not supported by the Moose importer
- Relation: #previous Type: #FamixTAssociation Opposite: #next Comment: Previous association in an ordered collection of associations. Currently not supported by the Moose importer
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
## Properties
======================
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
- Named: #isWrite Type: Boolean Comment: Write access
"
Class {
#name : #FamixJavaAccess,
#superclass : #FamixJavaEntity,
Expand Down
12 changes: 12 additions & 0 deletions src/Famix-Java-Entities/FamixJavaAnnotationInstance.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
"
## Relations
======================
### Children
- Relation: #attributes Type: #FamixTAnnotationInstanceAttribute Opposite: #parentAnnotationInstance Comment: This corresponds to the actual values of the attributes in an AnnotationInstance
### Other
- Relation: #annotatedEntity Type: #FamixTWithAnnotationInstances Opposite: #annotationInstances Comment: The NamedEntity on which the annotation occurs.
- Relation: #annotationType Type: #FamixTAnnotationType Opposite: #instances Comment: Refers to the type of an annotation. (In some languages, Java and C#, an annotation as an explicit type).
"
Class {
#name : #FamixJavaAnnotationInstance,
#superclass : #FamixJavaSourcedEntity,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
"
## Relations
======================
### Parents
- Relation: #parentAnnotationInstance Type: #FamixTWithAnnotationInstanceAttributes Opposite: #attributes Comment: The instance of the annotation in which the attribute is used.
### Other
- Relation: #annotationTypeAttribute Type: #FamixTAnnotationTypeAttribute Opposite: #annotationAttributeInstances Comment: This corresponds to the type of the attribute in an AnnotationInstance
## Properties
======================
- Named: #value Type: String Comment: Actual value of the attribute used in an annotation
"
Class {
#name : #FamixJavaAnnotationInstanceAttribute,
#superclass : #FamixJavaSourcedEntity,
Expand Down
24 changes: 24 additions & 0 deletions src/Famix-Java-Entities/FamixJavaAnnotationType.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
"
## Relations
======================
### Parents
- Relation: #annotationTypesContainer Type: #FamixTWithAnnotationTypes Opposite: #definedAnnotationTypes Comment: Container in which an AnnotationType may reside
- Relation: #parentPackage Type: #FamixTPackage Opposite: #childEntities Comment: Package containing the entity in the code structure (if applicable)
### Children
- Relation: #attributes Type: #FamixTAttribute Opposite: #parentType Comment: List of attributes declared by this type.
### Outgoing dependencies
- Relation: #superInheritances Type: #FamixTInheritance Opposite: #subclass Comment: Superinheritance relationships, i.e. known superclasses of this type.
### Incoming dependencies
- Relation: #implementations Type: #FamixTImplementation Opposite: #interface Comment: Implementation relationships.
- Relation: #subInheritances Type: #FamixTInheritance Opposite: #superclass Comment: Subinheritance relationships, i.e. known subclasses of this type.
### Other
- Relation: #comments Type: #FamixTComment Opposite: #commentedEntity Comment: List of comments for the entity
- Relation: #instances Type: #FamixTTypedAnnotationInstance Opposite: #annotationType Comment: Annotations of this type
## Properties
======================
- Named: #visibility Type: String Comment: Visibility of the entity
"
Class {
#name : #FamixJavaAnnotationType,
#superclass : #FamixJavaType,
Expand Down
22 changes: 22 additions & 0 deletions src/Famix-Java-Entities/FamixJavaAnnotationTypeAttribute.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
"
## Relations
======================
### Parents
- Relation: #parentType Type: #FamixTWithAttributes Opposite: #attributes Comment: Type declaring the attribute. belongsTo implementation
### Incoming dependencies
- Relation: #incomingAccesses Type: #FamixTAccess Opposite: #variable Comment: All Famix accesses pointing to this structural entity
### Other
- Relation: #annotationAttributeInstances Type: #FamixTTypedAnnotationInstanceAttribute Opposite: #annotationTypeAttribute Comment: A collection of AnnotationInstanceAttribute which hold the usages of this attribute in actual AnnotationInstances
- Relation: #annotationTypeAttribute Type: #FamixTAnnotationTypeAttribute Opposite: #annotationAttributeInstances Comment: This corresponds to the type of the attribute in an AnnotationInstance
- Relation: #comments Type: #FamixTComment Opposite: #commentedEntity Comment: List of comments for the entity
- Relation: #declaredType Type: #FamixTType Opposite: #typedEntities Comment: Type of the entity, if any
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
## Properties
======================
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
- Named: #name Type: String Comment: Basic name of the entity, not full reference.
"
Class {
#name : #FamixJavaAnnotationTypeAttribute,
#superclass : #FamixJavaNamedEntity,
Expand Down
26 changes: 26 additions & 0 deletions src/Famix-Java-Entities/FamixJavaAttribute.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
"
## Relations
======================
### Parents
- Relation: #parentType Type: #FamixTWithAttributes Opposite: #attributes Comment: Type declaring the attribute. belongsTo implementation
### Incoming dependencies
- Relation: #incomingAccesses Type: #FamixTAccess Opposite: #variable Comment: All Famix accesses pointing to this structural entity
### Other
- Relation: #comments Type: #FamixTComment Opposite: #commentedEntity Comment: List of comments for the entity
- Relation: #declaredType Type: #FamixTType Opposite: #typedEntities Comment: Type of the entity, if any
- Relation: #receivingInvocations Type: #FamixTInvocation Opposite: #receiver Comment: List of invocations performed on this entity (considered as the receiver)
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
## Properties
======================
- Named: #isClassSide Type: Boolean Comment: Entity can be declared class side i.e. static
- Named: #isFinal Type: Boolean Comment: Entity can be declared final
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
- Named: #isTransient Type: Boolean Comment: Entity can be declared transient
- Named: #isVolatile Type: Boolean Comment: Entity can be declared volatile
- Named: #name Type: String Comment: Basic name of the entity, not full reference.
- Named: #visibility Type: String Comment: Visibility of the entity
"
Class {
#name : #FamixJavaAttribute,
#superclass : #FamixJavaNamedEntity,
Expand Down
35 changes: 35 additions & 0 deletions src/Famix-Java-Entities/FamixJavaClass.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
"
## Relations
======================
### Parents
- Relation: #parentPackage Type: #FamixTPackage Opposite: #childEntities Comment: Package containing the entity in the code structure (if applicable)
- Relation: #typeContainer Type: #FamixTWithTypes Opposite: #types Comment: Container entity to which this type belongs. Container is a namespace, not a package (Smalltalk).
### Children
- Relation: #attributes Type: #FamixTAttribute Opposite: #parentType Comment: List of attributes declared by this type.
- Relation: #methods Type: #FamixTMethod Opposite: #parentType Comment: Methods declared by this type.
### Outgoing dependencies
- Relation: #interfaceImplementations Type: #FamixTImplementation Opposite: #implementingClass Comment: Implementation relationships
- Relation: #outgoingImports Type: #FamixTImport Opposite: #importingEntity
- Relation: #superInheritances Type: #FamixTInheritance Opposite: #subclass Comment: Superinheritance relationships, i.e. known superclasses of this type.
### Incoming dependencies
- Relation: #incomingImports Type: #FamixTImport Opposite: #importedEntity Comment: List of imports of this entity
- Relation: #incomingReferences Type: #FamixTReference Opposite: #referredType Comment: References to this entity by other entities.
- Relation: #subInheritances Type: #FamixTInheritance Opposite: #superclass Comment: Subinheritance relationships, i.e. known subclasses of this type.
### Other
- Relation: #comments Type: #FamixTComment Opposite: #commentedEntity Comment: List of comments for the entity
- Relation: #receivingInvocations Type: #FamixTInvocation Opposite: #receiver Comment: List of invocations performed on this entity (considered as the receiver)
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
- Relation: #typedEntities Type: #FamixTTypedEntity Opposite: #declaredType Comment: Entities that have this type as declaredType
## Properties
======================
- Named: #isAbstract Type: Boolean Comment: Entity can be declared abstract
- Named: #isClassSide Type: Boolean Comment: Entity can be declared class side i.e. static
- Named: #isFinal Type: Boolean Comment: Entity can be declared final
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
- Named: #name Type: String Comment: Basic name of the entity, not full reference.
- Named: #visibility Type: String Comment: Visibility of the entity
"
Class {
#name : #FamixJavaClass,
#superclass : #FamixJavaType,
Expand Down
13 changes: 13 additions & 0 deletions src/Famix-Java-Entities/FamixJavaComment.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
"
## Relations
======================
### Other
- Relation: #commentedEntity Type: #FamixTWithComments Opposite: #comments Comment: Source code commented by the comment
## Properties
======================
- Named: #content Type: String Comment: Content of the comment as a String
"
Class {
#name : #FamixJavaComment,
#superclass : #FamixJavaSourcedEntity,
Expand Down
11 changes: 11 additions & 0 deletions src/Famix-Java-Entities/FamixJavaContainerEntity.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
"
## Relations
======================
### Children
- Relation: #definedAnnotationTypes Type: #FamixTAnnotationType Opposite: #annotationTypesContainer Comment: The container in which the AnnotationTypes may be declared
- Relation: #types Type: #FamixTType Opposite: #typeContainer Comment: 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.
"
Class {
#name : #FamixJavaContainerEntity,
#superclass : #FamixJavaNamedEntity,
Expand Down
2 changes: 2 additions & 0 deletions src/Famix-Java-Entities/FamixJavaEntity.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ model := MooseModel new.
model silentlyAddAll: repo elements.
model entityStorage forRuntime.
model
"
Class {
#name : #FamixJavaEntity,
Expand Down
30 changes: 30 additions & 0 deletions src/Famix-Java-Entities/FamixJavaEnum.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
"
## Relations
======================
### Parents
- Relation: #typeContainer Type: #FamixTWithTypes Opposite: #types Comment: Container entity to which this type belongs. Container is a namespace, not a package (Smalltalk).
### Children
- Relation: #attributes Type: #FamixTAttribute Opposite: #parentType Comment: List of attributes declared by this type.
- Relation: #enumValues Type: #FamixTEnumValue Opposite: #parentEnum
- Relation: #methods Type: #FamixTMethod Opposite: #parentType Comment: Methods declared by this type.
### Outgoing dependencies
- Relation: #outgoingImports Type: #FamixTImport Opposite: #importingEntity
- Relation: #superInheritances Type: #FamixTInheritance Opposite: #subclass Comment: Superinheritance relationships, i.e. known superclasses of this type.
### Incoming dependencies
- Relation: #incomingImports Type: #FamixTImport Opposite: #importedEntity Comment: List of imports of this entity
- Relation: #incomingReferences Type: #FamixTReference Opposite: #referredType Comment: References to this entity by other entities.
- Relation: #subInheritances Type: #FamixTInheritance Opposite: #superclass Comment: Subinheritance relationships, i.e. known subclasses of this type.
### Other
- Relation: #comments Type: #FamixTComment Opposite: #commentedEntity Comment: List of comments for the entity
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
- Relation: #typedEntities Type: #FamixTTypedEntity Opposite: #declaredType Comment: Entities that have this type as declaredType
## Properties
======================
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
- Named: #name Type: String Comment: Basic name of the entity, not full reference.
- Named: #visibility Type: String Comment: Visibility of the entity
"
Class {
#name : #FamixJavaEnum,
#superclass : #FamixJavaType,
Expand Down
20 changes: 20 additions & 0 deletions src/Famix-Java-Entities/FamixJavaEnumValue.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
"
## Relations
======================
### Parents
- Relation: #parentEnum Type: #FamixTWithEnumValues Opposite: #enumValues Comment: The Enum declaring this value. It offers the implementation of belongsTo
### Incoming dependencies
- Relation: #incomingAccesses Type: #FamixTAccess Opposite: #variable Comment: All Famix accesses pointing to this structural entity
### Other
- Relation: #comments Type: #FamixTComment Opposite: #commentedEntity Comment: List of comments for the entity
- Relation: #declaredType Type: #FamixTType Opposite: #typedEntities Comment: Type of the entity, if any
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
## Properties
======================
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
- Named: #name Type: String Comment: Basic name of the entity, not full reference.
"
Class {
#name : #FamixJavaEnumValue,
#superclass : #FamixJavaNamedEntity,
Expand Down
35 changes: 35 additions & 0 deletions src/Famix-Java-Entities/FamixJavaException.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
"
## Relations
======================
### Parents
- Relation: #typeContainer Type: #FamixTWithTypes Opposite: #types Comment: Container entity to which this type belongs. Container is a namespace, not a package (Smalltalk).
### Children
- Relation: #attributes Type: #FamixTAttribute Opposite: #parentType Comment: List of attributes declared by this type.
- Relation: #methods Type: #FamixTMethod Opposite: #parentType Comment: Methods declared by this type.
- Relation: #types Type: #FamixTType Opposite: #typeContainer Comment: 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: #interfaceImplementations Type: #FamixTImplementation Opposite: #implementingClass Comment: Implementation relationships
- Relation: #superInheritances Type: #FamixTInheritance Opposite: #subclass Comment: Superinheritance relationships, i.e. known superclasses of this type.
### Incoming dependencies
- Relation: #incomingReferences Type: #FamixTReference Opposite: #referredType Comment: References to this entity by other entities.
- Relation: #subInheritances Type: #FamixTInheritance Opposite: #superclass Comment: Subinheritance relationships, i.e. known subclasses of this type.
### Other
- Relation: #annotationInstances Type: #FamixTAnnotationInstance Opposite: #annotatedEntity Comment: This property corresponds to the set of annotations associated to the entity
- Relation: #catchingEntities Type: #FamixTWithExceptions Opposite: #caughtExceptions
- Relation: #comments Type: #FamixTComment Opposite: #commentedEntity Comment: List of comments for the entity
- Relation: #declaringEntities Type: #FamixTWithExceptions Opposite: #declaredExceptions
- Relation: #receivingInvocations Type: #FamixTInvocation Opposite: #receiver Comment: List of invocations performed on this entity (considered as the receiver)
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
- Relation: #throwingEntities Type: #FamixTWithExceptions Opposite: #thrownExceptions
- Relation: #typedEntities Type: #FamixTTypedEntity Opposite: #declaredType Comment: Entities that have this type as declaredType
## Properties
======================
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
- Named: #name Type: String Comment: Basic name of the entity, not full reference.
- Named: #visibility Type: String Comment: Visibility of the entity
"
Class {
#name : #FamixJavaException,
#superclass : #FamixJavaClass,
Expand Down
19 changes: 19 additions & 0 deletions src/Famix-Java-Entities/FamixJavaImplementation.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
"
## Relations
======================
### Association source
- Relation: #implementingClass Type: #FamixTCanImplement Opposite: #interfaceImplementations Comment: Class linked to in this relationship. from-side of the association
### Association target
- Relation: #interface Type: #FamixTImplementable Opposite: #implementations Comment: Interface linked to in this relationship. to-side of the association
### Other
- Relation: #next Type: #FamixTAssociation Opposite: #previous Comment: Next association in an ordered collection of associations. Currently not supported by the Moose importer
- Relation: #previous Type: #FamixTAssociation Opposite: #next Comment: Previous association in an ordered collection of associations. Currently not supported by the Moose importer
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
## Properties
======================
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
"
Class {
#name : #FamixJavaImplementation,
#superclass : #FamixJavaEntity,
Expand Down
20 changes: 20 additions & 0 deletions src/Famix-Java-Entities/FamixJavaImplicitVariable.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
"
## Relations
======================
### Parents
- Relation: #parentBehaviouralEntity Type: #FamixTWithImplicitVariables Opposite: #implicitVariables Comment: The behaviour containing this implicit variable. belongsTo implementation
### Incoming dependencies
- Relation: #incomingAccesses Type: #FamixTAccess Opposite: #variable Comment: All Famix accesses pointing to this structural entity
### Other
- Relation: #declaredType Type: #FamixTType Opposite: #typedEntities Comment: Type of the entity, if any
- Relation: #receivingInvocations Type: #FamixTInvocation Opposite: #receiver Comment: List of invocations performed on this entity (considered as the receiver)
- Relation: #sourceAnchor Type: #FamixTSourceAnchor Opposite: #element Comment: SourceAnchor entity linking to the original source code for this entity
## Properties
======================
- Named: #isStub Type: Boolean Comment: Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.
- Named: #name Type: String Comment: Basic name of the entity, not full reference.
"
Class {
#name : #FamixJavaImplicitVariable,
#superclass : #FamixJavaNamedEntity,
Expand Down
Loading

0 comments on commit 40fd49a

Please sign in to comment.