]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.platform.ui.ontology/graph/ValidationView.pgraph
Move platform to only work with JDK's >= 11
[simantics/platform.git] / bundles / org.simantics.platform.ui.ontology / graph / ValidationView.pgraph
1 /*******************************************************************************
2  * Copyright (c) 2019 Association for Decentralized Information Management in
3  * Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     Semantum Oy - initial API and implementation
11  *******************************************************************************/
12 L0 = <http://www.simantics.org/Layer0-1.1>
13 DOC = <http://www.simantics.org/Documentation-1.2>
14 SWT = <http://www.simantics.org/SWT-1.0>
15 STR = <http://www.simantics.org/Structural-1.2>
16 SEL = <http://www.simantics.org/SelectionView-1.2>
17 COMPONENTS = <http://www.simantics.org/SWT-1.0/Components>
18 VIEWS = <http://www.simantics.org/PlatformUI-1.0/Views>
19 VP = <http://www.simantics.org/Viewpoint-1.2>
20 MOD = <http://www.simantics.org/Modeling-1.2>
21 PROJECT = <http://www.simantics.org/Project-1.2>
22 ISSUE = <http://www.simantics.org/Issue-1.2>
23
24 VIEWS.ValidationContribution : SWT.TypedVariableTabContribution
25     SEL.AbstractVariableTabContribution.HasPriority 1
26     SEL.AbstractTypedVariableTabContribution.HasType L0.IndexRoot
27     SWT.TypedVariableTabContribution.HasView VIEWS.Validations
28     L0.HasLabel "Validation"
29
30 VIEW = VIEWS.Validations : DOC.Document
31 VIEW.Root : DOC.Components.Root
32   @DOC.child1_
33     VIEW.Panel
34       @SWT.scrolledComposite
35       @DOC.child2_ VIEW.Explorer
36       @DOC.child1_
37         VIEW.Panel2
38           @SWT.gridComposite 2
39           @DOC.child1_
40             VIEW.Cell1
41               @SWT.gridCell _ false false 1
42                 VIEW.ConfigureButton
43                   @SWT.button "Configure"
44                   @VIEWS.sclEvent COMPONENTS.Button.onPress "configureButtonClick self"
45           @DOC.child2_
46             VIEW.Cell2
47               @SWT.gridCell _ false false 1
48                 VIEW.ValidateButton
49                   @SWT.button "Validate"
50                   @VIEWS.sclEvent COMPONENTS.Button.onPress "validateButtonClick self"
51
52 VIEW.Columns = { columns = [
53           {key = "single", label = "Issue sources", tooltip = "Issue sources", width = 80, weight = 1, alignment = "LEFT", grab = true}
54           ]} : SWT.Literals.Columns
55
56 VIEW.Explorer
57   COMPONENTS.Component.Check true
58   @SWT.explorer true true
59     "http://www.simantics.org/PlatformUI-1.0/Views/Validations/BrowseContext"
60     "#ValidationSelection"
61     VIEW.Columns
62   @VIEWS.sclEvent COMPONENTS.Explorer.onCheck "issueSourceExplorerCheck self"
63
64 MBC = MOD.ModelingBrowseContext
65
66 VIEWS.Validations.BrowseContext : VP.BrowseContext
67     //VP.BrowseContext.Includes PROJECT.ProjectBrowseContext
68     VP.BrowseContext.HasVisualsContribution PROJECT.Contributions.StandardNameLabelRule
69     VP.BrowseContext.HasChildContribution VIEWS.Validations.BrowseContext.Children : VP.ChildContribution
70         VP.ChildContribution.HasParentNodeType MBC.Variable
71         VP.ChildContribution.HasChildNodeType ISSUE.IssueSource
72         VP.ChildContribution.HasRule VIEWS.Validations.BrowseContext.Children.Rule : MOD.SCLChildRule
73             @MOD.scl MOD.SCLChildRule.getChildren "usedIssueSources" "Resource -> <ReadGraph> [Resource]"
74     VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution
75         VP.VisualsContribution.HasNodeType ISSUE.IssueSource
76         VP.VisualsContribution.HasPriority 1.0
77         VP.VisualsContribution.HasRule VIEWS.Validations.BrowseContext.Checked
78           @MOD.sclCheckedStateRule "checkedStateRule"