Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
234b15a
Changed Rename on a Kotlin package folder to rename the directory tog…
Nov 1, 2026
e60b490
Fixed reference retargeting gaps in Kotlin package changes
Nov 2, 2026
9dbfc0f
Fixed reference retargeting for wildcard imports, default-package imp…
Nov 2, 2026
41eac23
Fixed imports for root-package callers and PSI-based import ranges
Nov 2, 2026
c6d4396
Fixed import insertion boundaries and spelling-independent reference …
Nov 2, 2026
2933fd6
Fixed reference offsets before package directives and escaping of gen…
Nov 2, 2026
a2bd456
Fixed rename validation and conflict checks for Kotlin files
Nov 2, 2026
9379416
Fixed wildcard and aliased imports during Kotlin package changes
Nov 2, 2026
2c1219d
Fixed constructor call and aliased-import updates in Kotlin renames
Nov 2, 2026
3e98ecc
Fixed outgoing import for explicit constructor calls in Kotlin packag…
Nov 2, 2026
df3c5b2
Fixed aliased constructor references and package-qualified calls in K…
Nov 2, 2026
e383873
Fixed alias-bound references in Kotlin package changes and renames
Nov 2, 2026
aad58a3
Fixed conflicting imports for package-qualified Kotlin references
Nov 2, 2026
ec90594
Fixed incoming imports for alias-bound Kotlin references
Nov 2, 2026
214c01c
Fixed default-package outgoing imports and constructor usage discovery
Nov 2, 2026
cc816ee
Excluded constructor-delegation keywords and discovered nested imports
Nov 2, 2026
77ed816
Retargeted wildcard imports rooted in nested moved classes
Nov 2, 2026
fe3dd6f
Escaped keyword-named nested classes in rebuilt wildcard imports
Nov 2, 2026
eed1839
Rejected all-underscore identifiers as plain Kotlin names
Nov 2, 2026
35665b5
Kept extension receivers that spell the old package in incoming retar…
Nov 2, 2026
c8107b6
Matched qualified references and imports by PSI identifiers
Nov 2, 2026
603a597
Kept call receivers when matching qualified reference chains
Nov 2, 2026
ac2f2e8
Kept instance receivers and subpackage imports during retargeting
Nov 3, 2026
0d1747e
Fixed the remaining package-rename review findings
Nov 3, 2026
feb40ae
Fixed binding conflicts in the package and class rename passes
Nov 3, 2026
2eb2ecf
Fixed remaining import and capture edge cases in rename passes
Nov 3, 2026
972faa9
Fixed import priority, operator and inherited-member edge cases in re…
Nov 3, 2026
1289f90
Fixed import rebinding edge cases for aliases, companion extensions a…
Nov 3, 2026
ffb71ca
Fixed overload and scope rebinding edges in rename and package change
Nov 3, 2026
b16edb4
Fixed implicit-scope capture and convention import edge cases
Nov 3, 2026
f09a644
Fixed same-package, convention and object-receiver capture edges in r…
Nov 3, 2026
264e6f6
Fixed wildcard, destructured-parameter and indexed-setter edges in re…
Nov 3, 2026
5ec0fbf
Fixed convention, delegate and signature edges in rename and package …
Nov 3, 2026
4d967be
Fixed outgoing convention, provided delegate, secondary constructor a…
Nov 3, 2026
b632a7c
Fixed wildcard-head, delegate-provider and type-parameter edges
Nov 3, 2026
0e203ff
Fixed implicit delegate and indexed-setter edges in rename and packag…
Nov 3, 2026
6e2b54d
Fixed qualified package overloads, object receivers and implicit invo…
Nov 3, 2026
a129a26
Fixed alias-name function rename, implicit invoke preflight and loop …
Nov 3, 2026
7208b9c
Fixed simple-name invoke imports and imported delegate providers in p…
Nov 3, 2026
3aee361
Fixed convention usages, generic receivers and constructor bounds in …
Nov 3, 2026
fbddb40
Fixed setter applicability, provider type inference and shadowed bind…
Nov 3, 2026
56e7610
Fixed overload selection and external callers in rename and package c…
Nov 3, 2026
1f2646e
Fixed convention shadowing, delegate accessor selection and vararg si…
Nov 3, 2026
edd18e3
Fixed setter parameter ranking and delegate accessor discovery
Nov 3, 2026
875e99a
Fixed aliased rename conflicts, operator bindings and delegate thisRe…
Nov 4, 2026
eadb29e
Fixed receiver classification and delegate operator applicability
Nov 4, 2026
686eccd
Fixed compound assignment, delegated setter and companion receiver re…
Nov 4, 2026
3333f9a
Fixed delegate operator bounds, member provider selection and interfa…
Nov 4, 2026
ba316cc
Fixed nullable type-parameter bounds, instantiated member scopes and …
Nov 12, 2026
c004d82
Fixed extension setter substitution, provider argument inference and …
Nov 12, 2026
abd8f99
Fixed receiver inference over subtypes, nullable setter arguments and…
Nov 12, 2026
cdb0b7c
Fixed delegate operator modifiers, defaulted index setters, concrete …
Nov 12, 2026
4f655e9
Fixed inherited operator eligibility and defaulted setter ranking
Nov 12, 2026
9805f6b
Fixed operator overload ranking for bounded parameters and inherited …
Nov 12, 2026
2635da2
Fixed private member setters hiding extensions and uninstantiated pro…
Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Changed **Refactor → Rename** for a Kotlin package folder to rename both the directory and the package: every Kotlin file inside receives the package derived from its new path (including files whose package did not match the directory), imports and supported Kotlin references in other files are updated, and **Undo Last Refactoring** restores the original paths, texts, and open-editor carets. On a Kotlin file, it also renames a matching top-level class and its supported Kotlin references, and reports a blocking conflict when the requested name cannot be used as a Kotlin class name or is already declared in the same package. **Rename Kotlin Package Directory...** still renames only the directory, **Change Kotlin Package...** still changes only the package, and Rename is no longer offered for the `src/main/kotlin` and `src/test/kotlin` source roots.
- Added Java to Kotlin conversion: **Refactor → Convert to Kotlin** (in the main menu, the Java editor's right-click menu, and the context menu of a Java file in the Projects/Files windows) opens the standard Refactoring window with the file to convert, and pressing **Refactor** runs the conversion under NetBeans' progress dialog, which closes when the conversion finishes; the Java file is then replaced with a sibling Kotlin file produced by the IntelliJ IDEA K2 converter (getters/setters become properties, static-only classes become `object`s, inner classes become `inner class`es); nullability annotations on the Java declarations are carried over into Kotlin `?` types, the Kotlin file appears only after the conversion succeeds, a failed conversion leaves the Java file untouched, and **Undo Last Refactoring** restores the Java file and removes the Kotlin one in a single step.

# 0.11.59 (2026-10-26)
Expand Down
2 changes: 1 addition & 1 deletion CoreImpl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-core-impl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion KotlinCodeInsightImpl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-code-insight-impl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion KotlinCompilerCliBase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-compiler-cli-base</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion KotlinFixesImpl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-fixes-impl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion KotlinFormatter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-formatter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion KotlinHighlighting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-highlighting</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion KotlinIcons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-icons</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion KotlinIntentionUtils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-intention-utils</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion KotlinJ2K/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-j2k</artifactId>
Expand Down
10 changes: 6 additions & 4 deletions KotlinRefactoring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.nbplugins</groupId>
<artifactId>netbeans-plugin-kotlin</artifactId>
<version>0.12.12-SNAPSHOT</version>
<version>0.12.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>netbeans-plugin-kotlin-refactoring</artifactId>
Expand Down Expand Up @@ -2018,8 +2018,10 @@ if (k2MoveFilesProcessor.exists()) {
// algorithm while removing only BaseRefactoringProcessor's IDEA command, modal progress,
// conflict-dialog, usage-view, and event-listener lifecycle. KaChangePackageComputer supplies
// a per-file target package plan (needed for recursive NetBeans folder selection) and invokes
// this lifecycle-free port for its actual usage discovery, conflict check, package rewrite,
// declaration map, and retargeting sequence.
// this lifecycle-free port for its actual usage discovery, conflict check, and package rewrite.
// Reference retargeting is NOT done here: in standalone mode updatePackageDirective invalidates
// every PSI smart pointer held by UsageInfo, so the computer rewrites imports and qualified
// references in the captured source text instead.
def k2ChangePackageProcessor = new File(srcDir, 'org/jetbrains/kotlin/idea/k2/refactoring/move/processor/K2ChangePackageRefactoringProcessor.kt')
if (k2ChangePackageProcessor.exists()) {
def text = k2ChangePackageProcessor.text
Expand Down Expand Up @@ -2048,7 +2050,7 @@ if (k2ChangePackageProcessor.exists()) {
text = text.substring(0, preprocessStart) + text.substring(performStart)
}
text = text.replace(' @OptIn(KaAllowAnalysisOnEdt::class)\n override fun performRefactoring(usages: Array<out UsageInfo>) = allowAnalysisOnEdt {',
' fun findConflicts(usages: List<com.intellij.refactoring.util.MoveRenameUsageInfo>): com.intellij.util.containers.MultiMap<PsiElement, String> =\n findAllMoveConflicts(descriptor.files, descriptor.target, usages)\n\n fun prepareRefactoring(oldToNewMap: MutableMap<PsiElement, PsiElement>) {\n val files = descriptor.files\n files.forEach { it.updatePackageDirective(descriptor.target) }\n files.forEach { file ->\n oldToNewMap[file] = file\n file.declarations.filterIsInstance<org.jetbrains.kotlin.psi.KtNamedDeclaration>().forEach { declaration ->\n oldToNewMap[declaration] = declaration\n }\n }\n }\n\n fun retargetUsages(usages: Collection<UsageInfo>, oldToNewMap: Map<PsiElement, PsiElement>) {\n retargetUsagesAfterMove(usages.toList(), oldToNewMap)\n }\n\n fun performRefactoring(usages: Collection<UsageInfo>) {\n val oldToNewMap = linkedMapOf<PsiElement, PsiElement>()\n prepareRefactoring(oldToNewMap)\n retargetUsages(usages, oldToNewMap)\n }')
' fun findConflicts(usages: List<com.intellij.refactoring.util.MoveRenameUsageInfo>): com.intellij.util.containers.MultiMap<PsiElement, String> =\n findAllMoveConflicts(descriptor.files, descriptor.target, usages)\n\n fun updatePackages() {\n descriptor.files.forEach { it.updatePackageDirective(descriptor.target) }\n }')
text = text.replace('\n\n override fun getBeforeData(): RefactoringEventData = RefactoringEventData().apply {\n addElements(descriptor.files)\n }', '')
text = text.replace(' val files = descriptor.files\n files.forEach { it.updatePackageDirective(descriptor.target) }\n val oldToNewMap: MutableMap<PsiElement, PsiElement> = files.associateWith { it }.toMutableMap()\n files.forEach { file -> file.allDeclarationsToUpdate.forEach { decl -> oldToNewMap[decl] = decl } }\n retargetUsagesAfterMove(usages.toList(), oldToNewMap)\n }', '')
k2ChangePackageProcessor.text = text
Expand Down
Loading
Loading