include "Simantics/Entity" hiding (nameOf) include "Simantics/Ontologies" type Model = Resource type Configuration = Resource """ model name Returns an existing model in the current project with the given `name` """ model :: String -> Model model name = match possibleResourceChild (currentProject ()) name with Just m -> m Nothing -> fail $ "Didn't find a model " + name + "." """ configurationOf model Returns the configuration of the given `model` and returns the `configuration` resource """ configurationOf :: Model -> Configuration configurationOf m = singleObject m SIMU.HasConfiguration """ Returns the list of all models in the current project. """ allModels :: () -> [Model] allModels _ = objectsWithType (currentProject ()) L0.ConsistsOf SIMU.Model importJava "org.simantics.modeling.ModelingUtils" where """Removes the index associated with the model.""" removeIndex :: Model -> () resetIssueSources :: Model -> () """Copies annotation types from one model to another.""" copyAnnotationTypes :: Model -> Model -> () deleteIndex :: Resource -> () releaseMemory :: () -> () searchByType :: Resource -> Resource -> [Resource] searchByTypeShallow :: Resource -> Resource -> [Resource] searchByTypeAndName :: Resource -> Resource -> String -> [Resource] searchByTypeAndNameShallow :: Resource -> Resource -> String -> [Resource] searchByQuery :: Resource -> String -> [Resource] searchByQueryShallow :: Resource -> String -> [Resource] searchByTypeAndFilter :: Resource -> Resource -> (Resource -> Boolean) -> [Resource] listIndexEntries :: Resource -> String -> String activateModel :: Resource -> Boolean @JavaName createModel createGenericModel :: Resource -> String -> Resource importJava "org.simantics.modeling.ModelingUtils" where @JavaName getPossibleModel getPossibleModel :: Resource -> Model possibleIndexRoot :: Resource -> Maybe Resource activateModelAction :: Resource -> () activateModelAction model = do syncWrite (\() -> activateModel model) ()