From 4e74d5ca957ab5b19a0b661c72f4000652bfe423 Mon Sep 17 00:00:00 2001 From: Daniel Espendiller Date: Sat, 2 Dec 2023 15:09:33 +0100 Subject: [PATCH] whitelist "attribute" type to be valid file references linemarker for support related controllers --- .../idea/symfony2plugin/routing/XmlLineMarkerProvider.java | 3 ++- .../idea/symfony2plugin/routing/YamlLineMarkerProvider.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/XmlLineMarkerProvider.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/XmlLineMarkerProvider.java index e55bee54a..6d264abf3 100644 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/XmlLineMarkerProvider.java +++ b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/XmlLineMarkerProvider.java @@ -79,7 +79,8 @@ private void attachRouteImport(@NotNull PsiElement psiElement, @NotNull Collecti return; } - if (!"annotation".equals(((XmlTag) xmlTag).getAttributeValue("type"))) { + String type = ((XmlTag) xmlTag).getAttributeValue("type"); + if (!"annotation".equals(type) && !"attribute".equals(type)) { return; } diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/YamlLineMarkerProvider.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/YamlLineMarkerProvider.java index 00460ee2d..386e9ca7e 100644 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/YamlLineMarkerProvider.java +++ b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/YamlLineMarkerProvider.java @@ -69,7 +69,8 @@ private void attachRoutingForResources(@NotNull Collection