X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.help.core%2Fscl%2FSimantics%2FHelp.scl;h=c8d0124a4a22a10f2bf84be531577c02c56ced22;hb=79b952a1ea3ae3f299c6d7aa612a98b7ae5db51a;hp=d104a50507158dc2e5420851ac5e5f5eefce4526;hpb=6a4a43b278d6819c660182eb4954524d1757e077;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.help.core/scl/Simantics/Help.scl b/bundles/org.simantics.help.core/scl/Simantics/Help.scl index d104a5050..c8d0124a4 100644 --- a/bundles/org.simantics.help.core/scl/Simantics/Help.scl +++ b/bundles/org.simantics.help.core/scl/Simantics/Help.scl @@ -1,27 +1,27 @@ -import "URL" -import "Simantics/DB" -import "http://www.simantics.org/Help-1.0" as HELP - -importJava "org.simantics.help.core.HelpUtils" where - createHelpLibrary :: Resource -> Resource - createHelpTutorial :: Resource -> String -> Resource - clearHelpTocCache :: () -> () - saveHelpFileContents :: Resource -> String -> () - readHelpFileContents :: Resource -> String - markdownToHtml :: Resource -> String - getHelpBrowserUrl :: () -> URL - -createHelpLibraryAction :: Resource -> () -createHelpLibraryAction parent = do - syncWrite (\() -> createHelpLibrary parent) - () - -createHelpTutorialAction :: Resource -> () -createHelpTutorialAction parent = do - tutorialFiles = syncRead (\x -> objectsWithType parent L0.ConsistsOf HELP.TutorialFile) - fileName = if length tutorialFiles == 0 - then "Tutorial" - else do - "Tutorial " + (show (length tutorialFiles)) - syncWrite (\() -> createHelpTutorial parent fileName) +import "URL" +import "Simantics/DB" +import "http://www.simantics.org/Help-1.0" as HELP + +importJava "org.simantics.help.core.HelpUtils" where + createHelpLibrary :: Resource -> Resource + createHelpTutorial :: Resource -> String -> Resource + clearHelpTocCache :: () -> () + saveHelpFileContents :: Resource -> String -> () + readHelpFileContents :: Resource -> String + markdownToHtml :: Resource -> String + getHelpBrowserUrl :: () -> URL + +createHelpLibraryAction :: Resource -> () +createHelpLibraryAction parent = do + syncWrite (\() -> createHelpLibrary parent) + () + +createHelpTutorialAction :: Resource -> () +createHelpTutorialAction parent = do + tutorialFiles = syncRead (\x -> objectsWithType parent L0.ConsistsOf HELP.TutorialFile) + fileName = if length tutorialFiles == 0 + then "Tutorial" + else do + "Tutorial " + (show (length tutorialFiles)) + syncWrite (\() -> createHelpTutorial parent fileName) () \ No newline at end of file