Skip to content

Commit 435b005

Browse files
authored
Merge pull request #6 from DeveloperUtils/better-logo
GH-2 prepare CHANGELOG.md for release pipeline, improved logo
2 parents 6e6c5d4 + 0397c75 commit 435b005

File tree

4 files changed

+164
-67
lines changed

4 files changed

+164
-67
lines changed

CHANGELOG.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,20 @@
22

33
# Kotlin Function Arguments Helper Changelog
44

5-
## [2021.1.1]
5+
## [Unreleased]
66
### Added
77
- plugin logo
88

99
### Changed
10-
- dropped support for IDEA before `2020.3`
10+
- rebased plugin on [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template)
1111
- build with kotlin `1.4.30`
1212

13-
### Fixed
14-
- runs now with IDEA `2021.*`
15-
16-
## [Unreleased]
17-
### Added
18-
19-
### Changed
20-
21-
### Deprecated
22-
2313
### Removed
14+
- dropped support for IDEA before `2020.3`
2415

2516
### Fixed
26-
27-
### Security
28-
## [unspecified]
29-
### Changed
30-
- rebased plugin on [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template)
17+
- runs now with IDEA `2021.*`
18+
- Release build pipeline
3119

3220
## [2020.1.2]
3321
### Added

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
pluginGroup = com.github.developerutils.kotlin-function-arguments-helper
55
pluginName_ = Kotlin Function Arguments Helper
6-
pluginVersion = 2021.1.1
6+
pluginVersion = 2021.1.2
77
pluginSinceBuild = 203
88
pluginUntilBuild = 213.*
99
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl

src/main/kotlin/com/github/developerutils/kotlinfunctionargumentshelper/KotlinFunctionArgumentsHelperIntention.kt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,20 @@ class KotlinFunctionArgumentsHelperIntention : SelfTargetingIntention<KtValueArg
4747
val calleeExpression = getStrictParentOfType<KtCallExpression>()?.calleeExpression ?: return null
4848
val context = calleeExpression.analyze(BodyResolveMode.PARTIAL)
4949
val descriptor = calleeExpression.getReferenceTargets(context).firstOrNull() as? FunctionDescriptor
50-
if (descriptor is JavaCallableMemberDescriptor) return null
51-
return descriptor.takeIf { it is ClassConstructorDescriptor || it is SimpleFunctionDescriptor }
50+
return if (descriptor is JavaCallableMemberDescriptor) {
51+
null
52+
} else {
53+
descriptor.takeIf { it is ClassConstructorDescriptor || it is SimpleFunctionDescriptor }
54+
}
5255
}
5356

5457
private fun KtValueArgumentList.fillArguments(parameters: List<ValueParameterDescriptor>) {
55-
val arguments = this.arguments
5658
val argumentNames = arguments.mapNotNull { it.getArgumentName()?.asName?.identifier }
5759
val factory = KtPsiFactory(this)
5860
parameters.forEachIndexed { index, parameter ->
59-
if (arguments.size > index && !arguments[index].isNamed()) return@forEachIndexed
60-
if (parameter.name.identifier in argumentNames) return@forEachIndexed
61+
if (arguments.size > index && !arguments[index].isNamed()) return
62+
if (parameter.name.identifier in argumentNames) return
63+
6164
val added = addArgument(createDefaultValueArgument(parameter, factory))
6265
val argumentExpression = added.getArgumentExpression()
6366
if (argumentExpression is KtQualifiedExpression) {

src/main/resources/META-INF/pluginIcon.svg

Lines changed: 150 additions & 44 deletions
Loading

0 commit comments

Comments
 (0)