import "Simantics/Entity" hiding (nameOf) include "File" import "StandardLibrary" hiding (group) importJava "java.util.Scanner" where data Scanner @JavaName "" scanner :: File -> Scanner @JavaName "hasNext" hasNext :: Scanner -> Boolean @JavaName "nextLine" nextLine :: Scanner -> String @JavaName "next" scanNext :: Scanner -> String @JavaName "nextLine" scanNextLine :: Scanner -> String include "String" importJava "org.simantics.utils.ui.BundleUtils" where @JavaName "findFile" bundleFile :: String -> String -> File importJava "org.simantics.modeling.SCL" where killPlatformWrite :: () -> () killPlatformRead :: () -> () killPlatform :: () -> () shutdownPlatform :: () -> () reconnectPlatform :: () -> () sleep :: Integer -> () synchronizeOntologies :: () -> () syncGraph :: () -> () deleteMBNode :: [Resource] -> Boolean hasSomethingToPaste :: Resource -> Boolean canDelete :: Resource -> Boolean canRename :: Resource -> Boolean currentDate :: String -> String workspaceDirectory :: () -> File queryPreference :: String -> String -> String importJava "java.lang.Math" where @JavaName random javaRandom :: () -> Double loop :: Scanner -> String -> Pattern -> [String] -> [String] loop testScan testName testPattern testList = do if (hasNext testScan) == True then do testName = nextLine testScan show "asd" testMatcher = matcher testPattern testName if (matches testMatcher) == True then loop testScan testName testPattern (testList + [(scanNext testScan)]) else loop testScan testName testPattern testList else testList loop1 :: Scanner -> [String] -> [String] loop1 testScan testList = do if (hasNext testScan) == True then do newList = testList + [trim (scanNextLine testScan)] loop1 testScan newList else testList loop2 :: Scanner -> [String] -> Boolean -> [String] loop2 testScan testList found = do if hasNext testScan then do nextline = (scanNextLine testScan) if found then do nextString1 = replaceString nextline "M7: " "" newList = testList + [replaceString nextString1 "_CM1" ""] found = (contains nextline "omposition ") loop2 testScan newList found else do found = (contains nextline "omposition ") loop2 testScan testList found else testList loop3 :: Scanner -> [String] -> [String] loop3 testScan testList = do if hasNext testScan then do nextString = scanNext testScan found = (contains nextString "_NO1") if found then do nextString1 = (replaceString nextString "M6: " "") newList = testList + [replaceString nextString1 "_NO1" ""] loop3 testScan newList else do loop3 testScan testList else testList loop4 :: Scanner -> [String] -> Boolean -> [String] loop4 testScan testList found = do if (hasNext testScan) == True then do nextString = (scanNext testScan) newList = testList + [nextString] loop4 testScan newList found else testList importJava "java.lang.System" where @JavaName "getProperty" getSystemProperty :: String -> Maybe String @JavaName setProperty setSystemProperty :: String -> String -> String currentTimeMillis :: Long importJava "org.simantics.modeling.LifeCycleContext" where data LifeCycleContext importJava "org.simantics.modeling.ModelingUtils" where trackDependencies :: () untrackDependencies :: () trackOntologicalRequirements :: () untrackOntologicalRequirements :: () importJava "org.simantics.modeling.scl.SCLDependencyChangeListener" where @JavaName "create" createDependencyChangeListener :: ( Boolean) -> (MetadataI -> DependencyChanges -> ()) -> ChangeListener