From cf89e00ac1d59895ebf7dc1efccb7aa02202b80d Mon Sep 17 00:00:00 2001 From: Aleksandr Eliseev Date: Fri, 17 Jul 2026 17:38:22 +0400 Subject: [PATCH] Fix user's project name discarded by external system --- .idea/compiler.xml | 5 +- .../ui/configuration/ProjectConfigurable.java | 29 +++++++++-- .../manage/ProjectDataServiceImpl.java | 13 ++++- .../renameProject/RenameProjectHandler.java | 15 +++++- .../project/ProjectNameCustomizationState.kt | 50 +++++++++++++++++++ 5 files changed, 102 insertions(+), 10 deletions(-) create mode 100644 platform/platform-impl/src/ru/openide/project/ProjectNameCustomizationState.kt diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 6fd087103e74..30bcb2533d13 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -433,7 +433,6 @@ - @@ -683,7 +682,6 @@ - @@ -693,6 +691,7 @@ + @@ -1912,7 +1911,6 @@ - @@ -2247,7 +2245,6 @@ - diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java index 330847ca4c04..d243fd33559e 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java @@ -1,4 +1,7 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Aleksandr Eliseev at 2026 as part of the OpenIDE project(https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.openapi.roots.ui.configuration; @@ -28,9 +31,10 @@ import com.intellij.project.ProjectKt; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import ru.openide.project.ProjectNameCustomizationState; -import javax.swing.Icon; -import javax.swing.JComponent; +import javax.swing.*; +import java.io.File; import java.io.IOException; /** @@ -150,7 +154,15 @@ public class ProjectConfigurable extends ProjectStructureElementConfigurable { + + companion object { + fun getInstance(project: Project): ProjectNameCustomizationState = + project.getService(ProjectNameCustomizationState::class.java) + } + + var userCustomizedName: Boolean = false + + override fun getState(): ProjectNameCustomizationState = this + + override fun loadState(state: ProjectNameCustomizationState) { + XmlSerializerUtil.copyBean(state, this) + } +}