Module Simantics/Issue

This module is undocumented. This is a list of its definitions.

issueSources :: Resource -> <ReadGraph> [(String, Resource)]

Lists issue sources that are included in the provided index root (e.g. model).

issuesOf :: Resource -> <ReadGraph> [Resource]

Returns the issues of the given model, recursively. The issues that are direct children of the model are returned, and the search continues into those children that are not issues themselves, so that issues collected under libraries and folders are found as well.

newUserIssueForModel :: Resource -> String -> Resource -> [Resource] -> <WriteGraph> Resource

newUserIssueForModel model label severity contexts creates a user issue of the given severity in the given model, labelled with label and concerning the resources in contexts, and returns it. The creation time of the issue is recorded as the current time.

runActiveValidations :: ProgressMonitor -> Resource -> <Proc> ()

runActiveValidations monitor model runs the batch issue sources that are active in the given model and writes the issues they produce into the database. Unlike runAllBatchValidations this skips the issue sources that have not been activated. Progress is reported to monitor, which also allows the run to be cancelled.

runAllBatchValidations :: ProgressMonitor -> Resource -> Resource -> <Proc> ()

runAllBatchValidations monitor model resource runs every batch issue source of the given model against the given resource and writes the issues they produce into the database. Pass the model itself as resource to validate the whole model. The number of issues written is limited by the issue preferences; when more are found, the excess is only reported to the log. Progress is reported to monitor, which also allows the run to be cancelled.

setIssueSourceActivity :: Boolean -> Resource -> String -> <WriteGraph> ()
setIssueSourceActivity True root "issue source name"

activates the specified issue source or fails if the issue source does not exist in the provided root. Use False as the first parameter to deactivate the specified issue source.

userIssue :: () -> <WriteGraph> Resource

Creates a user issue labelled "New User Issue" with severity Note and no context resources in the model that is currently active in the project, and returns it. The result is a Java null if the number of active models in the project is not exactly one.

userIssueAdvanced :: Resource -> String -> Resource -> [Resource] -> <WriteGraph> Resource

Creates a user issue in the given model. Identical to newUserIssueForModel, which it calls.

validateDomain :: Resource -> <ReadGraph> [IssueI]

Validates the constraints of the given resource and of everything that belongs to it, that is, everything that would be carried along if the resource were exported, and returns the issues that were found. Nothing is written into the database.