1 L0 = <http://www.simantics.org/Layer0-1.1>
2 DIA = <http://www.simantics.org/Diagram-2.2>
3 STR = <http://www.simantics.org/Structural-1.2>
4 MOD = <http://www.simantics.org/Modeling-1.2>
5 VP = <http://www.simantics.org/Viewpoint-1.2>
6 IMAGE = <http://www.simantics.org/Image2-1.2>
7 SEL = <http://www.simantics.org/SelectionView-1.2>
8 SEL_UI = <http://www.simantics.org/SelectionViewUI-1.1>
9 G2D = <http://www.simantics.org/G2D-1.1>
10 DN = <http://www.simantics.org/DistrictNetwork-1.0>
12 // ----------------------------------------------------------------------------
14 MBC = MOD.ModelingBrowseContext
16 DNAC.newDiagramContribution : L0.Template
17 @template %actionContext %label %image %action
19 VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
21 VP.ActionContribution.HasImage %image
22 VP.ActionContribution.HasCategory VP.NewActionCategory
23 VP.ActionContribution.HasNodeType MBC.Configuration
24 VP.ActionContribution.HasAction %action
26 DNAC = DN.ActionContext : VP.BrowseContext
27 VP.BrowseContext.IsIncludedIn MOD.ModelingActionContext
28 @DNAC.newDiagramContribution "Network Diagram" IMAGES.MapImage ACTIONS.NewDNDiagram
30 DNBC = DN.BrowseContext : VP.BrowseContext
31 VP.BrowseContext.IsIncludedIn MOD.ModelingBrowseContext
33 @VP.customModifierRule DN.Edge VP.ResourceLabelModifierRule
34 @VP.constantImageRule DN.Composite IMAGES.MapImage
37 ACTIONS = DN.Actions : L0.Library
39 ACTIONS.NewDNDiagram : MOD.NewComposite
40 MOD.NewComposite.HasCompositeType DN.Composite
41 MOD.NewComposite.HasDefaultName "NewNetworkDiagram"
43 IMAGES = DN.Images : L0.Library
45 IMAGES.MapImage : IMAGE.PngImage
46 @L0.loadBytes "images/map.png"