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