]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.network.ontology/graph/DistrictNetworkViewpoint.pgraph
Send event for performed queries + some refactoring
[simantics/district.git] / org.simantics.district.network.ontology / graph / DistrictNetworkViewpoint.pgraph
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>
11
12 // ----------------------------------------------------------------------------
13
14 MBC = MOD.ModelingBrowseContext
15
16 DNAC.newDiagramContribution : L0.Template
17     @template %actionContext %label %image %action
18         %actionContext
19             VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
20                 L0.HasLabel %label
21                 VP.ActionContribution.HasImage %image
22                 VP.ActionContribution.HasCategory VP.NewActionCategory
23                 VP.ActionContribution.HasNodeType MBC.Configuration
24                 VP.ActionContribution.HasAction %action
25
26 DNAC = DN.ActionContext : VP.BrowseContext
27     VP.BrowseContext.IsIncludedIn MOD.ModelingActionContext
28     @DNAC.newDiagramContribution "Network Diagram" IMAGES.MapImage ACTIONS.NewDNDiagram
29
30 DNBC = DN.BrowseContext : VP.BrowseContext
31     VP.BrowseContext.IsIncludedIn MOD.ModelingBrowseContext
32     
33     @VP.customModifierRule    DN.Edge    VP.ResourceLabelModifierRule
34     @VP.constantImageRule     DN.Composite   IMAGES.MapImage
35
36
37 ACTIONS = DN.Actions : L0.Library
38
39 ACTIONS.NewDNDiagram : MOD.NewComposite
40     MOD.NewComposite.HasCompositeType DN.Composite
41     MOD.NewComposite.HasDefaultName "NewNetworkDiagram"
42
43 IMAGES = DN.Images : L0.Library
44
45 IMAGES.MapImage : IMAGE.PngImage
46     @L0.loadBytes "images/map.png"