diff --git a/extension/src-language-server/stpa/modelChecking/model-checking.ts b/extension/src-language-server/stpa/modelChecking/model-checking.ts index 741841d..69a554e 100644 --- a/extension/src-language-server/stpa/modelChecking/model-checking.ts +++ b/extension/src-language-server/stpa/modelChecking/model-checking.ts @@ -95,7 +95,7 @@ export async function generateLTLFormulae( async function translateDCAsToLTLFormulas(model: Model, map: Record): Promise { if (model.allDCAs.length > 0 && model.allDCAs) { for (const rule of model.allDCAs) { - translateRuleToLTLFormulas(rule, map); + await translateRuleToLTLFormulas(rule, map); } } } @@ -108,7 +108,7 @@ async function translateDCAsToLTLFormulas(model: Model, map: Record): Promise { if (model.rules.length > 0 && model.rules) { for (const rule of model.rules) { - translateRuleToLTLFormulas(rule, map); + await translateRuleToLTLFormulas(rule, map); } } } diff --git a/extension/src-language-server/stpa/utils.ts b/extension/src-language-server/stpa/utils.ts index 43f61ad..0b34104 100644 --- a/extension/src-language-server/stpa/utils.ts +++ b/extension/src-language-server/stpa/utils.ts @@ -193,7 +193,7 @@ export function getRangeOfNodeSTPA(model: Model, label: string): Range | undefin elements.push(...nodes); } // in the diagram generator dots are replaced by underscores - const correctedLabel = label.replace(/_/g, "."); + const correctedLabel = label?.replace(/_/g, "."); elements.forEach((component) => { if (component.name === correctedLabel) { range = component.$cstNode?.range; diff --git a/extension/src/extension.ts b/extension/src/extension.ts index 27dd120..3d18dfb 100644 --- a/extension/src/extension.ts +++ b/extension/src/extension.ts @@ -439,7 +439,8 @@ function registerTextEditorSync(manager: StpaLspVscodeExtension, context: vscode '