Skip to content

Commit 6ee3a80

Browse files
committed
1639: Fix assertion error and improve line marker immutability
Addressed an assertion failure related to improper `PsiElement` usage for popup models in `PluginLineMarkerProvider`. Made the `NavigationGutterIconBuilder` instance immutable by declaring it as `final`, enhancing code safety and readability. Updated the changelog for relevant changes.
1 parent 82217b5 commit 6ee3a80

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
1212
Replaced hardcoded Magento versions with dynamic fetching via Packagist API.
1313
Fixed UI icon references.
1414
Updated Run command.
15+
- java.lang.Throwable: Assertion failed: Do not use PsiElement for popup model. See PsiTargetNavigator [#2485](https://github.com/magento/magento2-phpstorm-plugin/pull/2485)
1516

1617
### Changed
1718

src/main/java/com/magento/idea/magento2plugin/linemarker/php/PluginLineMarkerProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void collectSlowLineMarkers(
7171

7272
if (!results.isEmpty()) {
7373
// Add the property to a collection of line marker info
74-
NavigationGutterIconBuilder<PsiElement> builder =
74+
final NavigationGutterIconBuilder<PsiElement> builder =
7575
NavigationGutterIconBuilder.create(AllIcons.Nodes.Plugin)
7676
.setTargets(results)
7777
.setTooltipText(TOOLTIP_TEXT);

0 commit comments

Comments
 (0)