@@ -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 <? extends PsiElement > psiElements , @ NotNull Collection <? super LineMarkerInfo <?> > 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 , String accessibleName ) {
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