Skip to content

Commit

Permalink
fix: class constructor resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
ceclin committed Apr 21, 2022
1 parent 4b3422c commit e6bb3d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# BDLH Changelog

## [Unreleased]
### Fixed
- Class constructor resolving

## [0.2.1]
### Fixed
### Fixed
- Method navigation behavior

## [0.2.0]
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 = com.github.ceclin.bdlh
pluginName = BDLH
# SemVer format -> https://semver.org
pluginVersion = 0.2.1
pluginVersion = 0.2.2

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class RefToJava(element: BDLSignature) : PsiReferenceBase<BDLSignature>(element,
}

private fun resolveMethod(clazz: PsiClass, method: BDLMethod): PsiMethod? {
return clazz.findMethodsByName(method.methodName.text, false).firstOrNull {
val methodName = method.methodName.text.takeUnless { it == "<init>" } ?: clazz.name
return clazz.findMethodsByName(methodName, false).firstOrNull {
val parameter = method.parameter
if (parameter == null)
!it.hasParameters()
Expand Down

0 comments on commit e6bb3d9

Please sign in to comment.