// Generate a strongly-typed static accessor placed on a REL for getting REL instances that connect two MELs
private void GenerateLinkAccessor(DomainRelationship rel)
{
	bool getLinksRequiresNew = false;
	bool getLinkRequiresNew = false;
	for (DomainRelationship baseRel = rel.BaseRelationship as DomainRelationship; baseRel != null; baseRel = baseRel.BaseRelationship as DomainRelationship)
	{
		// If the roleplayer types in any of the base relationships is the same, we need a 'new'
		// keyword for this method.
		if (rel.Source.RolePlayer.GetFullName(true) == baseRel.Source.RolePlayer.GetFullName(true) &&
			rel.Target.RolePlayer.GetFullName(true) == baseRel.Target.RolePlayer.GetFullName(true))
		{
			getLinksRequiresNew = true;
			if(!baseRel.AllowsDuplicates)
			{
				getLinkRequiresNew = true;
				break;
			}
		}
	}

        
        #line default
        #line hidden
        
        #line 395 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("#region ");

        
        #line default
        #line hidden
        
        #line 396 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Name));

        
        #line default
        #line hidden
        
        #line 396 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" instance accessors\r\n\r\n/// <summary>\r\n/// Get any ");

        
        #line default
        #line hidden
        
        #line 399 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Name));

        
        #line default
        #line hidden
        
        #line 399 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" links between a given ");

        
        #line default
        #line hidden
        
        #line 399 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Source.RolePlayer.Name));

        
        #line default
        #line hidden
        
        #line 399 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" and a ");

        
        #line default
        #line hidden
        
        #line 399 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Target.RolePlayer.Name));

        
        #line default
        #line hidden
        
        #line 399 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(".\r\n/// </summary>\r\n[global::System.Diagnostics.DebuggerStepThrough]\r\n[global::Sys" +
        "tem.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1011\")]\r\n");

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetGeneratedLinkAccessModifier(rel)));

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" static ");

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(getLinksRequiresNew ? "new " : ""));

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("global::System.Collections.ObjectModel.ReadOnlyCollection<");

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("> GetLinks( ");

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Source.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" source, ");

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 403 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" target )\r\n{\r\n\tglobal::System.Collections.Generic.List<");

        
        #line default
        #line hidden
        
        #line 405 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 405 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("> outLinks = new global::System.Collections.Generic.List<");

        
        #line default
        #line hidden
        
        #line 405 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 405 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(">();\r\n\tglobal::System.Collections.Generic.IList<");

        
        #line default
        #line hidden
        
        #line 406 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 406 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("> links = DslModeling::DomainRoleInfo.GetElementLinks<");

        
        #line default
        #line hidden
        
        #line 406 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 406 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(">(source, ");

        
        #line default
        #line hidden
        
        #line 406 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 406 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 406 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Source.Name));

        
        #line default
        #line hidden
        
        #line 406 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("DomainRoleId);\r\n\tforeach ( ");

        
        #line default
        #line hidden
        
        #line 407 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 407 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" link in links )\r\n\t{\r\n\t\tif ( target.Equals(link.");

        
        #line default
        #line hidden
        
        #line 409 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Target.Name));

        
        #line default
        #line hidden
        
        #line 409 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(") )\r\n\t\t{\r\n\t\t\toutLinks.Add(link);\r\n\t\t}\r\n\t}\r\n\treturn outLinks.AsReadOnly();\r\n}\r\n");

        
        #line default
        #line hidden
        
        #line 416 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	// If AllowsDuplicates is false, only one link is allowed between any two role players
	if(!rel.AllowsDuplicates)
	{

        
        #line default
        #line hidden
        
        #line 420 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("/// <summary>\r\n/// Get the one ");

        
        #line default
        #line hidden
        
        #line 422 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Name));

        
        #line default
        #line hidden
        
        #line 422 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" link between a given ");

        
        #line default
        #line hidden
        
        #line 422 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Source.RolePlayer.Name));

        
        #line default
        #line hidden
        
        #line 422 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("and a ");

        
        #line default
        #line hidden
        
        #line 422 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Target.RolePlayer.Name));

        
        #line default
        #line hidden
        
        #line 422 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(".\r\n/// </summary>\r\n[global::System.Diagnostics.DebuggerStepThrough]\r\n[global::Sys" +
        "tem.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1011\")]\r\n");

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetGeneratedLinkAccessModifier(rel)));

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" static ");

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(getLinkRequiresNew ? "new " : ""));

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" GetLink( ");

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Source.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" source, ");

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 426 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" target )\r\n{\r\n\tglobal::System.Collections.Generic.IList<");

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("> links = DslModeling::DomainRoleInfo.GetElementLinks<");

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(">(source, ");

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Source.Name));

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("DomainRoleId);\r\n\tforeach ( ");

        
        #line default
        #line hidden
        
        #line 429 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 429 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" link in links )\r\n\t{\r\n\t\tif ( target.Equals(link.");

        
        #line default
        #line hidden
        
        #line 431 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(rel.Target.Name));

        
        #line default
        #line hidden
        
        #line 431 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(") )\r\n\t\t{\r\n\t\t\treturn link;\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n");

        
        #line default
        #line hidden
        
        #line 439 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}

        
        #line default
        #line hidden
        
        #line 441 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("#endregion\r\n");

        
        #line default
        #line hidden
        
        #line 443 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

}
public void GenerateDomainRelationship(DomainRelationship domainRelationship)
{
	//IDable, IDomainModelOwnable
	
	
	string baseClass = "DslEditorModeling::DomainModelLink";
	baseClass = CodeGenerationUtilities.GetBaseRelationship(domainRelationship, baseClass);
	
	string namespaceString = domainRelationship.Namespace;
	if(!string.IsNullOrEmpty(namespaceString))
	{

        
        #line default
        #line hidden
        
        #line 27 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("namespace ");

        
        #line default
        #line hidden
        
        #line 28 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(namespaceString));

        
        #line default
        #line hidden
        
        #line 28 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\r\n{\r\n");

        
        #line default
        #line hidden
        
        #line 30 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}
	PushIndent("\t");	
	this.Write(Utilities.Instance.GenerateSummary("DomainRelationship", domainRelationship, true));
	//GenerateClrAttributes(domainRelationship.Attributes);
	this.Write(Utilities.Instance.GenerateResourceAttributes(domainRelationship, GeneratedResourceName));
	//GenerateClsCompliantAttribute(domainRelationship.AccessModifier);
	this.Write(Utilities.Instance.GenerateDebuggerDisplayAttribute(domainRelationship)); 
	PopIndent();

        
        #line default
        #line hidden
        
        #line 39 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t[DslModeling::DomainRelationship(");

        
        #line default
        #line hidden
        
        #line 40 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
 if(domainRelationship.AllowsDuplicates) { 
        
        #line default
        #line hidden
        
        #line 40 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("AllowsDuplicates = true");

        
        #line default
        #line hidden
        
        #line 40 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
 } 
        
        #line default
        #line hidden
        
        #line 40 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(")]\r\n\t[DslModeling::DomainObjectId(\"");

        
        #line default
        #line hidden
        
        #line 41 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.Id.ToString("D")));

        
        #line default
        #line hidden
        
        #line 41 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\")]\r\n\t");

        
        #line default
        #line hidden
        
        #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetAccessModifier(domainRelationship.AccessModifier)));

        
        #line default
        #line hidden
        
        #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetGenerationInheritanceModifier(domainRelationship)));

        
        #line default
        #line hidden
        
        #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" partial class ");

        
        #line default
        #line hidden
        
        #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetGenerationClassName(domainRelationship)));

        
        #line default
        #line hidden
        
        #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" : ");

        
        #line default
        #line hidden
        
        #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(baseClass));

        
        #line default
        #line hidden
        
        #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\r\n\t{\r\n\t\t#region Constructors, domain class Id\r\n\t\r\n\t\t/// <summary>\r\n\t\t/// ");

        
        #line default
        #line hidden
        
        #line 47 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.Name));

        
        #line default
        #line hidden
        
        #line 47 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" domain class Id.\r\n\t\t/// </summary>\r\n\t\tpublic static readonly new global::System." +
        "Guid DomainClassId = new System.Guid(\"");

        
        #line default
        #line hidden
        
        #line 49 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.Id.ToString("D")));

        
        #line default
        #line hidden
        
        #line 49 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\");\r\n\r\n");

        
        #line default
        #line hidden
        
        #line 51 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	PushIndent("\t");
	PushIndent("\t");
	GenerateDomainRelationshipConstructors(domainRelationship, true);
	PopIndent();
	PopIndent();

        
        #line default
        #line hidden
        
        #line 57 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t#endregion\r\n");

        
        #line default
        #line hidden
        
        #line 59 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	PushIndent("\t");
	PushIndent("\t");
	// Generate properties to access the roles of this link, and static
	// methods to access the opposite roleplayers given a roleplayer.
	foreach(DomainRole role in domainRelationship.Roles)
	{
		this.Write(DomainRoleGenerator.Instance.GenerateDomainRole(role));
		this.Write(DomainRoleGenerator.Instance.GenerateStaticRoleAccessorOnRelationship(role.Opposite, domainRelationship));
		this.Write(DomainRoleGenerator.Instance.GenerateDomainRoleOverride(role));
	}
	
	// Generate properties for domain properties on this relationship
	DomainProperty nameProperty = null;
	foreach(DomainProperty property in domainRelationship.Properties) 
	{
		this.Write(DomainPropertyGenerator.Instance.GenerateDomainProperty(property));
		
		if( property.IsElementName )
			nameProperty = property;		
	}
	
	// Add accessors for roles that this REL plays in some other REL.
	/*
	if ( domainRelationship.RolesPlayed.Count > 0 )
	{

        
        #line default
        #line hidden
        
        #line 85 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("#region Accessors for roles that this REL plays in other RELs\r\n");

        
        #line default
        #line hidden
        
        #line 87 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}
	foreach(DomainRole role in domainRelationship.RolesPlayed)
	{
		GenerateOppositeRoleAccessor(role);
	}
	if ( domainRelationship.RolesPlayed.Count > 0 )
	{

        
        #line default
        #line hidden
        
        #line 95 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("#endregion\r\n");

        
        #line default
        #line hidden
        
        #line 97 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}
	*/
	
	// Add static accessors for link instances
	this.Write(DomainRoleGenerator.Instance.GenerateRoleLinkAccessor(domainRelationship.Source));
	this.Write(DomainRoleGenerator.Instance.GenerateRoleLinkAccessor(domainRelationship.Target));
	GenerateLinkAccessor(domainRelationship);
	this.PopIndent();
	
	string domainModelType = domainRelationship.GetMetaModel().GetFullName(true)+"DomainModel";
	string modifier = "override ";


        
        #line default
        #line hidden
        
        #line 110 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\r\n    /// <summary>\r\n    /// Gets the domain class Id of this element.\r\n    ///" +
        " </summary>\r\n    /// <returns>DomainClass Id.</returns>\r\n    public override Sys" +
        "tem.Guid GetDomainClassId()\r\n\t{\t\t\r\n\t\treturn ");

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(".DomainClassId;\t\t\r\n\t}\r\n\r\n    /// <summary>\r\n    /// Gets whether this is an embed" +
        "ding relationship or not.\r\n    /// </summary>\r\n    public override bool IsEmbedd" +
        "ing\r\n    {\r\n        get\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 128 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	if( domainRelationship is EmbeddingRelationship )
	{

        
        #line default
        #line hidden
        
        #line 131 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn true;\r\n");

        
        #line default
        #line hidden
        
        #line 133 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}
	else
	{

        
        #line default
        #line hidden
        
        #line 137 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn false;\r\n");

        
        #line default
        #line hidden
        
        #line 139 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
		
	}

        
        #line default
        #line hidden
        
        #line 141 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t}\r\n    }\r\n\r\n\t#region IDomainModelOwnable\r\n\t/*\r\n\t/// <summary>\r\n    /// Gets the" +
        " document data\r\n    /// </summary>\r\n    public ");

        
        #line default
        #line hidden
        
        #line 150 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 150 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("DslEditorModeling::ModelData DocumentData\r\n    {\r\n        get\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 154 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	if( this.EditorType == GenerationEditorType.VSPlugin )
	{

        
        #line default
        #line hidden
        
        #line 157 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\t// Null because in the visual studio plugin environment there can be multiple " +
        "model datas present at once. Therefore there\r\n\t\t\t// is no singleton accessor for" +
        " the model data.\r\n\t\t\treturn null;\r\n");

        
        #line default
        #line hidden
        
        #line 161 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}
	else
	{

        
        #line default
        #line hidden
        
        #line 165 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn ");

        
        #line default
        #line hidden
        
        #line 166 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.GetMetaModel().GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 166 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("DocumentData.Instance;\r\n");

        
        #line default
        #line hidden
        
        #line 167 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}

        
        #line default
        #line hidden
        
        #line 169 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t}\r\n    }\r\n\t*/\r\n\t\r\n\t/// <summary>\r\n    /// Gets the domain model type.\r\n    /// " +
        "</summary>\r\n    /// <returns></returns>\r\n    public ");

        
        #line default
        #line hidden
        
        #line 178 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 178 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("System.Type GetDomainModelType()\r\n\t{\r\n\t\treturn typeof(");

        
        #line default
        #line hidden
        
        #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainModelType));

        
        #line default
        #line hidden
        
        #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(");\r\n\t}\r\n\r\n    /// <summary>\r\n    /// Gets the domain model services.\r\n    /// </s" +
        "ummary>\r\n    /// <returns></returns>\r\n    public ");

        
        #line default
        #line hidden
        
        #line 187 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 187 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("DslEditorModeling::IDomainModelServices GetDomainModelServices()\r\n\t{\r\n\t\treturn ");

        
        #line default
        #line hidden
        
        #line 189 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 189 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("DomainModelServices.Instance;\r\n\t}\r\n\t\r\n    /// <summary>\r\n    /// Gets the domain " +
        "model DomainClassId.\r\n    /// </summary>\r\n    /// <returns></returns>\r\n    publi" +
        "c ");

        
        #line default
        #line hidden
        
        #line 196 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 196 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("System.Guid GetDomainModelTypeId()\r\n\t{\r\n\t\treturn ");

        
        #line default
        #line hidden
        
        #line 198 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainModelType));

        
        #line default
        #line hidden
        
        #line 198 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(".DomainModelId;\r\n\t}\t\t\r\n\t\r\n    /// <summary>\r\n    /// Gets or sets the value of th" +
        "e property (which is marked as element name)\r\n    /// </summary>\r\n    public ");

        
        #line default
        #line hidden
        
        #line 204 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 204 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("string DomainElementName\r\n\t{\r\n\t\tget\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 208 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		if( nameProperty != null )
		{

        
        #line default
        #line hidden
        
        #line 211 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn this.");

        
        #line default
        #line hidden
        
        #line 212 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 212 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(";\r\n");

        
        #line default
        #line hidden
        
        #line 213 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		}
		else
		{
			if( domainRelationship.BaseRelationship != null )
			{

        
        #line default
        #line hidden
        
        #line 219 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn base.DomainElementName;\r\n");

        
        #line default
        #line hidden
        
        #line 221 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
				
			}
			else
			{

        
        #line default
        #line hidden
        
        #line 225 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn null;\r\n");

        
        #line default
        #line hidden
        
        #line 227 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

			}
		}

        
        #line default
        #line hidden
        
        #line 230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t}\r\n\t\tset\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 234 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		if( nameProperty != null )
		{

        
        #line default
        #line hidden
        
        #line 237 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\tthis.");

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" = value;\r\n");

        
        #line default
        #line hidden
        
        #line 239 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		}
		else
		{
			if( domainRelationship.BaseRelationship != null )
			{

        
        #line default
        #line hidden
        
        #line 245 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\tbase.DomainElementName = value;\r\n");

        
        #line default
        #line hidden
        
        #line 247 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

			}			
		}

        
        #line default
        #line hidden
        
        #line 250 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t}\r\n\t}\r\n\t\r\n    /// <summary>\r\n    /// Gets whether the domain element has a prop" +
        "erty marked as element name.\r\n    /// </summary>\r\n    public ");

        
        #line default
        #line hidden
        
        #line 257 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 257 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("bool DomainElementHasName \r\n    {\r\n\t\tget\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 261 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		if( nameProperty != null )
		{

        
        #line default
        #line hidden
        
        #line 264 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn true;\r\n");

        
        #line default
        #line hidden
        
        #line 266 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		}
		else
		{
			if( domainRelationship.BaseRelationship != null )
			{

        
        #line default
        #line hidden
        
        #line 272 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn base.DomainElementHasName;\r\n");

        
        #line default
        #line hidden
        
        #line 274 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

			}
			else
			{

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn false;\r\n");

        
        #line default
        #line hidden
        
        #line 280 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

			}
		}

        
        #line default
        #line hidden
        
        #line 283 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t}\r\n    }\r\n\t\r\n\t/// <summary>\r\n    /// Gets the domain element name info if there" +
        " is one; Null otherwise.\r\n    /// </summary>\r\n    public ");

        
        #line default
        #line hidden
        
        #line 290 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 290 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("DslModeling::DomainPropertyInfo DomainElementNameInfo\r\n    {\r\n\t\tget\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 294 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		if( nameProperty != null )
		{

        
        #line default
        #line hidden
        
        #line 297 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn this.Store.DomainDataDirectory.GetDomainProperty(");

        
        #line default
        #line hidden
        
        #line 298 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 298 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 298 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 298 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("DomainPropertyId);\r\n");

        
        #line default
        #line hidden
        
        #line 299 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		}
		else
		{
			if( domainRelationship.BaseRelationship != null )
			{

        
        #line default
        #line hidden
        
        #line 305 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn base.DomainElementNameInfo;\r\n");

        
        #line default
        #line hidden
        
        #line 307 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

			}
			else
			{

        
        #line default
        #line hidden
        
        #line 311 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t\treturn null;\r\n");

        
        #line default
        #line hidden
        
        #line 313 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		
			}
		}

        
        #line default
        #line hidden
        
        #line 317 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t}\r\n    }\r\n\t\r\n\t/// <summary>\r\n    /// Gets the type of the ModelElement as strin" +
        "g.\r\n    /// </summary>\r\n    public ");

        
        #line default
        #line hidden
        
        #line 324 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 324 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("string DomainElementType\r\n    {\r\n        get\r\n        {\r\n            return \"");

        
        #line default
        #line hidden
        
        #line 328 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.Name));

        
        #line default
        #line hidden
        
        #line 328 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\";\r\n        }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Gets the display name of the t" +
        "ype of the ModelElement.\r\n    /// </summary>\r\n    public ");

        
        #line default
        #line hidden
        
        #line 335 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 335 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("string DomainElementTypeDisplayName\r\n    {\r\n        get\r\n        {\r\n            r" +
        "eturn \"");

        
        #line default
        #line hidden
        
        #line 339 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.DisplayName));

        
        #line default
        #line hidden
        
        #line 339 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\";\r\n        }\r\n    }\t\r\n\t#endregion\r\n}\r\n");

        
        #line default
        #line hidden
        
        #line 344 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	// If this link is double-derived, generate the skeleton derived class (with just the
	// constructors)
	if ( domainRelationship.GeneratesDoubleDerived )
	{
		this.Write(Utilities.Instance.GenerateSummary("DomainRelationship", domainRelationship, false));
		//GenerateClsCompliantAttribute(domainRelationship.AccessModifier);

        
        #line default
        #line hidden
        
        #line 351 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t");

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetAccessModifier(domainRelationship.AccessModifier)));

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetInheritanceModifier(domainRelationship.InheritanceModifier)));

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" partial class ");

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainRelationship.Name));

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(" : ");

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetGenerationClassName(domainRelationship)));

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\r\n\t{\r\n\t\t#region Constructors\r\n");

        
        #line default
        #line hidden
        
        #line 355 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

		PushIndent("\t");
		PushIndent("\t");
		GenerateDomainRelationshipConstructors(domainRelationship, false);
		PopIndent();
		PopIndent();

        
        #line default
        #line hidden
        
        #line 361 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("\t\t#endregion\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 364 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}
	if(!string.IsNullOrEmpty(namespaceString))
	{
		PopIndent();

        
        #line default
        #line hidden
        
        #line 369 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"
this.Write("}\r\n");

        
        #line default
        #line hidden
        
        #line 371 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainRelationshipGenerator.tt"

	}	
}