Skip to content

Commit

Permalink
show a deprecation warning when @Label is used
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnrd committed Sep 21, 2023
1 parent d358e12 commit b155b29
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/main/java/org/lflang/validation/LFValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -1346,8 +1346,15 @@ public void checkAttributes(Attribute attr) {
error("Unknown attribute.", Literals.ATTRIBUTE__ATTR_NAME);
return;
}

// Check the validity of the attribute.
spec.check(this, attr);

if (name.equalsIgnoreCase("label")) {
warning(
"The @label attribute is deprecated. Please use named reactions instead.",
Literals.ATTR_PARM__NAME);
}
}

@Check(CheckType.FAST)
Expand Down

0 comments on commit b155b29

Please sign in to comment.