1 import "Simantics/Entity" hiding (nameOf)
3 import "StandardLibrary" hiding (group)
6 importJava "java.io.File" where
10 file :: String -> File
14 importJava "java.util.Scanner" where
18 scanner :: File -> <Proc> Scanner
21 hasNext :: Scanner -> Boolean
24 nextLine :: Scanner -> String
27 scanNext :: Scanner -> String
30 scanNextLine :: Scanner -> String
32 importJava "java.util.regex.Pattern" where
36 compile :: String -> <Proc> Pattern
39 matcher :: Pattern -> String -> Matcher
41 importJava "java.util.regex.Matcher" where
45 matches :: Matcher -> Boolean
47 group :: Matcher -> String
49 importJava "org.simantics.utils.ui.BundleUtils" where
51 bundleFile :: String -> String -> File
53 importJava "org.simantics.modeling.SCL" where
55 killPlatformWrite :: () -> <WriteGraph> ()
56 killPlatformRead :: () -> <ReadGraph> ()
57 killPlatform :: () -> ()
58 shutdownPlatform :: () -> ()
59 reconnectPlatform :: () -> ()
60 sleep :: Integer -> <Proc> ()
61 synchronizeOntologies :: () -> <Proc> ()
63 syncGraph :: () -> <Proc> ()
65 deleteMBNode :: [Resource] -> Boolean
67 hasSomethingToPaste :: Resource -> <ReadGraph> Boolean
68 canDelete :: Resource -> <ReadGraph> Boolean
69 canRename :: Resource -> <ReadGraph> Boolean
71 currentDate :: String -> String
73 workspaceDirectory :: () -> File
75 queryPreference :: String -> String -> <ReadGraph> String
77 importJava "java.lang.Math" where
79 javaRandom :: () -> Double
81 loop :: Scanner -> String -> Pattern -> [String] -> <Proc> [String]
82 loop testScan testName testPattern testList = do
83 if (hasNext testScan) == True
85 testName = nextLine testScan
87 testMatcher = matcher testPattern testName
88 if (matches testMatcher) == True
89 then loop testScan testName testPattern (testList + [(scanNext testScan)])
90 else loop testScan testName testPattern testList
93 loop1 :: Scanner -> [String] -> <Proc> [String]
94 loop1 testScan testList = do
95 if (hasNext testScan) == True
97 newList = testList + [trim (scanNextLine testScan)]
98 loop1 testScan newList
101 loop2 :: Scanner -> [String] -> Boolean -> <Proc> [String]
102 loop2 testScan testList found = do
105 nextline = (scanNextLine testScan)
108 nextString1 = replaceString nextline "M7: " ""
109 newList = testList + [replaceString nextString1 "_CM1" ""]
110 found = (contains nextline "omposition ")
111 loop2 testScan newList found
113 found = (contains nextline "omposition ")
114 loop2 testScan testList found
117 loop3 :: Scanner -> [String] -> <Proc> [String]
118 loop3 testScan testList = do
121 nextString = scanNext testScan
122 found = (contains nextString "_NO1")
125 nextString1 = (replaceString nextString "M6: " "")
126 newList = testList + [replaceString nextString1 "_NO1" ""]
127 loop3 testScan newList
129 loop3 testScan testList
132 loop4 :: Scanner -> [String] -> Boolean -> <Proc> [String]
133 loop4 testScan testList found = do
134 if (hasNext testScan) == True
136 nextString = (scanNext testScan)
137 newList = testList + [nextString]
138 loop4 testScan newList found
141 importJava "java.lang.System" where
142 @JavaName "getProperty"
143 getSystemProperty :: String -> Maybe String
144 @JavaName setProperty
145 setSystemProperty :: String -> String -> <Proc> String
147 importJava "org.simantics.modeling.LifeCycleContext" where
148 data LifeCycleContext
150 importJava "org.simantics.modeling.ModelingUtils" where
151 trackDependencies :: <Proc> ()
152 untrackDependencies :: <Proc> ()
153 trackOntologicalRequirements :: <Proc> ()
154 untrackOntologicalRequirements :: <Proc> ()
156 importJava "org.simantics.modeling.scl.SCLDependencyChangeListener" where
158 createDependencyChangeListener :: (<Proc> Boolean) -> (MetadataI -> DependencyChanges -> <ReadGraph,Proc> ()) -> ChangeListener