1 /*******************************************************************************
2 * Copyright (c) 2019 Association for Decentralized Information Management in
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
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>
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"
30 VIEW = VIEWS.Validations : DOC.Document
31 VIEW.Root : DOC.Components.Root
34 @SWT.scrolledComposite
35 @DOC.child2_ VIEW.Explorer
41 @SWT.gridCell _ false false 1
43 @SWT.button "Configure"
44 @VIEWS.sclEvent COMPONENTS.Button.onPress "configureButtonClick self"
47 @SWT.gridCell _ false false 1
49 @SWT.button "Validate"
50 @VIEWS.sclEvent COMPONENTS.Button.onPress "validateButtonClick self"
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
57 COMPONENTS.Component.Check true
58 @SWT.explorer true true
59 "http://www.simantics.org/PlatformUI-1.0/Views/Validations/BrowseContext"
60 "#ValidationSelection"
62 @VIEWS.sclEvent COMPONENTS.Explorer.onCheck "issueSourceExplorerCheck self"
64 MBC = MOD.ModelingBrowseContext
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"