Skip to content

Commit e6bb3d9

Browse files
committed
fix: class constructor resolving
1 parent 4b3422c commit e6bb3d9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
# BDLH Changelog
44

55
## [Unreleased]
6+
### Fixed
7+
- Class constructor resolving
68

79
## [0.2.1]
8-
### Fixed
10+
### Fixed
911
- Method navigation behavior
1012

1113
## [0.2.0]

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pluginGroup = com.github.ceclin.bdlh
55
pluginName = BDLH
66
# SemVer format -> https://semver.org
7-
pluginVersion = 0.2.1
7+
pluginVersion = 0.2.2
88

99
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
# for insight into build numbers and IntelliJ Platform versions.

src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ class RefToJava(element: BDLSignature) : PsiReferenceBase<BDLSignature>(element,
1515
}
1616

1717
private fun resolveMethod(clazz: PsiClass, method: BDLMethod): PsiMethod? {
18-
return clazz.findMethodsByName(method.methodName.text, false).firstOrNull {
18+
val methodName = method.methodName.text.takeUnless { it == "<init>" } ?: clazz.name
19+
return clazz.findMethodsByName(methodName, false).firstOrNull {
1920
val parameter = method.parameter
2021
if (parameter == null)
2122
!it.hasParameters()

0 commit comments

Comments
 (0)