X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.modeling.ui%2Fscl%2FSimantics%2FTesting%2FBrowseContext.scl;h=590ddd21ce8f658d40b133dd6cb0fddd3be8607d;hb=9d780ffc68dbcb27bd90b5f80f4288de62d149fd;hp=cd4e9755dfa1e9a81d343c19189e235a8bf9e2d7;hpb=04a7cb7f4ec34ddd4747723fd51ea22edd5ede0b;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 cd4e9755d..590ddd21c 100644 --- a/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl +++ b/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl @@ -1,6 +1,6 @@ import "Simantics/Variables" import "Map" as Map -import "Simantics/Testing/BuiltinKeys" +include "Simantics/Testing/BuiltinKeys" as BuiltinKeys importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContext" where """ @@ -68,7 +68,7 @@ importJava "org.simantics.browsing.ui.NodeContext" where """ Finds value with the specified key or null if there was no value for the key """ - getConstant :: NodeContext -> ConstantKey -> a + getConstant :: NodeContext -> BuiltinKeys.ConstantKey -> a importJava "org.eclipse.jface.resource.ImageDescriptor" where data ImageDescriptor @@ -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 @@ -97,7 +104,7 @@ importJava "org.simantics.browsing.ui.content.LabelDecorator" where Decorates the given label with the name of the UI column which the label is for and the index of this label within its parenting INodeContext. Returns the decorated Label """ - decorateLabel :: LabelDecorator -> String -> String -> Integer -> String + decorateLabel :: LabelDecorator -> String -> String -> Integer -> Maybe String decorateForeground :: LabelDecorator -> a -> String -> Integer -> a decorateBackground :: LabelDecorator -> a -> String -> Integer -> a decorateFont :: LabelDecorator -> Maybe a -> String -> Integer -> Maybe a @@ -115,6 +122,7 @@ importJava "org.simantics.browsing.ui.content.Labeler$Modifier" where importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContexts" where toBrowseContextG :: Vector String -> BrowseContext getNodeContextForResource :: Resource -> NodeContext + getNodeContextWithTypeForResource :: Resource -> NodeContext """ Creates a new BrowseContext for the given Collection of Resources.