include "Simantics/DB"
include "http://www.simantics.org/Layer0-1.1" as L0
+include "http://www.simantics.org/Layer0X-1.1" as L0X
include "http://www.simantics.org/Structural-1.2" as STR
include "http://www.simantics.org/Diagram-2.2" as DIA
include "http://www.simantics.org/Modeling-1.2" as MOD
include "http://www.simantics.org/Image2-1.2" as IMAGE
include "http://www.simantics.org/Document-1.2" as DOCUMENT
include "http://www.simantics.org/Event-1.2" as EVENT
-include "http://www.simantics.org/Project-1.2" as PROJECT
\ No newline at end of file
+include "http://www.simantics.org/Project-1.2" as PROJECT
+include "http://www.simantics.org/Issue-1.2" as ISSUE
+/*******************************************************************************
+ * 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:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ * Semantum Oy - reorganization
+ *******************************************************************************/
L0 = <http://www.simantics.org/Layer0-1.1>
PROJECT = <http://www.simantics.org/Project-1.2>
MOD = <http://www.simantics.org/Modeling-1.2>
L0.IsLinkedTo MOD
PlatformUI.SCLMain : L0.SCLModule
- L0.SCLModule.definition _ : L0.String
- @L0.loadString "scl/SCLMain.scl"
+ L0.SCLModule.definition """ include "Simantics/PlatformUI" """
PlatformUI.NameLabelMode <T L0.String
@L0.tag L0.Enumeration
+/*******************************************************************************
+ * 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:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ * Semantum Oy - reorganization
+ *******************************************************************************/
include "Simantics/All"
include "SWT/All"
+import "UI/Progress"
+import "Simantics/IssueUI"
useSelectedHandler :: Variable -> (String -> Maybe String) -> <WriteGraph> String
useSelectedHandler input parameters = do
Nothing -> var
Just component -> resourceVariable component
else var
-
\ No newline at end of file
+
+configureButtonClickHandler :: Resource -> CommandContext -> <Proc> Maybe CommandResult
+configureButtonClickHandler indexRoot context = do
+ showIssueConfigurationDialog indexRoot
+ Nothing
+
+configureButtonClick :: Variable -> <ReadGraph,Proc> AbstractEventHandler
+configureButtonClick self = do
+ indexRoot = represents $ contextVariable self
+ eventHandler2 $ configureButtonClickHandler indexRoot
+
+validateButtonClickHandler :: Resource -> CommandContext -> <Proc> Maybe CommandResult
+validateButtonClickHandler indexRoot context = do
+ runActiveValidations (createNullProgressMonitor ()) indexRoot
+ Nothing
+
+validateButtonClick :: Variable -> <ReadGraph,Proc> AbstractEventHandler
+validateButtonClick self = do
+ indexRoot = represents $ contextVariable self
+ eventHandler2 $ validateButtonClickHandler indexRoot
+
+issueSourceExplorerCheckHandler :: Resource -> CommandContext -> <Proc> Maybe CommandResult
+issueSourceExplorerCheckHandler indexRoot context = match possibleValue context "item" with
+ Nothing -> Nothing
+ Just issueSource -> match possibleValue context "checked" with
+ Nothing -> Nothing
+ Just value -> if value then do
+ syncWrite $ \_ -> claim issueSource ISSUE.IssueSource.Selected (parent issueSource)
+ Nothing
+ else do
+ syncWrite $ \_ -> denyByPredicate issueSource ISSUE.IssueSource.Selected
+ Nothing
+
+issueSourceExplorerCheck :: Variable -> <ReadGraph,Proc> AbstractEventHandler
+issueSourceExplorerCheck self = do
+ indexRoot = represents $ contextVariable self
+ eventHandler2 $ issueSourceExplorerCheckHandler indexRoot
+
+usedIssueSources :: Resource -> <ReadGraph> [Resource]
+usedIssueSources indexRoot = do
+ objectsWithType indexRoot L0.ConsistsOf ISSUE.IssueSource
+
+checkedStateRule :: BrowseNodeRule CheckedState
+checkedStateRule (ResourceX r) = if existsStatement3 r ISSUE.IssueSource.Selected (parent r) then CHECKED else NOT_CHECKED
+
\ No newline at end of file