include "Simantics/Entity" hiding (nameOf) import "Simantics/Model" import "http://www.simantics.org/Issue-1.2" as ISSUE type Issue = Resource type Severity = Resource issuesOf :: Model -> [Issue] issuesOf model = recurse ISSUE.Issue model where recurse t r = do cs = children r issues = filter isIssue cs issueGrp = filter (not . isIssue) cs issues + concatMap (recurse t) issueGrp isIssue r = isInstanceOf r ISSUE.Issue importJava "org.simantics.issues.common.IssueUtils" where @JavaName newUserIssueForModel newUserIssueForModel :: Model -> String -> Severity -> [Resource] -> Issue userIssueAdvanced :: Model -> String -> Severity -> [Resource] -> Issue userIssueAdvanced model label severity contexts = do newUserIssueForModel model label severity contexts importJava "org.simantics.issues.common.IssueUtils" where @JavaName newUserIssueForModel userIssue :: () -> Issue