Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 12, 2022. It is now read-only.

Commit 93f7c0a

Browse files
Merge pull request #277 from dontfreakout/Fix-Deprecated_LineMarkerInfo
Fix #275: Deprecated LineMarkerInfo
2 parents a180ae9 + 98f1f87 commit 93f7c0a

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

‎gradle.properties‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33

44
pluginGroup = de.espend.idea.laravel
55
pluginName_ = Laravel Plugin
6-
pluginVersion = 0.16.0
6+
pluginVersion = 0.16.1
77
pluginSinceBuild = 183
88
pluginUntilBuild = 191.*
99
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
1010
# See https://jb.gg/intellij-platform-builds-list for available build versions
1111
# pluginVerifierIdeVersions = 2020年2月4日, 2020年3月2日, 2021.1
1212

1313
platformType = IU
14-
platformVersion = 2019.1.3
14+
platformVersion = 2021.3
1515
platformDownloadSources = true
1616

17-
phpPluginVersion = 191.7141.52
18-
bladePluginVersion = 191.7141.5
17+
phpPluginVersion = 213.5744.279
18+
bladePluginVersion = 213.5744.223

‎src/main/java/de/espend/idea/laravel/blade/TemplateLineMarker.java‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
4848
}
4949

5050
@Override
51-
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> lineMarkers) {
51+
public void collectSlowLineMarkers(@NotNull List<? extendsPsiElement> psiElements, @NotNull Collection<? superLineMarkerInfo<?>> lineMarkers) {
5252
// we need project element; so get it from first item
5353
if(psiElements.size() == 0) {
5454
return;
@@ -154,7 +154,7 @@ private Pair<BladePsiDirectiveParameter, String> extractSectionParameter(@NotNul
154154
* Like this @section('sidebar')
155155
*/
156156
@NotNull
157-
private Collection<LineMarkerInfo> collectOverwrittenSection(@NotNull LeafPsiElement psiElement, @NotNull String sectionName, @NotNull LazyVirtualFileTemplateResolver resolver) {
157+
private Collection<LineMarkerInfo<?>> collectOverwrittenSection(@NotNull LeafPsiElement psiElement, @NotNull String sectionName, @NotNull LazyVirtualFileTemplateResolver resolver) {
158158
List<GotoRelatedItem> gotoRelatedItems = new ArrayList<>();
159159

160160
for(PsiElement psiElement1 : psiElement.getContainingFile().getChildren()) {
@@ -180,12 +180,12 @@ private Collection<LineMarkerInfo> collectOverwrittenSection(@NotNull LeafPsiEle
180180
}
181181

182182
return Collections.singletonList(
183-
getRelatedPopover("Parent Section", "Blade Section", psiElement, gotoRelatedItems, PhpIcons.OVERRIDES)
183+
getRelatedPopover("Parent Section", "Blade Section", psiElement, gotoRelatedItems, PhpIcons.OVERRIDES, "Show parent section")
184184
);
185185
}
186186

187187
@NotNull
188-
private Collection<LineMarkerInfo> collectTemplateFileRelatedFiles(@NotNull PsiFile psiFile, @NotNull LazyVirtualFileTemplateResolver resolver) {
188+
private Collection<LineMarkerInfo<?>> collectTemplateFileRelatedFiles(@NotNull PsiFile psiFile, @NotNull LazyVirtualFileTemplateResolver resolver) {
189189
Collection<String> collectedTemplates = resolver.resolveTemplateName(psiFile);
190190
if(collectedTemplates.size() == 0) {
191191
return Collections.emptyList();
@@ -221,7 +221,7 @@ private Collection<LineMarkerInfo> collectTemplateFileRelatedFiles(@NotNull PsiF
221221
}
222222
}
223223

224-
Collection<LineMarkerInfo> lineMarkers = new ArrayList<>();
224+
Collection<LineMarkerInfo<?>> lineMarkers = new ArrayList<>();
225225

226226
if(includeLineMarker.get()) {
227227
NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder
@@ -255,7 +255,7 @@ private Collection<LineMarkerInfo> collectTemplateFileRelatedFiles(@NotNull PsiF
255255
}
256256

257257
@NotNull
258-
private LineMarkerInfo getRelatedPopover(@NotNull String singleItemTitle, @NotNull String singleItemTooltipPrefix, @NotNull PsiElement lineMarkerTarget, @NotNull Collection<GotoRelatedItem> gotoRelatedItems, @NotNull Icon icon) {
258+
private LineMarkerInfo getRelatedPopover(@NotNull String singleItemTitle, @NotNull String singleItemTooltipPrefix, @NotNull PsiElement lineMarkerTarget, @NotNull Collection<GotoRelatedItem> gotoRelatedItems, @NotNull Icon icon, StringaccessibleName) {
259259
// single item has no popup
260260
String title = singleItemTitle;
261261
if(gotoRelatedItems.size() == 1) {
@@ -269,10 +269,10 @@ private LineMarkerInfo getRelatedPopover(@NotNull String singleItemTitle, @NotNu
269269
lineMarkerTarget,
270270
lineMarkerTarget.getTextRange(),
271271
icon,
272-
6,
273272
new ConstantFunction<>(title),
274273
new RelatedPopupGotoLineMarker.NavigationHandler(gotoRelatedItems),
275-
GutterIconRenderer.Alignment.RIGHT
274+
GutterIconRenderer.Alignment.RIGHT,
275+
() -> accessibleName
276276
);
277277
}
278278

@@ -312,7 +312,7 @@ private void visitOverwrittenTemplateFile(@NotNull PsiFile psiFile, @NotNull Lis
312312
* Possible targets are: @section('sidebar')
313313
*/
314314
@NotNull
315-
private Collection<LineMarkerInfo> collectImplementsSection(@NotNull LeafPsiElement psiElement, @NotNull String sectionName, @NotNull LazyVirtualFileTemplateResolver resolver) {
315+
private Collection<LineMarkerInfo<?>> collectImplementsSection(@NotNull LeafPsiElement psiElement, @NotNull String sectionName, @NotNull LazyVirtualFileTemplateResolver resolver) {
316316
Collection<String> templateNames = resolver.resolveTemplateName(psiElement.getContainingFile());
317317
if(templateNames.size() == 0) {
318318
return Collections.emptyList();
@@ -341,15 +341,15 @@ private Collection<LineMarkerInfo> collectImplementsSection(@NotNull LeafPsiElem
341341
}
342342

343343
return Collections.singletonList(
344-
getRelatedPopover("Template", "Blade File", psiElement, gotoRelatedItems, PhpIcons.IMPLEMENTED)
344+
getRelatedPopover("Template", "Blade File", psiElement, gotoRelatedItems, PhpIcons.IMPLEMENTED, "Show template")
345345
);
346346
}
347347

348348
/**
349349
* Support: @stack('foobar')
350350
*/
351351
@NotNull
352-
private Collection<LineMarkerInfo> collectStackImplements(@NotNull LeafPsiElement psiElement, @NotNull String sectionName, @NotNull LazyVirtualFileTemplateResolver resolver) {
352+
private Collection<LineMarkerInfo<?>> collectStackImplements(@NotNull LeafPsiElement psiElement, @NotNull String sectionName, @NotNull LazyVirtualFileTemplateResolver resolver) {
353353
Collection<String> templateNames = resolver.resolveTemplateName(psiElement.getContainingFile());
354354
if(templateNames.size() == 0) {
355355
return Collections.emptyList();
@@ -378,15 +378,15 @@ private Collection<LineMarkerInfo> collectStackImplements(@NotNull LeafPsiElemen
378378
}
379379

380380
return Collections.singletonList(
381-
getRelatedPopover("Push Implementation", "Push Implementation", psiElement, gotoRelatedItems, PhpIcons.IMPLEMENTED)
381+
getRelatedPopover("Push Implementation", "Push Implementation", psiElement, gotoRelatedItems, PhpIcons.IMPLEMENTED, "Go to push Implementation")
382382
);
383383
}
384384

385385
/**
386386
* Support: @push('foobar')
387387
*/
388388
@NotNull
389-
private Collection<LineMarkerInfo> collectPushOverwrites(@NotNull LeafPsiElement psiElement, @NotNull String sectionName) {
389+
private Collection<LineMarkerInfo<?>> collectPushOverwrites(@NotNull LeafPsiElement psiElement, @NotNull String sectionName) {
390390
final List<GotoRelatedItem> gotoRelatedItems = new ArrayList<>();
391391

392392
BladeTemplateUtil.visitUpPath(psiElement.getContainingFile(), 10, parameter -> {
@@ -400,15 +400,15 @@ private Collection<LineMarkerInfo> collectPushOverwrites(@NotNull LeafPsiElement
400400
}
401401

402402
return Collections.singletonList(
403-
getRelatedPopover("Stack Section", "Stack Overwrites", psiElement, gotoRelatedItems, PhpIcons.OVERRIDES)
403+
getRelatedPopover("Stack Section", "Stack Overwrites", psiElement, gotoRelatedItems, PhpIcons.OVERRIDES, "Go to stack section")
404404
);
405405
}
406406

407407
/**
408408
* Support: @slot('foobar')
409409
*/
410410
@NotNull
411-
private Collection<LineMarkerInfo> collectSlotOverwrites(@NotNull LeafPsiElement psiElement, @NotNull BladePsiDirectiveParameter parameter, @NotNull String sectionName, @NotNull LazyVirtualFileTemplateResolver resolver) {
411+
private Collection<LineMarkerInfo<?>> collectSlotOverwrites(@NotNull LeafPsiElement psiElement, @NotNull BladePsiDirectiveParameter parameter, @NotNull String sectionName, @NotNull LazyVirtualFileTemplateResolver resolver) {
412412
String component = BladePsiUtil.findComponentForSlotScope(parameter);
413413
if(component == null) {
414414
return Collections.emptyList();
@@ -434,7 +434,7 @@ private Collection<LineMarkerInfo> collectSlotOverwrites(@NotNull LeafPsiElement
434434
}
435435

436436
return Collections.singletonList(
437-
getRelatedPopover("Slot Overwrites", "Slot Overwrites", psiElement, gotoRelatedItems, PhpIcons.OVERRIDES)
437+
getRelatedPopover("Slot Overwrites", "Slot Overwrites", psiElement, gotoRelatedItems, PhpIcons.OVERRIDES, "Go to slot")
438438
);
439439
}
440440

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /