public void LinkWithInheritance(FAMIX.Type subClass, FAMIX.Type superClass) { FAMIX.Inheritance inheritance = CreateNewEntity <FAMIX.Inheritance>(typeof(FAMIX.Inheritance).FullName); inheritance.subclass = subClass; inheritance.superclass = superClass; superClass.AddSubInheritance(inheritance); subClass.AddSuperInheritance(inheritance); }
public void CreateSourceAnchor(FAMIX.Type sourcedEntity, ClassDeclarationSyntax node) { var lineSpan = node.SyntaxTree.GetLineSpan(node.Span); FAMIX.FileAnchor fileAnchor = CreateNewFileAnchor(node, ref lineSpan); var loc = lineSpan.EndLinePosition.Line - lineSpan.StartLinePosition.Line; if (node.Modifiers.ToFullString().Contains("partial")) { if (sourcedEntity.sourceAnchor == null) { sourcedEntity.sourceAnchor = new FAMIX.MultipleFileAnchor(); repository.Add(sourcedEntity.sourceAnchor); } (sourcedEntity.sourceAnchor as FAMIX.MultipleFileAnchor).AddAllFile(fileAnchor); } else { sourcedEntity.sourceAnchor = fileAnchor; } (sourcedEntity as FAMIX.Type).numberOfLinesOfCode += loc; repository.Add(fileAnchor); }