Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 109609a

Browse files
committed
Fix: Remove old non custom annotations
1 parent 8cb5534 commit 109609a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • bundles/org.dataflowanalysis.standalone/src/org/dataflowanalysis/standalone/analysis

bundles/org.dataflowanalysis.standalone/src/org/dataflowanalysis/standalone/analysis/Converter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ public static WebEditorDfd analyzeAnnotate(WebEditorDfd webEditorDfd) {
9393
for (var child : newJson.model().children()) {
9494
if (child.type().startsWith("node") && child.annotations() != null) {
9595
var oldNode = webEditorDfd.model().children().stream().filter(node -> node.id().equals(child.id())).findAny().orElseThrow();
96+
//Necessary if ugly if we want to preserver custom annotations
97+
var annotationsToRemove = oldNode.annotations().stream().filter(a -> a.message().startsWith("Propagated") || a.message().startsWith("Incoming") || a.message().startsWith("Constraint")).toList();
98+
oldNode.annotations().removeAll(annotationsToRemove);
9699
oldNode.annotations().addAll(child.annotations());
97100
}
98101
}

0 commit comments

Comments
 (0)