Skip to content

Commit

Permalink
fix: avoid usage of internal api (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
SirYwell committed Aug 12, 2024
1 parent 15b4180 commit a59d85c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## [Unreleased]

### Fixed

- Avoid usage of internal API for method icons

## [0.2.0] - 2024-08-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = de.sirywell.handlehints
pluginName = HandleHints
pluginRepositoryUrl = https://github.com/SirYwell/HandleHints
# SemVer format -> https://semver.org
pluginVersion = 0.2.0
pluginVersion = 0.2.1

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 233
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import com.intellij.psi.PsiMethodCallExpression
import com.intellij.psi.codeStyle.JavaCodeStyleManager
import com.intellij.psi.util.PsiUtilCore
import com.intellij.psi.util.parentOfType
import com.intellij.ui.IconManager
import com.intellij.ui.PlatformIcons
import com.intellij.util.PlatformIcons
import de.sirywell.handlehints.TypeData
import de.sirywell.handlehints.foreign.PathTraverser
import de.sirywell.handlehints.type.*
Expand Down Expand Up @@ -46,7 +45,7 @@ class HandleHintsReferenceContributor : CompletionContributor() {
val qualifierMemoryLayoutType = TypeData.forFile(pos.containingFile)<MemoryLayoutType>(qualifier) ?: return
val targeted = followPath(qualifierMemoryLayoutType, directCall.argumentList.expressions, index) ?: return
val factory = JavaPsiFacade.getElementFactory(qualifier.project)
val icon = IconManager.getInstance().getPlatformIcon(PlatformIcons.Method)
val icon = PlatformIcons.METHOD_ICON
if (targeted is GroupLayoutType) {
targeted.memberLayouts.partialList().map { it.name }
.filterIsInstance<ExactLayoutName>()
Expand Down

0 comments on commit a59d85c

Please sign in to comment.