]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.issues.ui.ontology/graph/IssueUI.pgraph
(refs #7521) DIA.HasModCount should be functional
[simantics/platform.git] / bundles / org.simantics.issues.ui.ontology / graph / IssueUI.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 ISSUE = <http://www.simantics.org/Issue-1.2>
3 VP = <http://www.simantics.org/Viewpoint-1.2>
4 PROJECT = <http://www.simantics.org/Project-1.2>
5 SIMU = <http://www.simantics.org/Simulation-1.1>
6 ACT = <http://www.simantics.org/Action-1.1>
7 SG = <http://www.simantics.org/Scenegraph-1.1>
8 VIEWS = <http://www.simantics.org/Views-1.2>
9 SILK = <http://www.simantics.org/Silk-1.1>
10 MOD = <http://www.simantics.org/Modeling-1.2>
11
12 UI = <http://www.simantics.org/IssueUI-1.1> : L0.Ontology
13     @L0.new
14     L0.HasResourceClass "org.simantics.issues.ui.ontology.IssueUIResource"
15
16 //--------------------------------------------------------------------------
17 // Libraries
18 UI.Functions : L0.Library
19
20
21 //--------------------------------------------------------------------------
22 // Preferences
23
24 UI.ShowHiddenIssues <R L0.HasProperty : L0.FunctionalRelation
25     L0.HasRange L0.Boolean
26
27 UI.ShowNormalIssues <R L0.HasProperty : L0.FunctionalRelation
28     L0.HasRange L0.Boolean
29
30 UI.ShowUserIssues <R L0.HasProperty : L0.FunctionalRelation
31     L0.HasRange L0.Boolean
32
33
34 //--------------------------------------------------------------------------
35 // ACTIONS
36
37 ACTIONS = UI.Actions : L0.Library
38
39 ACTIONS.SeverityActionCategory : VP.ActionCategory
40     L0.HasLabel "Set Severity"
41     VP.ActionCategory.IsSubmenu L0.True
42
43 ACTIONS.SetSeverityAction <T ACT.Action
44     >-- ACTIONS.SetSeverityAction.HasSeverity --> ISSUE.Severity <R L0.DependsOn : L0.FunctionalRelation
45
46 ACTIONS.Help : ACT.Action
47
48 //--------------------------------------------------------------------------
49 // Issue Browse context
50
51 IBC = UI.IssueBrowseContext : VP.BrowseContext
52
53 // Node types
54 IBC.FatalFolder : VP.ResourceNodeType
55 IBC.ErrorFolder : VP.ResourceNodeType
56 IBC.WarningFolder : VP.ResourceNodeType
57 IBC.InfoFolder : VP.ResourceNodeType
58 IBC.NoteFolder : VP.ResourceNodeType
59 IBC.UnknownFolder : VP.ResourceNodeType
60
61 IBC.Issue : VP.NodeType
62     VP.HasContentType "Variable"
63 IBC.DynamicIssueHierarchyNode : VP.NodeType
64     VP.HasContentType "Variable"
65
66 // Rules
67 IBC.SeverityFolderRule <T VP.ChildRule
68     >-- IBC.SeverityFolderRule.HasSeverity --> ISSUE.Severity <R L0.DependsOn : L0.FunctionalRelation
69 IBC.SeverityChildRule <T VP.ChildRule
70     >-- IBC.SeverityChildRule.HasSeverity --> ISSUE.Severity <R L0.DependsOn : L0.FunctionalRelation
71 IBC.DynamicIssueSourceRule : VP.ChildRule
72     L0.HasDescription "Looks for all ISSUE.DynamicIssueSource instances from the active index roots. Produces a separate subtree out of each dynamic issue source."
73 IBC.DynamicIssueSourceHierarchyRule : VP.ChildRule
74     L0.HasDescription "Looks for all ISSUE.DynamicIssueSource instances from the active index roots. Produces a separate subtree out of each dynamic issue source."
75
76 IBC.SeverityFolderLabelRule <T VP.LabelRule
77     >-- IBC.SeverityFolderLabelRule.HasSeverity --> ISSUE.Severity <R L0.DependsOn : L0.FunctionalRelation
78 IBC.IssueLabelRule : VP.LabelRule
79 IBC.IssueImageRule : VP.ImageRule
80
81 IBC.IssueLabelDecorationRule : VP.LabelDecorationRule
82 IBC.IssueImageDecorationRule : VP.ImageDecorationRule
83 IBC.IssueContextDropAction : ACT.DropAction
84 IBC.UserIssueTest : VP.Test
85
86 // Browse context
87 IBC
88     // Structure
89     @VP.customChildRule PROJECT.Project 
90         _ : IBC.SeverityFolderRule
91             IBC.SeverityFolderRule.HasSeverity ISSUE.Severity.Note
92         IBC.NoteFolder
93     @VP.customChildRule PROJECT.Project 
94         _ : IBC.SeverityFolderRule
95             IBC.SeverityFolderRule.HasSeverity ISSUE.Severity.Fatal
96         IBC.FatalFolder
97     @VP.customChildRule PROJECT.Project 
98         _ : IBC.SeverityFolderRule
99             IBC.SeverityFolderRule.HasSeverity ISSUE.Severity.Error
100         IBC.ErrorFolder
101     @VP.customChildRule PROJECT.Project 
102         _ : IBC.SeverityFolderRule
103             IBC.SeverityFolderRule.HasSeverity ISSUE.Severity.Warning
104         IBC.WarningFolder
105     @VP.customChildRule PROJECT.Project 
106         _ : IBC.SeverityFolderRule
107             IBC.SeverityFolderRule.HasSeverity ISSUE.Severity.Info
108         IBC.InfoFolder
109     @VP.customChildRule PROJECT.Project
110         IBC.DynamicIssueSourceRule
111         IBC.DynamicIssueHierarchyNode
112     
113     // Content
114     @VP.customChildRule IBC.FatalFolder 
115         _ : IBC.SeverityChildRule
116             IBC.SeverityChildRule.HasSeverity ISSUE.Severity.Fatal
117         IBC.Issue
118     @VP.customChildRule IBC.ErrorFolder 
119         _ : IBC.SeverityChildRule
120             IBC.SeverityChildRule.HasSeverity ISSUE.Severity.Error
121         IBC.Issue
122     @VP.customChildRule IBC.WarningFolder 
123         _ : IBC.SeverityChildRule
124             IBC.SeverityChildRule.HasSeverity ISSUE.Severity.Warning
125         IBC.Issue
126     @VP.customChildRule IBC.InfoFolder 
127         _ : IBC.SeverityChildRule
128             IBC.SeverityChildRule.HasSeverity ISSUE.Severity.Info
129         IBC.Issue
130     @VP.customChildRule IBC.NoteFolder 
131         _ : IBC.SeverityChildRule
132             IBC.SeverityChildRule.HasSeverity ISSUE.Severity.Note
133         IBC.Issue
134     @VP.customChildRule IBC.DynamicIssueHierarchyNode
135         IBC.DynamicIssueSourceHierarchyRule
136         IBC.DynamicIssueHierarchyNode
137     
138     // Labels
139     @VP.customLabelRule IBC.FatalFolder 
140         _ : IBC.SeverityFolderLabelRule
141             IBC.SeverityFolderLabelRule.HasSeverity ISSUE.Severity.Fatal
142     @VP.customLabelRule IBC.ErrorFolder 
143         _ : IBC.SeverityFolderLabelRule
144             IBC.SeverityFolderLabelRule.HasSeverity ISSUE.Severity.Error
145     @VP.customLabelRule IBC.WarningFolder 
146         _ : IBC.SeverityFolderLabelRule
147             IBC.SeverityFolderLabelRule.HasSeverity ISSUE.Severity.Warning
148     @VP.customLabelRule IBC.InfoFolder 
149         _ : IBC.SeverityFolderLabelRule
150             IBC.SeverityFolderLabelRule.HasSeverity ISSUE.Severity.Info
151     @VP.customLabelRule IBC.NoteFolder 
152         _ : IBC.SeverityFolderLabelRule
153             IBC.SeverityFolderLabelRule.HasSeverity ISSUE.Severity.Note
154     @VP.customLabelRule IBC.Issue IBC.IssueLabelRule
155     @VP.customLabelRule IBC.DynamicIssueHierarchyNode IBC.IssueLabelRule
156     @VP.customVisualsRuleWithPriorityAndTest IBC.Issue VP.VariableLabelModifierRule  1.0 IBC.UserIssueTest
157     @VP.customLabelDecorationRule ISSUE.Issue IBC.IssueLabelDecorationRule
158     
159     // Images
160     @VP.constantImageRule IBC.FatalFolder SILK.bomb
161     @VP.constantImageRule IBC.ErrorFolder SILK.exclamation
162     @VP.constantImageRule IBC.WarningFolder SILK.error
163     @VP.constantImageRule IBC.InfoFolder SILK.information
164     @VP.constantImageRule IBC.NoteFolder SILK.note
165     @VP.constantImageRule IBC.UnknownFolder SILK.help
166     @VP.customImageRule IBC.Issue IBC.IssueImageRule
167     @VP.customImageRule IBC.DynamicIssueHierarchyNode IBC.IssueImageRule
168     
169     // Drop actions
170     @VP.dropActionContribution ISSUE.Issue IBC.IssueContextDropAction 1.0
171
172 // Action context for context menu
173 IAC = UI.ActionContext : VP.BrowseContext
174     // Set severity
175     @VP.actionContribution "Fatal" IBC.Issue SILK.bomb ACTIONS.SeverityActionCategory 
176         _ : ACTIONS.SetSeverityAction
177             ACTIONS.SetSeverityAction.HasSeverity ISSUE.Severity.Fatal
178     @VP.actionContribution "Error" IBC.Issue SILK.exclamation ACTIONS.SeverityActionCategory 
179         _ : ACTIONS.SetSeverityAction
180             ACTIONS.SetSeverityAction.HasSeverity ISSUE.Severity.Error
181     @VP.actionContribution "Warning" IBC.Issue SILK.error ACTIONS.SeverityActionCategory 
182         _ : ACTIONS.SetSeverityAction
183             ACTIONS.SetSeverityAction.HasSeverity ISSUE.Severity.Warning
184     @VP.actionContribution "Info" IBC.Issue SILK.information ACTIONS.SeverityActionCategory 
185         _ : ACTIONS.SetSeverityAction
186             ACTIONS.SetSeverityAction.HasSeverity ISSUE.Severity.Info
187     @VP.actionContribution "Note" IBC.Issue SILK.note ACTIONS.SeverityActionCategory 
188         _ : ACTIONS.SetSeverityAction
189             ACTIONS.SetSeverityAction.HasSeverity ISSUE.Severity.Note
190     @VP.actionContribution "Resolve" IBC.Issue SILK.tick VP.EditActionCategory 
191         ACTIONS.Resolve : ACT.Action
192     @VP.actionContribution "Unresolve" IBC.Issue SILK.lightbulb_off VP.EditActionCategory 
193         ACTIONS.Unresolve : ACT.Action
194     @VP.actionContribution "Hide" IBC.Issue SILK.shading VP.EditActionCategory 
195         ACTIONS.Hide : ACT.Action
196     @VP.actionContribution "Unhide" IBC.Issue SILK.shading VP.EditActionCategory 
197         ACTIONS.Unhide : ACT.Action
198     @VP.actionContribution "Help" IBC.Issue SILK.help VP.EditActionCategory ACTIONS.Help
199     @VP.actionContribution "Help" IBC.DynamicIssueHierarchyNode SILK.help VP.EditActionCategory ACTIONS.Help
200
201 //--------------------------------------------------------------------------
202 // Batch Issue Source Browse context
203
204 BISBC = UI.BatchIssueSourceBrowseContext : VP.BrowseContext
205
206 // Rules
207 //BISBC.IssueSourceRule : VP.ChildRule
208 //BISBC.IssueSourceLabelRule : VP.LabelRule
209 BISBC.IssueSourceCheckRule : VP.CheckedStateRule
210
211 // UIpoint
212 BISBC
213     @VP.relationChildRule         SIMU.Model   L0.ConsistsOf ISSUE.IssueSource
214     @VP.customLabelRule           ISSUE.IssueSource VP.ResourceLabelLabelRule
215     @VP.customCheckedStateRule    ISSUE.IssueSource BISBC.IssueSourceCheckRule
216
217
218 //--------------------------------------------------------------------------
219 // Issue view UI definitions
220
221 UI.IssueView.Description 
222     @VIEWS.Explorer.Column.full "single" "Description" "LEFT" 150 "Description" true 1
223 UI.IssueView.Resource 
224     @VIEWS.Explorer.Column.full "Resource" "Resource" "LEFT" 60 "Resource" false 1
225 UI.IssueView.Path 
226     @VIEWS.Explorer.Column.full "Path" "Path" "LEFT" 150 "Path" false 1
227
228 UI.IssueView.BatchColumn
229     @VIEWS.Explorer.Column.full "single" "Validations" "LEFT" 150 "Validations" true 1
230
231 UI.IssueView : VIEWS.TabFolder
232     VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
233         VIEWS.GridLayout.GridData.horizontalGrab true
234         VIEWS.GridLayout.GridData.verticalGrab true
235     SG.Node.children _ : L0.List
236         @L0.list
237             UI.IssueView.Active : VIEWS.Composite
238                 SG.Node.children _ : L0.List
239                     @L0.list
240                         UI.IssueView.Active.Explorer : VIEWS.Explorer
241                             @VIEWS.Control.style2 VIEWS.Control.Style.Constant.FullSelection VIEWS.Control.Style.Constant.Multi 
242                             VIEWS.Explorer.input VIEWS.Functions.singleResourceSelection
243                             VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
244                                 VIEWS.GridLayout.GridData.horizontalGrab true
245                                 VIEWS.GridLayout.GridData.verticalGrab true
246                             VIEWS.Explorer.columns _ : VIEWS.Explorer.ColumnList
247                                 @L0.list
248                                     UI.IssueView.Description
249                                     UI.IssueView.Resource
250                                     UI.IssueView.Path
251                             VIEWS.Explorer.persistor MOD.Functions.standardPersistor
252                             VIEWS.Explorer.browseContext _ : VIEWS.ResourceURI
253                               VIEWS.ResourceURI.HasResource IBC
254             UI.IssueView.Batch : VIEWS.Composite
255                 SG.Node.children _ : L0.List
256                     @L0.list
257                         UI.IssueView.Batch.Explorer : VIEWS.Explorer
258                             @VIEWS.Control.style2 VIEWS.Control.Style.Constant.FullSelection VIEWS.Control.Style.Constant.Check
259                             VIEWS.Explorer.input UI.Functions.activeModel : L0.Function
260                               L0.HasValueType "a"
261                             VIEWS.Explorer.selectionListener UI.Functions.issueSourceSelected : L0.Function
262                               L0.HasValueType "a -> Boolean"
263                             VIEWS.Control.layoutData _ : VIEWS.GridLayout.GridData
264                                 VIEWS.GridLayout.GridData.horizontalGrab true
265                                 VIEWS.GridLayout.GridData.verticalGrab true
266                             VIEWS.Explorer.columns _ : VIEWS.Explorer.ColumnList
267                                 @L0.list
268                                     UI.IssueView.BatchColumn
269                             VIEWS.Explorer.browseContext _ : VIEWS.ResourceURI
270                               VIEWS.ResourceURI.HasResource BISBC