Skip to content

Commit

Permalink
Small updates to result icons-- ignore ref type prop result icon if o…
Browse files Browse the repository at this point in the history
…verlapping with node or contract start line, and give unknown icon if results are empty
  • Loading branch information
lorchrob committed May 22, 2024
1 parent bbd1441 commit 84741ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Kind2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class Kind2 implements TreeDataProvider<TreeNode>, CodeLensProvider {
}

for (const property of component.properties) {
if (decorations.has(property.uri)) {
if (decorations.has(property.uri) && (property.line != component.line) && (property.line != component.contractLine)) {
let decorationOptions: DecorationOptions = { range: new Range(new Position(property.line, 0), (new Position(property.line, 100))) };
decorations.get(property.uri)?.get(property.state)?.push(decorationOptions);
}
Expand Down Expand Up @@ -346,7 +346,7 @@ export class Kind2 implements TreeDataProvider<TreeNode>, CodeLensProvider {
modifiedComponents.push(component);
}
if (results.length == 0) {
mainComponent.state = ["passed"];
mainComponent.state = ["unknown"];
}
}).catch(reason => {
if (reason.message.includes("cancelled")) {
Expand Down
6 changes: 3 additions & 3 deletions src/treeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ export class Component {
if (failedProperties.size !== 0) {
return ["failed"];
}
if (unknownProperties.size !== 0) {
return ["unknown"];
if (passedProperties.size !== 0) {
return ["passed"]
}
return ["passed"];
return ["unknown"];
}
containsUnrealizable() {
return this.state.some(str => str.includes("unrealizable"))
Expand Down

0 comments on commit 84741ce

Please sign in to comment.