Hi,

Consider a piece of code:

Class MyClass
{
   public String method A() 
   {
        String a;
   }
}

In the code above, there is a relationship between the method A and the return type String. As per my understanding, this relationship is represented with declaredType in FAMIXBehaviouralEntity. 

Currently, this relationship is represented as a simple link (see FAMIXType>>declaredType) between the two entities but not as a FAMIXAssociation. Hence, when iterating over all the links/associations between two entities, we have to specifically take into account this special case. Currently, MooseChef helps in computing this information but one should know that there are other links on top of associations:

TDependencyQueries>>queryIncomingDependencies
"Associations + typeDeclaractions"
^ self queryAllIncomingAssociations 
addAll: self queryIncomingTypeDeclarations; 
yourself

Another and more uniform solution would be to modify declaredType by creating an additional reference. For example, a trivial solution can be:

declaredType: aType
declaredType :=  FMMultivalueLink on: self
update: #behavioursWithDeclaredType 
from: self declaredType
to: aType.
self mooseModel ifNotNil: [self mooseModel add: (FAMIXReference new source: self; target: self declaredType) ]
This change will be transparent for the current tools.

Please provide your feedback.

Usman