MOD.SCLDropAction <T ACT.Action
--> MOD.SCLDropAction.action ==> "Resource -> Dynamic -> Integer -> <Proc> ()" <R L0.HasProperty : L0.FunctionalRelation
-MOD.SCLTest <T ACT.Action
+MOD.SCLTest <T VP.Test
--> MOD.SCLTest.test ==> "Resource -> <ReadGraph> Boolean" <R L0.HasProperty : L0.FunctionalRelation
// Legacy ModelingBrowseContext
ACTIONS.InstantiateUnder
@MOD.sclAction "instantiateUnderAction self"
+MOD.InstanceOfTest <T MOD.SCLTest
+ >-- MOD.InstanceOfTest.HasType --> L0.Type <R L0.IsRelatedTo : L0.TotalFunction
+ @MOD.sclAssertion MOD.SCLTest.test "instanceOfTest self" "Resource -> <Proc> Boolean"
+
+MOD.instanceOfTest : L0.Template
+ @template %test %type
+ %test : MOD.InstanceOfTest
+ MOD.InstanceOfTest.HasType %type
+
TESTS = MAC.Tests : L0.Library
TESTS.IsNotPublished
@MOD.sclTest "isNotPublished"
-import "Simantics/DB"
+import "Simantics/Variables"
import "Map" as Map
import "Simantics/Testing/BuiltinKeys"
importJava "org.simantics.browsing.ui.common.NodeContextBuilder" where
buildWithInput :: a -> <Proc> NodeContext
+instanceOfTest :: Variable -> <ReadGraph> (Resource -> <ReadGraph> Boolean)
+instanceOfTest self = do
+ typeResource = singleObject (represents $ parent self) MOD.InstanceOfTest.HasType
+ (\r -> isInstanceOf r typeResource)
include "Simantics/UI"
include "Simantics/SelectionView"
include "Simantics/Formatting"
-include "Simantics/Action"
\ No newline at end of file
+include "Simantics/Action"
+include "Simantics/Testing/BrowseContext"
\ No newline at end of file