Skip to content

Commit 1fea9ef

Browse files
committed
[support for 2020.2 version] change signatures for LineMarkerProvider implementations
1 parent d3ccb03 commit 1fea9ef

File tree

11 files changed

+52
-52
lines changed

11 files changed

+52
-52
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ before_install:
2323
- "export ORG_GRADLE_PROJECT_annotationPluginVersion=${ANNOTATION_PLUGIN_VERSION}"
2424

2525
env:
26-
- PHPSTORM_ENV="skip incomplete" IDEA_VERSION="IU-2020.1" PHP_PLUGIN_VERSION="201.6668.153" TWIG_PLUGIN_VERSION="201.6668.153" TOOLBOX_PLUGIN_VERSION="0.4.6" ANNOTATION_PLUGIN_VERSION="5.3" DQL_PLUGIN_VERSION="201.6668.60"
26+
- PHPSTORM_ENV="skip incomplete" IDEA_VERSION="IU-202.5792.28-EAP-SNAPSHOT" PHP_PLUGIN_VERSION="202.5792.59" TWIG_PLUGIN_VERSION="202.5792.17" TOOLBOX_PLUGIN_VERSION="0.4.6" ANNOTATION_PLUGIN_VERSION="5.3" DQL_PLUGIN_VERSION="202.5792.28"
2727

2828
script:
2929
- "./gradlew check verifyPlugin buildPlugin"

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
ideaVersion = IU-2020.1
2-
phpPluginVersion = 201.6668.153
3-
twigPluginVersion = 201.6668.153
4-
dqlPluginVersion = 201.6668.60
1+
ideaVersion = IU-202.5792.28-EAP-SNAPSHOT
2+
phpPluginVersion = 202.5792.59
3+
twigPluginVersion = 202.5792.17
4+
dqlPluginVersion = 202.5792.28
55
toolboxPluginVersion = 0.4.6
66
annotationPluginVersion = 5.3

src/main/java/fr/adrienbrault/idea/symfony2plugin/config/ConfigLineMarkerProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
public class ConfigLineMarkerProvider implements LineMarkerProvider {
2626
@Nullable
2727
@Override
28-
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
28+
public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement psiElement) {
2929
return null;
3030
}
3131

3232
@Override
33-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> result) {
33+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> result) {
3434
if(psiElements.size() == 0 || !Symfony2ProjectComponent.isEnabled(psiElements.get(0))) {
3535
return;
3636
}
@@ -47,7 +47,7 @@ public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNu
4747
}
4848
}
4949

50-
private void visitRootElements(@NotNull Collection<LineMarkerInfo> result, @NotNull PsiElement psiElement, @NotNull LazyConfigTreeSignatures function) {
50+
private void visitRootElements(@NotNull Collection<? super LineMarkerInfo<?>> result, @NotNull PsiElement psiElement, @NotNull LazyConfigTreeSignatures function) {
5151
PsiElement parent = psiElement.getParent();
5252
if(!(parent instanceof YAMLKeyValue)) {
5353
return;

src/main/java/fr/adrienbrault/idea/symfony2plugin/config/ServiceLineMarkerProvider.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ public class ServiceLineMarkerProvider implements LineMarkerProvider {
3939

4040
@Nullable
4141
@Override
42-
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement element) {
42+
public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement element) {
4343
return null;
4444
}
4545

4646
@Override
47-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> results) {
47+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> results) {
4848

4949
// we need project element; so get it from first item
5050
if(psiElements.size() == 0) {
@@ -77,7 +77,7 @@ public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNu
7777

7878
}
7979

80-
private void classNameMarker(PsiElement psiElement, Collection<? super RelatedItemLineMarkerInfo> result) {
80+
private void classNameMarker(PsiElement psiElement, Collection<? super RelatedItemLineMarkerInfo<?>> result) {
8181

8282
PsiElement phpClassContext = psiElement.getContext();
8383
if(!(phpClassContext instanceof PhpClass)) {
@@ -97,7 +97,7 @@ private void classNameMarker(PsiElement psiElement, Collection<? super RelatedIt
9797

9898
}
9999

100-
private void entityClassMarker(PsiElement psiElement, Collection<? super RelatedItemLineMarkerInfo> result) {
100+
private void entityClassMarker(PsiElement psiElement, Collection<? super RelatedItemLineMarkerInfo<?>> result) {
101101

102102
PsiElement phpClassContext = psiElement.getContext();
103103
if(!(phpClassContext instanceof PhpClass)) {
@@ -133,7 +133,7 @@ private void entityClassMarker(PsiElement psiElement, Collection<? super Related
133133
result.add(builder.createLineMarkerInfo(psiElement));
134134
}
135135

136-
private void repositoryClassMarker(PsiElement psiElement, Collection<? super RelatedItemLineMarkerInfo> result) {
136+
private void repositoryClassMarker(PsiElement psiElement, Collection<? super RelatedItemLineMarkerInfo<?>> result) {
137137

138138
PsiElement phpClassContext = psiElement.getContext();
139139
if(!(phpClassContext instanceof PhpClass)) {
@@ -161,7 +161,7 @@ private void repositoryClassMarker(PsiElement psiElement, Collection<? super Rel
161161
result.add(builder.createLineMarkerInfo(psiElement));
162162
}
163163

164-
private void formNameMarker(PsiElement psiElement, Collection<? super RelatedItemLineMarkerInfo> result) {
164+
private void formNameMarker(PsiElement psiElement, Collection<? super RelatedItemLineMarkerInfo<?>> result) {
165165

166166
if(!(psiElement instanceof StringLiteralExpression)) {
167167
return;
@@ -193,7 +193,7 @@ private void formNameMarker(PsiElement psiElement, Collection<? super RelatedIte
193193

194194
}
195195

196-
private void routeAnnotationFileResource(@NotNull PsiFile psiFile, Collection<? super RelatedItemLineMarkerInfo> results) {
196+
private void routeAnnotationFileResource(@NotNull PsiFile psiFile, Collection<? super RelatedItemLineMarkerInfo<?>> results) {
197197
RelatedItemLineMarkerInfo<PsiElement> lineMarker = FileResourceUtil.getFileImplementsLineMarkerInFolderScope(psiFile);
198198
if(lineMarker != null) {
199199
results.add(lineMarker);
@@ -203,7 +203,7 @@ private void routeAnnotationFileResource(@NotNull PsiFile psiFile, Collection<?
203203
/**
204204
* Constraints in same namespace and validateBy service name
205205
*/
206-
private void validatorClassMarker(PsiElement psiElement, Collection<LineMarkerInfo> results) {
206+
private void validatorClassMarker(PsiElement psiElement, Collection<? super LineMarkerInfo<?>> results) {
207207
PsiElement phpClassContext = psiElement.getContext();
208208
if(!(phpClassContext instanceof PhpClass) || !PhpElementsUtil.isInstanceOf((PhpClass) phpClassContext, "\\Symfony\\Component\\Validator\\Constraint")) {
209209
return;
@@ -229,7 +229,7 @@ private void validatorClassMarker(PsiElement psiElement, Collection<LineMarkerIn
229229
/**
230230
* "FooValidator" back to "Foo" constraint
231231
*/
232-
private void constraintValidatorClassMarker(PsiElement psiElement, Collection<LineMarkerInfo> results) {
232+
private void constraintValidatorClassMarker(PsiElement psiElement, Collection<? super LineMarkerInfo<?>> results) {
233233
PsiElement phpClass = psiElement.getContext();
234234
if(!(phpClass instanceof PhpClass) || !PhpElementsUtil.isInstanceOf((PhpClass) phpClass, "Symfony\\Component\\Validator\\ConstraintValidatorInterface")) {
235235
return;

src/main/java/fr/adrienbrault/idea/symfony2plugin/dic/ControllerMethodLineMarkerProvider.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ public class ControllerMethodLineMarkerProvider implements LineMarkerProvider {
3131

3232
@Nullable
3333
@Override
34-
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
34+
public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement psiElement) {
3535
return null;
3636
}
3737

3838
@Nullable
39-
public LineMarkerInfo collect(PsiElement psiElement) {
39+
public LineMarkerInfo<?> collect(PsiElement psiElement) {
4040
if(!Symfony2ProjectComponent.isEnabled(psiElement) || psiElement.getNode().getElementType() != PhpTokenTypes.IDENTIFIER) {
4141
return null;
4242
}
@@ -102,10 +102,10 @@ public static List<GotoRelatedItem> getGotoRelatedItems(Method method) {
102102
}
103103

104104
@Override
105-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> results) {
105+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> results) {
106106

107107
for(PsiElement psiElement: psiElements) {
108-
LineMarkerInfo lineMarkerInfo = collect(psiElement);
108+
LineMarkerInfo<?> lineMarkerInfo = collect(psiElement);
109109
if(lineMarkerInfo != null) {
110110
results.add(lineMarkerInfo);
111111
}

src/main/java/fr/adrienbrault/idea/symfony2plugin/dic/linemarker/XmlLineMarkerProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
public class XmlLineMarkerProvider implements LineMarkerProvider {
2424
@Nullable
2525
@Override
26-
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
26+
public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement psiElement) {
2727
return null;
2828
}
2929

3030
@Override
31-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> result) {
31+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> result) {
3232
if(psiElements.size() == 0 || !Symfony2ProjectComponent.isEnabled(psiElements.get(0))) {
3333
return;
3434
}
@@ -57,7 +57,7 @@ public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNu
5757
/**
5858
* <service id="foo"/>
5959
*/
60-
private void visitServiceId(@NotNull PsiElement leafTarget, @NotNull XmlTag xmlTag, @NotNull Collection<LineMarkerInfo> result, @NotNull LazyDecoratedParentServiceValues lazyDecoratedParentServiceValues) {
60+
private void visitServiceId(@NotNull PsiElement leafTarget, @NotNull XmlTag xmlTag, @NotNull Collection<? super LineMarkerInfo<?>> result, @NotNull LazyDecoratedParentServiceValues lazyDecoratedParentServiceValues) {
6161
String id = xmlTag.getAttributeValue("id");
6262
if(StringUtils.isBlank(id)) {
6363
return;

src/main/java/fr/adrienbrault/idea/symfony2plugin/dic/linemarker/YamlLineMarkerProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
public class YamlLineMarkerProvider implements LineMarkerProvider {
2424
@Nullable
2525
@Override
26-
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
26+
public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement psiElement) {
2727
return null;
2828
}
2929

3030
@Override
31-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> result) {
31+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> result) {
3232
if(psiElements.size() == 0 || !Symfony2ProjectComponent.isEnabled(psiElements.get(0))) {
3333
return;
3434
}
@@ -55,7 +55,7 @@ public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNu
5555
}
5656
}
5757

58-
private void visitServiceId(@NotNull PsiElement leafTarget, @NotNull YAMLKeyValue yamlKeyValue, @NotNull Collection<LineMarkerInfo> result, @NotNull LazyDecoratedParentServiceValues lazyDecoratedServices) {
58+
private void visitServiceId(@NotNull PsiElement leafTarget, @NotNull YAMLKeyValue yamlKeyValue, @NotNull Collection<? super LineMarkerInfo<?>> result, @NotNull LazyDecoratedParentServiceValues lazyDecoratedServices) {
5959
String id = yamlKeyValue.getKeyText();
6060
if(StringUtils.isBlank(id)) {
6161
return;

src/main/java/fr/adrienbrault/idea/symfony2plugin/doctrine/metadata/DoctrineMetadataLineMarkerProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public class DoctrineMetadataLineMarkerProvider implements LineMarkerProvider {
2525

2626
@Nullable
2727
@Override
28-
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement element) {
28+
public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement element) {
2929
return null;
3030
}
3131

3232
@Override
33-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> results) {
33+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> results) {
3434
// we need project element; so get it from first item
3535
if(psiElements.size() == 0) {
3636
return;
@@ -53,7 +53,7 @@ public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNu
5353
}
5454
}
5555

56-
private void attachXmlRelationMarker(@NotNull PsiElement target, @NotNull XmlAttributeValue psiElement, @NotNull Collection<LineMarkerInfo> results) {
56+
private void attachXmlRelationMarker(@NotNull PsiElement target, @NotNull XmlAttributeValue psiElement, @NotNull Collection<? super LineMarkerInfo<?>> results) {
5757
String value = psiElement.getValue();
5858
if(StringUtils.isBlank(value)) {
5959
return;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
public class XmlLineMarkerProvider implements LineMarkerProvider {
2727

2828
@Override
29-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> lineMarkerInfos) {
29+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> lineMarkerInfos) {
3030
if(psiElements.size() == 0 || !Symfony2ProjectComponent.isEnabled(psiElements.get(0))) {
3131
return;
3232
}
@@ -44,7 +44,7 @@ public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNu
4444

4545
}
4646

47-
private void attachRouteActions(@NotNull PsiElement psiElement, @NotNull Collection<LineMarkerInfo> lineMarkerInfos) {
47+
private void attachRouteActions(@NotNull PsiElement psiElement, @NotNull Collection<? super LineMarkerInfo<?>> lineMarkerInfos) {
4848
PsiElement xmlTag = psiElement.getParent();
4949
if(!(xmlTag instanceof XmlTag) || !Pattern.getRouteTag().accepts(xmlTag)) {
5050
return;
@@ -65,7 +65,7 @@ private void attachRouteActions(@NotNull PsiElement psiElement, @NotNull Collect
6565

6666
@Nullable
6767
@Override
68-
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
68+
public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement psiElement) {
6969
return null;
7070
}
7171

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class YamlLineMarkerProvider implements LineMarkerProvider {
2929

3030
@Override
31-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> lineMarkerInfos) {
31+
public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElements, @NotNull Collection<? super LineMarkerInfo<?>> lineMarkerInfos) {
3232
if(psiElements.size() == 0 || !Symfony2ProjectComponent.isEnabled(psiElements.get(0))) {
3333
return;
3434
}
@@ -47,7 +47,7 @@ public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNu
4747
}
4848
}
4949

50-
private void attachEntityClass(@NotNull Collection<LineMarkerInfo> lineMarkerInfos, @NotNull PsiElement psiElement) {
50+
private void attachEntityClass(@NotNull Collection<? super LineMarkerInfo<?>> lineMarkerInfos, @NotNull PsiElement psiElement) {
5151
if(psiElement.getNode().getElementType() != YAMLTokenTypes.SCALAR_KEY) {
5252
return;
5353
}
@@ -89,7 +89,7 @@ private void attachEntityClass(@NotNull Collection<LineMarkerInfo> lineMarkerInf
8989
* defaults: { _controller: "Bundle:Foo:Bar" }
9090
* controller: "Bundle:Foo:Bar"
9191
*/
92-
private void attachRouteActions(@NotNull Collection<LineMarkerInfo> lineMarkerInfos, @NotNull PsiElement psiElement) {
92+
private void attachRouteActions(@NotNull Collection<? super LineMarkerInfo<?>> lineMarkerInfos, @NotNull PsiElement psiElement) {
9393
if(psiElement.getNode().getElementType() != YAMLTokenTypes.SCALAR_KEY) {
9494
return;
9595
}
@@ -114,7 +114,7 @@ private void attachRouteActions(@NotNull Collection<LineMarkerInfo> lineMarkerIn
114114

115115
@Nullable
116116
@Override
117-
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
117+
public LineMarkerInfo<?> getLineMarkerInfo(@NotNull PsiElement psiElement) {
118118
return null;
119119
}
120120

@@ -124,7 +124,7 @@ public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
124124
* foo:
125125
* targetEntity: Class
126126
*/
127-
private void attachRelationClass(@NotNull Collection<LineMarkerInfo> lineMarkerInfos, @NotNull PsiElement psiElement) {
127+
private void attachRelationClass(@NotNull Collection<? super LineMarkerInfo<?>> lineMarkerInfos, @NotNull PsiElement psiElement) {
128128
if(psiElement.getNode().getElementType() != YAMLTokenTypes.SCALAR_KEY) {
129129
return;
130130
}

0 commit comments

Comments
 (0)