From 627786ab11f2097da5ddd0682bdd8bbbd899a5c3 Mon Sep 17 00:00:00 2001 From: Rustam Vishnyakov Date: Tue, 21 Feb 2017 15:13:48 +0300 Subject: [PATCH] Bug fix: Don't let create multiple IDE schemes with the same project name --- .../application/options/codeStyle/CodeStyleSchemesActions.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java index 53ff87e5f782..6a3553e4443e 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java @@ -75,9 +75,8 @@ abstract class CodeStyleSchemesActions extends AbstractSchemeActions getModel().containsScheme(schemeName, isProjectScheme)); + SchemeNameGenerator.getUniqueName(getProjectName(), schemeName -> getModel().containsScheme(schemeName, false)); CodeStyleScheme newScheme = getModel().exportProjectScheme(name); getModel().setUsePerProjectSettings(false); getModel().selectScheme(newScheme, null);