Skip to content

Commit 4c7dbfd

Browse files
authored
Merge pull request Haehnchen#2257 from Haehnchen/feature/type-attribute
whitelist "attribute" type to be valid file references linemarker for support related controllers
2 parents 457a4d8 + 4e74d5c commit 4c7dbfd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/XmlLineMarkerProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ private void attachRouteImport(@NotNull PsiElement psiElement, @NotNull Collecti
7979
return;
8080
}
8181

82-
if (!"annotation".equals(((XmlTag) xmlTag).getAttributeValue("type"))) {
82+
String type = ((XmlTag) xmlTag).getAttributeValue("type");
83+
if (!"annotation".equals(type) && !"attribute".equals(type)) {
8384
return;
8485
}
8586

src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/YamlLineMarkerProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ private void attachRoutingForResources(@NotNull Collection<? super LineMarkerInf
6969
return;
7070
}
7171

72-
if (!"annotation".equals(YamlHelper.getYamlKeyValueAsString((YAMLKeyValue) yamlKeyValue, "type"))) {
72+
String type = YamlHelper.getYamlKeyValueAsString((YAMLKeyValue) yamlKeyValue, "type");
73+
if (!"annotation".equals(type) && !"attribute".equals(type)) {
7374
return;
7475
}
7576

0 commit comments

Comments
 (0)