// Initialize connection templates
this.connectionTemplates = new ArrayList<DiagramConnectionTemplate>();
ElementList<IDiagramExplicitConnectionBindingDef> connectionBindings = this.diagramPageDef.getDiagramConnectionBindingDefs();
for (IDiagramExplicitConnectionBindingDef connBinding : connectionBindings)
{
IDiagramConnectionDef connDef = getDiagramConnectionDef(connBinding.getConnectionId().content());
DiagramConnectionTemplate connectionTemplate = new DiagramConnectionTemplate(connBinding);
connectionTemplate.init(this.diagramPagePart, this.diagramPagePart.getLocalModelElement(),
connDef, Collections.<String,String>emptyMap());
connectionTemplate.initialize();
this.connectionTemplates.add(connectionTemplate);
connectionTemplate.addTemplateListener(this.connTemplateListener);
}
// initialize implicit connections
this.implicitConnectionTemplates = new ArrayList<DiagramImplicitConnectionTemplate>();
ElementList<IDiagramImplicitConnectionBindingDef> implicitConnBindings = this.diagramPageDef.getImplicitConnectionBindingDefs();
for (IDiagramImplicitConnectionBindingDef implicitConnBinding : implicitConnBindings)
{
IDiagramConnectionDef connDef = getDiagramConnectionDef(implicitConnBinding.getConnectionId().content());
DiagramImplicitConnectionTemplate connectionTemplate = new DiagramImplicitConnectionTemplate(implicitConnBinding);
connectionTemplate.init(this.diagramPagePart, this.diagramPagePart.getLocalModelElement(),
connDef, Collections.<String,String>emptyMap());
connectionTemplate.initialize();
this.implicitConnectionTemplates.add(connectionTemplate);