From b155b29bd9b4a2f2b96ddb5e857c778d3611939f Mon Sep 17 00:00:00 2001 From: Christian Menard Date: Thu, 21 Sep 2023 16:27:36 +0200 Subject: [PATCH] show a deprecation warning when @label is used --- core/src/main/java/org/lflang/validation/LFValidator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/org/lflang/validation/LFValidator.java b/core/src/main/java/org/lflang/validation/LFValidator.java index 7dcf00d107..fe15002096 100644 --- a/core/src/main/java/org/lflang/validation/LFValidator.java +++ b/core/src/main/java/org/lflang/validation/LFValidator.java @@ -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)