]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Selection view tab for managing issue validations 57/3157/2
authorAntti Villberg <antti.villberg@semantum.fi>
Mon, 26 Aug 2019 07:51:40 +0000 (10:51 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 26 Aug 2019 09:08:45 +0000 (09:08 +0000)
gitlab #365

Change-Id: I273baaecb90bd88ec6f993593eb9315eb993479f

bundles/org.simantics.platform.ui.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.platform.ui.ontology/graph/ValidationView.pgraph [new file with mode: 0644]

index 3aaaed2f668aa308727dc4947ef2993d0854ee27..1e8ad54e13d4b8396d0f37626eb7b488322c0428 100644 (file)
@@ -18,7 +18,8 @@ Require-Bundle: org.simantics.layer0,
  org.simantics.modeling.template2d.ontology;bundle-version="1.0.0",
  org.simantics.spreadsheet.ontology;bundle-version="1.2.0",
  org.simantics.selectionview.ui.ontology;bundle-version="1.1.0",
- org.simantics.diagram.ontology;bundle-version="2.2.0"
+ org.simantics.diagram.ontology;bundle-version="2.2.0",
+ org.simantics.issues.ontology;bundle-version="1.2.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: org.simantics.platform.ui
 Automatic-Module-Name: org.simantics.platform.ui.ontology
diff --git a/bundles/org.simantics.platform.ui.ontology/graph/ValidationView.pgraph b/bundles/org.simantics.platform.ui.ontology/graph/ValidationView.pgraph
new file mode 100644 (file)
index 0000000..31aeb3c
--- /dev/null
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2019 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Semantum Oy - initial API and implementation
+ *******************************************************************************/
+L0 = <http://www.simantics.org/Layer0-1.1>
+DOC = <http://www.simantics.org/Documentation-1.2>
+SWT = <http://www.simantics.org/SWT-1.0>
+STR = <http://www.simantics.org/Structural-1.2>
+SEL = <http://www.simantics.org/SelectionView-1.2>
+COMPONENTS = <http://www.simantics.org/SWT-1.0/Components>
+VIEWS = <http://www.simantics.org/PlatformUI-1.0/Views>
+VP = <http://www.simantics.org/Viewpoint-1.2>
+MOD = <http://www.simantics.org/Modeling-1.2>
+PROJECT = <http://www.simantics.org/Project-1.2>
+ISSUE = <http://www.simantics.org/Issue-1.2>
+
+VIEWS.ValidationContribution : SWT.TypedVariableTabContribution
+    SEL.AbstractVariableTabContribution.HasPriority 1
+    SEL.AbstractTypedVariableTabContribution.HasType L0.IndexRoot
+    SWT.TypedVariableTabContribution.HasView VIEWS.Validations
+    L0.HasLabel "Validation"
+
+VIEW = VIEWS.Validations : DOC.Document
+VIEW.Root : DOC.Components.Root
+  @DOC.child1_
+    VIEW.Panel
+      @SWT.scrolledComposite
+      @DOC.child2_ VIEW.Explorer
+      @DOC.child1_
+        VIEW.Panel2
+          @SWT.gridComposite 2
+          @DOC.child1_
+            VIEW.Cell1
+              @SWT.gridCell _ false false 1
+                VIEW.ConfigureButton
+                  @SWT.button "Configure"
+                  @VIEWS.sclEvent COMPONENTS.Button.onPress "configureButtonClick self"
+          @DOC.child2_
+            VIEW.Cell2
+              @SWT.gridCell _ false false 1
+                VIEW.ValidateButton
+                  @SWT.button "Validate"
+                  @VIEWS.sclEvent COMPONENTS.Button.onPress "validateButtonClick self"
+
+VIEW.Columns = { columns = [
+          {key = "single", label = "Issue sources", tooltip = "Issue sources", width = 80, weight = 1, alignment = "LEFT", grab = true}
+          ]} : SWT.Literals.Columns
+
+VIEW.Explorer
+  COMPONENTS.Component.Check true
+  @SWT.explorer true true
+    "http://www.simantics.org/PlatformUI-1.0/Views/Validations/BrowseContext"
+    "#ValidationSelection"
+    VIEW.Columns
+  @VIEWS.sclEvent COMPONENTS.Explorer.onCheck "issueSourceExplorerCheck self"
+
+MBC = MOD.ModelingBrowseContext
+
+VIEWS.Validations.BrowseContext : VP.BrowseContext
+    VP.BrowseContext.Includes PROJECT.ProjectBrowseContext
+    VP.BrowseContext.HasVisualsContribution PROJECT.Contributions.StandardNameLabelRule
+    VP.BrowseContext.HasChildContribution VIEWS.Validations.BrowseContext.Children : VP.ChildContribution
+        VP.ChildContribution.HasParentNodeType MBC.Variable
+        VP.ChildContribution.HasChildNodeType ISSUE.IssueSource
+        VP.ChildContribution.HasRule VIEWS.Validations.BrowseContext.Children.Rule : MOD.SCLChildRule
+            @MOD.scl MOD.SCLChildRule.getChildren "usedIssueSources" "Resource -> <ReadGraph> [Resource]"
+    VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution
+        VP.VisualsContribution.HasNodeType ISSUE.IssueSource
+        VP.VisualsContribution.HasPriority 1.0
+        VP.VisualsContribution.HasRule VIEWS.Validations.BrowseContext.Checked
+          @MOD.sclCheckedStateRule "checkedStateRule"