1 import "Simantics/Entity" hiding (nameOf)
3 import "StandardLibrary" hiding (group)
5 importJava "java.util.Scanner" where
9 scanner :: File -> <Proc> Scanner
12 hasNext :: Scanner -> Boolean
15 nextLine :: Scanner -> String
18 scanNext :: Scanner -> String
21 scanNextLine :: Scanner -> String
25 importJava "org.simantics.utils.ui.BundleUtils" where
27 bundleFile :: String -> String -> File
29 importJava "org.simantics.modeling.SCL" where
31 killPlatformWrite :: () -> <WriteGraph> ()
32 killPlatformRead :: () -> <ReadGraph> ()
33 killPlatform :: () -> ()
34 shutdownPlatform :: () -> ()
35 reconnectPlatform :: () -> ()
36 sleep :: Integer -> <Proc> ()
37 synchronizeOntologies :: () -> <Proc> ()
39 syncGraph :: () -> <Proc> ()
41 deleteMBNode :: [Resource] -> Boolean
43 hasSomethingToPaste :: Resource -> <ReadGraph> Boolean
44 canDelete :: Resource -> <ReadGraph> Boolean
45 canRename :: Resource -> <ReadGraph> Boolean
47 currentDate :: String -> String
49 workspaceDirectory :: () -> File
51 queryPreference :: String -> String -> <ReadGraph> String
53 importJava "java.lang.Math" where
55 javaRandom :: () -> Double
57 loop :: Scanner -> String -> Pattern -> [String] -> <Proc> [String]
58 loop testScan testName testPattern testList = do
59 if (hasNext testScan) == True
61 testName = nextLine testScan
63 testMatcher = matcher testPattern testName
64 if (matches testMatcher) == True
65 then loop testScan testName testPattern (testList + [(scanNext testScan)])
66 else loop testScan testName testPattern testList
69 loop1 :: Scanner -> [String] -> <Proc> [String]
70 loop1 testScan testList = do
71 if (hasNext testScan) == True
73 newList = testList + [trim (scanNextLine testScan)]
74 loop1 testScan newList
77 loop2 :: Scanner -> [String] -> Boolean -> <Proc> [String]
78 loop2 testScan testList found = do
81 nextline = (scanNextLine testScan)
84 nextString1 = replaceString nextline "M7: " ""
85 newList = testList + [replaceString nextString1 "_CM1" ""]
86 found = (contains nextline "omposition ")
87 loop2 testScan newList found
89 found = (contains nextline "omposition ")
90 loop2 testScan testList found
93 loop3 :: Scanner -> [String] -> <Proc> [String]
94 loop3 testScan testList = do
97 nextString = scanNext testScan
98 found = (contains nextString "_NO1")
101 nextString1 = (replaceString nextString "M6: " "")
102 newList = testList + [replaceString nextString1 "_NO1" ""]
103 loop3 testScan newList
105 loop3 testScan testList
108 loop4 :: Scanner -> [String] -> Boolean -> <Proc> [String]
109 loop4 testScan testList found = do
110 if (hasNext testScan) == True
112 nextString = (scanNext testScan)
113 newList = testList + [nextString]
114 loop4 testScan newList found
117 importJava "java.lang.System" where
118 @JavaName "getProperty"
119 getSystemProperty :: String -> Maybe String
120 @JavaName setProperty
121 setSystemProperty :: String -> String -> <Proc> String
123 importJava "org.simantics.modeling.LifeCycleContext" where
124 data LifeCycleContext
126 importJava "org.simantics.modeling.ModelingUtils" where
127 trackDependencies :: <Proc> ()
128 untrackDependencies :: <Proc> ()
129 trackOntologicalRequirements :: <Proc> ()
130 untrackOntologicalRequirements :: <Proc> ()
132 importJava "org.simantics.modeling.scl.SCLDependencyChangeListener" where
134 createDependencyChangeListener :: (<Proc> Boolean) -> (MetadataI -> DependencyChanges -> <ReadGraph,Proc> ()) -> ChangeListener