]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.charts.ontology/graph/ChartViewpoint.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.charts.ontology / graph / ChartViewpoint.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>\r
2 MOD = <http://www.simantics.org/Modeling-1.2>\r
3 IMAGE = <http://www.simantics.org/Image2-1.2>\r
4 VP = <http://www.simantics.org/Viewpoint-1.2>\r
5 ACT = <http://www.simantics.org/Action-1.1>\r
6 CHART = <http://www.simantics.org/Charts-1.2>\r
7 SIMU = <http://www.simantics.org/Simulation-1.1>\r
8 \r
9 CBC = CHART.ChartBrowseContext : VP.BrowseContext\r
10     VP.BrowseContext.IsIncludedIn MOD.ModelingBrowseContext\r
11 CAC = CHART.ChartActionContext : VP.BrowseContext\r
12     VP.BrowseContext.IsIncludedIn MOD.ModelingActionContext\r
13 \r
14 CBC.ChartsFolder : VP.ResourceNodeType\r
15 \r
16 // Library containing all viewpoint contributions\r
17 CHART.Contributions : L0.Library\r
18 \r
19 CHART.Contributions.Charts\r
20     @VP.defineRelationChildRule SIMU.Model L0.ConsistsOf CHART.Chart\r
21 \r
22 CBC\r
23     //@VP.relationChildRuleWithFolder MOD.StructuralModel L0.ConsistsOf   CHART.Chart\r
24     //    CBC.ChartsFolder : VP.ResourceNodeType\r
25 \r
26     VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution\r
27         VP.VisualsContribution.HasNodeType CHART.TimeSeriesChart\r
28         VP.VisualsContribution.HasRule CBC.ChartSorterRule\r
29 \r
30     @VP.relationChildRule           CHART.Chart        L0.ConsistsOf   CHART.Chart.Item\r
31     @VP.relationChildRule           CHART.ChartGroup   L0.ConsistsOf   CHART.Chart\r
32 \r
33     @VP.constantLabelRule           CBC.ChartsFolder                    "Charts"\r
34     @VP.customLabelRule             CHART.Chart.Item                    CBC.ChartItemLabelRule\r
35     @VP.customLabelRule             CHART.Chart.Item                    CBC.ChartItemNameModifierRule\r
36     @VP.customLabelDecorationRule   CHART.Chart.Item                    CBC.ChartItemLabelDecorationRule\r
37 \r
38     @VP.constantImageRule           CBC.ChartsFolder                    IMAGES.ChartsFolder\r
39     @VP.constantImageRule           CHART.ChartGroup                    IMAGES.ChartGroup\r
40     @VP.constantImageRule           CHART.Chart                         IMAGES.Chart\r
41     @VP.customImageRule             CHART.Chart.Item                    IMAGES.ChartItemImage\r
42 \r
43     @VP.dropActionContribution      CBC.ChartsFolder   ACTIONS.ChartGroupDropAction   1.0\r
44     @VP.dropActionContribution      CHART.ChartGroup   ACTIONS.ChartGroupDropAction   1.0\r
45     @VP.dropActionContribution      CHART.TimeSeriesChart ACTIONS.ChartDropAction        1.0\r
46     @VP.dropActionContribution      CHART.Chart.Item   ACTIONS.ChartItemDropAction    1.0\r
47 \r
48 CAC\r
49     @VP.actionContribution "Chart Group" CHART.ChartGroup IMAGES.ChartGroup VP.NewActionCategory ACTIONS.NewChartGroup\r
50     @VP.actionContribution "Chart Group" CBC.ChartsFolder IMAGES.ChartGroup VP.NewActionCategory ACTIONS.NewChartGroup\r
51     @VP.actionContribution "Chart" CBC.ChartsFolder IMAGES.Chart VP.NewActionCategory ACTIONS.NewChart\r
52     @VP.actionContribution "Chart" CHART.ChartGroup IMAGES.Chart VP.NewActionCategory ACTIONS.NewChart\r
53 \r
54 CHART.Contributions.NewChart\r
55     @VP.defineActionContribution "Chart" SIMU.Model IMAGES.Chart VP.NewActionCategory ACTIONS.NewChart\r
56 \r
57 \r
58 IMAGES = CBC.Images : L0.Library\r
59 IMAGES.ChartsFolder : IMAGE.PngImage\r
60     @L0.loadBytes "images/Charts.png"\r
61 IMAGES.Chart : IMAGE.PngImage\r
62     @L0.loadBytes "images/chart_line.png"\r
63 IMAGES.ChartGroup : IMAGE.PngImage\r
64     @L0.loadBytes "images/chart_group2.png"\r
65 IMAGES.Plot : IMAGE.PngImage\r
66     @L0.loadBytes "images/tag_orange.png"\r
67 IMAGES.ChartItemImage : VP.ImageRule\r
68 \r
69 CBC.ChartItemLabelRule : VP.LabelRule\r
70 CBC.ChartSorterRule : VP.SorterRule\r
71 CBC.ChartItemLabelDecorationRule : VP.LabelDecorationRule\r
72 \r
73 CBC.ChartItemNameModifierRule : VP.ModifierRule \r
74     L0.HasDescription """Modifier rule based on resource names."""\r
75 \r
76 ACTIONS = CAC.Actions : L0.Library\r
77 ACTIONS.ChartDropAction : ACT.DropAction\r
78 ACTIONS.ChartGroupDropAction : ACT.DropAction\r
79 ACTIONS.ChartItemDropAction : ACT.DropAction\r
80 ACTIONS.NewChart : ACT.Action\r
81 ACTIONS.NewChartGroup : ACT.Action\r