-import "Simantics/DB"\r
-import "Map" as Map\r
-import "Simantics/Testing/BuiltinKeys"\r
-\r
-importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContext" where\r
- """\r
- BrowseContext holds all contributions related to given set of browse contexts.\r
- """\r
- data BrowseContext\r
- \r
- @JavaName getChildren\r
- """\r
- Returns the possible children of the given NodeContext parameter.\r
- """\r
- browseContextChildren :: BrowseContext -> NodeContext -> <ReadGraph> Collection NodeContext\r
- \r
- @JavaName getParents\r
- """\r
- Returns the possible parents of the given NodeContext parameter.\r
- """\r
- browseContextParents:: BrowseContext -> NodeContext -> <ReadGraph> Collection NodeContext\r
- \r
- @JavaName getLabel\r
- """\r
- Finds labels for the given NodeContext parameter.\r
- """\r
- browseContextLabel :: BrowseContext -> NodeContext -> <ReadGraph> Map.T String String\r
- \r
- @JavaName getImage\r
- """\r
- Finds @link ImageDescriptors for the given NodeContext parameter.\r
- """\r
- browseContextImage :: BrowseContext -> NodeContext -> <ReadGraph> Map.T String ImageDescriptor\r
- \r
- @JavaName getCheckedState\r
- """\r
- Finds if the given NodeContext is checked or not.\r
- """\r
- browseContextCheckedState :: BrowseContext -> NodeContext -> <ReadGraph> CheckedState\r
- \r
- @JavaName getLabelDecorator\r
- """\r
- Finds LabelDecorator for the given NodeContext parameter.\r
- """\r
- browseContextLabelDecorator :: BrowseContext -> NodeContext -> <ReadGraph> LabelDecorator\r
- \r
- @JavaName getImageDecorator\r
- """\r
- Finds ImageDecorator for the given NodeContext parameter.\r
- """\r
- browseContextImageDecorator :: BrowseContext -> NodeContext -> <ReadGraph> ImageDecorator\r
- \r
- @JavaName getModifier\r
- """\r
- Finds Modifier for the given NodeContext parameter.\r
- """\r
- browseContextModifier :: BrowseContext -> NodeContext -> String -> <ReadGraph> Maybe Modifier\r
- \r
- @private\r
- create :: [Resource] -> <ReadGraph> BrowseContext\r
-\r
-importJava "org.simantics.browsing.ui.NodeContext" where\r
- """\r
- A context used to represent a single visible UI item. \r
- """\r
- data NodeContext\r
- \r
- """\r
- Finds value with the specified key or <code>null</code> if there was no value for the key\r
- """\r
- getConstant :: NodeContext -> ConstantKey -> <Proc> a\r
-\r
-importJava "org.eclipse.jface.resource.ImageDescriptor" where\r
- data ImageDescriptor\r
-\r
-importJava "org.simantics.browsing.ui.content.ImageDecorator" where\r
- data ImageDecorator\r
-\r
-importJava "org.eclipse.jface.resource.JFaceResources" where\r
- getDefaultFontDescriptor :: FontDescriptor\r
-\r
-importJava "org.eclipse.jface.resource.DeviceResourceDescriptor" where\r
- data FontDescriptor\r
- data ColorDescriptor\r
-\r
-importJava "org.simantics.browsing.ui.content.LabelDecorator" where\r
- """\r
- An interface for decorating aesthetic properties of an UI item, including the label text, font, background color and foreground color.\r
- """\r
- data LabelDecorator\r
- \r
- """\r
- 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.\r
- Returns the decorated Label \r
- """\r
- decorateLabel :: LabelDecorator -> String -> String -> Integer -> <Proc> String\r
- decorateForeground :: LabelDecorator -> a -> String -> Integer -> <Proc> a\r
- decorateBackground :: LabelDecorator -> a -> String -> Integer -> <Proc> a\r
- decorateFont :: LabelDecorator -> a -> String -> Integer -> <Proc> a\r
-\r
-importJava "org.simantics.browsing.ui.CheckedState" where\r
- data CheckedState\r
-\r
-importJava "org.simantics.browsing.ui.content.Labeler$Modifier" where\r
- data Modifier\r
- \r
- getValue :: Modifier -> <Proc> String\r
- isValid :: Modifier -> String -> <Proc> String\r
-\r
-importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContexts" where\r
- toBrowseContextG :: Vector String -> <ReadGraph> BrowseContext\r
- getNodeContextForResource :: Resource -> <Proc> NodeContext\r
-\r
-"""\r
-Creates a new BrowseContext for the given Collection of Resources.\r
-"""\r
-createBrowseContext :: [Resource] -> <ReadGraph> BrowseContext\r
-createBrowseContext resource = do\r
- create resource\r
-\r
+import "Simantics/DB"
+import "Map" as Map
+import "Simantics/Testing/BuiltinKeys"
+
+importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContext" where
+ """
+ BrowseContext holds all contributions related to given set of browse contexts.
+ """
+ data BrowseContext
+
+ @JavaName getChildren
+ """
+ Returns the possible children of the given NodeContext parameter.
+ """
+ browseContextChildren :: BrowseContext -> NodeContext -> <ReadGraph> Collection NodeContext
+
+ @JavaName getParents
+ """
+ Returns the possible parents of the given NodeContext parameter.
+ """
+ browseContextParents:: BrowseContext -> NodeContext -> <ReadGraph> Collection NodeContext
+
+ @JavaName getLabel
+ """
+ Finds labels for the given NodeContext parameter.
+ """
+ browseContextLabel :: BrowseContext -> NodeContext -> <ReadGraph> Map.T String String
+
+ @JavaName getImage
+ """
+ Finds @link ImageDescriptors for the given NodeContext parameter.
+ """
+ browseContextImage :: BrowseContext -> NodeContext -> <ReadGraph> Map.T String ImageDescriptor
+
+ @JavaName getCheckedState
+ """
+ Finds if the given NodeContext is checked or not.
+ """
+ browseContextCheckedState :: BrowseContext -> NodeContext -> <ReadGraph> CheckedState
+
+ @JavaName getLabelDecorator
+ """
+ Finds LabelDecorator for the given NodeContext parameter.
+ """
+ browseContextLabelDecorator :: BrowseContext -> NodeContext -> <ReadGraph> LabelDecorator
+
+ @JavaName getImageDecorator
+ """
+ Finds ImageDecorator for the given NodeContext parameter.
+ """
+ browseContextImageDecorator :: BrowseContext -> NodeContext -> <ReadGraph> ImageDecorator
+
+ @JavaName getModifier
+ """
+ Finds Modifier for the given NodeContext parameter.
+ """
+ browseContextModifier :: BrowseContext -> NodeContext -> String -> <ReadGraph> Maybe Modifier
+
+ @private
+ create :: [Resource] -> <ReadGraph> BrowseContext
+
+importJava "org.simantics.browsing.ui.NodeContext" where
+ """
+ A context used to represent a single visible UI item.
+ """
+ data NodeContext
+
+ """
+ Finds value with the specified key or <code>null</code> if there was no value for the key
+ """
+ getConstant :: NodeContext -> ConstantKey -> <Proc> a
+
+importJava "org.eclipse.jface.resource.ImageDescriptor" where
+ data ImageDescriptor
+
+importJava "org.simantics.browsing.ui.content.ImageDecorator" where
+ data ImageDecorator
+
+importJava "org.eclipse.jface.resource.JFaceResources" where
+ getDefaultFontDescriptor :: FontDescriptor
+
+importJava "org.eclipse.jface.resource.DeviceResourceDescriptor" where
+ data FontDescriptor
+ data ColorDescriptor
+
+importJava "org.simantics.browsing.ui.content.LabelDecorator" where
+ """
+ An interface for decorating aesthetic properties of an UI item, including the label text, font, background color and foreground color.
+ """
+ data LabelDecorator
+
+ """
+ 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 -> <Proc> String
+ decorateForeground :: LabelDecorator -> a -> String -> Integer -> <Proc> a
+ decorateBackground :: LabelDecorator -> a -> String -> Integer -> <Proc> a
+ decorateFont :: LabelDecorator -> a -> String -> Integer -> <Proc> a
+
+importJava "org.simantics.browsing.ui.CheckedState" where
+ data CheckedState
+
+importJava "org.simantics.browsing.ui.content.Labeler$Modifier" where
+ data Modifier
+
+ getValue :: Modifier -> <Proc> String
+ isValid :: Modifier -> String -> <Proc> String
+
+importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContexts" where
+ toBrowseContextG :: Vector String -> <ReadGraph> BrowseContext
+ getNodeContextForResource :: Resource -> <Proc> NodeContext
+
+"""
+Creates a new BrowseContext for the given Collection of Resources.
+"""
+createBrowseContext :: [Resource] -> <ReadGraph> BrowseContext
+createBrowseContext resource = do
+ create resource
+