--- /dev/null
+L0 = <http://www.simantics.org/Layer0-1.1>
+DIA = <http://www.simantics.org/Diagram-2.2>
+STR = <http://www.simantics.org/Structural-1.2>
+MOD = <http://www.simantics.org/Modeling-1.2>
+VP = <http://www.simantics.org/Viewpoint-1.2>
+IMAGE = <http://www.simantics.org/Image2-1.2>
+SEL = <http://www.simantics.org/SelectionView-1.2>
+SEL_UI = <http://www.simantics.org/SelectionViewUI-1.1>
+G2D = <http://www.simantics.org/G2D-1.1>
+DN = <http://www.simantics.org/DistrictNetwork-1.0>
+
+// ----------------------------------------------------------------------------
+
+MBC = MOD.ModelingBrowseContext
+
+DNAC.newDiagramContribution : L0.Template
+ @template %actionContext %label %image %action
+ %actionContext
+ VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
+ L0.HasLabel %label
+ VP.ActionContribution.HasImage %image
+ VP.ActionContribution.HasCategory VP.NewActionCategory
+ VP.ActionContribution.HasNodeType MBC.Configuration
+ VP.ActionContribution.HasAction %action
+
+DNAC = DN.ActionContext : VP.BrowseContext
+ VP.BrowseContext.IsIncludedIn MOD.ModelingActionContext
+ @DNAC.newDiagramContribution "Network Diagram" IMAGES.MapImage ACTIONS.NewDNDiagram
+
+DNBC = DN.BrowseContext : VP.BrowseContext
+ VP.BrowseContext.IsIncludedIn MOD.ModelingBrowseContext
+ VP.BrowseContext.Includes SEL_UI.StandardPropertiesBase.BrowseContext
+
+ @VP.customModifierRule DN.Edge VP.ResourceLabelModifierRule
+ @VP.constantImageRule DN.Composite IMAGES.MapImage
+
+
+ACTIONS = DN.Actions : L0.Library
+
+ACTIONS.NewDNDiagram : MOD.NewComposite
+ MOD.NewComposite.HasCompositeType DN.Composite
+ MOD.NewComposite.HasDefaultName "NewNetworkDiagram"
+
+IMAGES = DN.Images : L0.Library
+
+IMAGES.MapImage : IMAGE.PngImage
+ @L0.loadBytes "images/map.png"