diff --git a/CHANGELOG.md b/CHANGELOG.md index d78dc84..fb1bc34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,11 @@ # BDLH Changelog ## [Unreleased] +### Fixed +- Class constructor resolving ## [0.2.1] -### Fixed +### Fixed - Method navigation behavior ## [0.2.0] diff --git a/gradle.properties b/gradle.properties index f758ad1..13dc25f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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. diff --git a/src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt b/src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt index 33849b3..288b6b9 100644 --- a/src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt +++ b/src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt @@ -15,7 +15,8 @@ class RefToJava(element: BDLSignature) : PsiReferenceBase(element, } private fun resolveMethod(clazz: PsiClass, method: BDLMethod): PsiMethod? { - return clazz.findMethodsByName(method.methodName.text, false).firstOrNull { + val methodName = method.methodName.text.takeUnless { it == "" } ?: clazz.name + return clazz.findMethodsByName(methodName, false).firstOrNull { val parameter = method.parameter if (parameter == null) !it.hasParameters()