X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fscl%2FSimantics%2FTesting%2FBrowseContext.scl;h=d051042d5f4258b6c92acbace7b52eeec2a9114b;hb=HEAD;hp=106d93bb322410cbc6e2d2d4728c53174bda04e2;hpb=28436fab181e114382d85cd7f33a8b9af87f45c2;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl b/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl index 106d93bb3..d051042d5 100644 --- a/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl +++ b/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl @@ -78,6 +78,8 @@ importJava "org.simantics.browsing.ui.content.ImageDecorator" where importJava "org.eclipse.jface.resource.DeviceResourceDescriptor" where data FontDescriptor + +importJava "org.eclipse.jface.resource.ColorDescriptor" where data ColorDescriptor importJava "org.eclipse.jface.resource.FontDescriptor" where @@ -85,6 +87,11 @@ importJava "org.eclipse.jface.resource.FontDescriptor" where @JavaName createFrom createFontDescriptorFrom :: String -> Integer -> Integer -> FontDescriptor +importJava "org.simantics.modeling.ColorDescriptorUtil" where + colorDescriptorAsHex :: ColorDescriptor -> String + colorDescriptorAsTuple3 :: ColorDescriptor -> (Double, Double, Double) + colorDescriptor :: (Double, Double, Double) -> ColorDescriptor + defaultFontDescriptor = createFontDescriptorFrom "Arial" 12 0 importJava "org.simantics.browsing.ui.content.LabelDecorator" where @@ -104,6 +111,9 @@ importJava "org.simantics.browsing.ui.content.LabelDecorator" where importJava "org.simantics.browsing.ui.CheckedState" where data CheckedState + CHECKED :: CheckedState + GRAYED :: CheckedState + NOT_CHECKED :: CheckedState importJava "org.simantics.browsing.ui.content.Labeler$Modifier" where data Modifier @@ -131,3 +141,6 @@ instanceOfTest :: Variable -> (Resource -> Boolean) instanceOfTest self = do typeResource = singleObject (represents $ parent self) MOD.InstanceOfTest.HasType (\r -> isInstanceOf r typeResource) + +type BrowseNodeRule a = VariableOrResource -> a + \ No newline at end of file