From fd007a6d33b1da17188e82c1ebe12acbbc997956 Mon Sep 17 00:00:00 2001 From: Stephen Weatherford Date: Thu, 17 Oct 2024 12:54:02 -0700 Subject: [PATCH] "Create type" -> "Create user-defined type" --- .../ExpressionAndTypeExtractorTests.cs | 32 +++++++++---------- .../Refactor/ExpressionAndTypeExtractor.cs | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Bicep.LangServer.IntegrationTests/ExpressionAndTypeExtractorTests.cs b/src/Bicep.LangServer.IntegrationTests/ExpressionAndTypeExtractorTests.cs index cb0c444fef7..e0eb486b097 100644 --- a/src/Bicep.LangServer.IntegrationTests/ExpressionAndTypeExtractorTests.cs +++ b/src/Bicep.LangServer.IntegrationTests/ExpressionAndTypeExtractorTests.cs @@ -37,7 +37,7 @@ public class ExpressionAndTypeExtractorTests : CodeActionTestBase { private const string ExtractToVariableTitle = "[Preview] Extract variable"; private const string ExtractToParameterTitle = "[Preview] Extract parameter"; - private const string ExtractToTypeTitle = "[Preview] Create type for "; + private const string ExtractToTypeTitle = "[Preview] Create user-defined type for "; private const string PostExtractionCommandName = "bicep.internal.postExtraction"; private const string Tab = "\t"; @@ -2143,7 +2143,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit // Has a newline before the existing declaration (or at beginning of file) // Has a newline after the existing declaration (or at end of file) // Is there already a newline after the new declaration? - // + // // ==== No existing declaration [DataRow( """ @@ -2452,7 +2452,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit // comment @description('v1') /* comment - + */ var v2 = [ 1, @@ -2487,7 +2487,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit // comment @description('v1') /* comment - + */ var v2 = [ 1, @@ -2523,7 +2523,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit // comment @description('v1') /* comment - + */ var v2 = [ 1, @@ -2794,7 +2794,7 @@ public void TestCheckLineContent() COMMENT /* cruel, cruel world COMMENT COMMENT */ - + CONTENT @description('description') CONTENT @allowed([ CONTENT 'abc' @@ -2808,23 +2808,23 @@ CONTENT ] CONTENT a: 'abc' COMMENT // hi CONTENT COMMENT b: /*comment*/ 'bcd' - + CONTENT b: [ CONTENT 1, 2 - + CONTENT 3 CONTENT 4 CONTENT ] CONTENT} - - + + CONTENT COMMENT /*hello*/ resource stg 'Microsoft.Storage/storageAccounts@2019-04-01' = { CONTENT name: '${storagePrefix}${uniqueString(resourceGroup().id)}' CONTENT location: location CONTENT sku: { CONTENT name: storageSKU CONTENT } - + CONTENT kind: 'StorageV2' CONTENT properties: { COMMENT // supportsHttpsTrafficOnly: true @@ -2832,15 +2832,15 @@ CONTENT ] CONTENT } {{Tab}} {{Tab}} CONTENT output storageEndpoint object = stg.properties.|primaryEndpoints - + COMMENT // Comments are not empty - + COMMENT /* Not even - COMMENT + COMMENT COMMENT this one - COMMENT + COMMENT COMMENT */ - + CONTENT param p2 string CONTENT param p3 int {{Tab}} """; diff --git a/src/Bicep.LangServer/Refactor/ExpressionAndTypeExtractor.cs b/src/Bicep.LangServer/Refactor/ExpressionAndTypeExtractor.cs index c0d42864c6b..164a8ec40ac 100644 --- a/src/Bicep.LangServer/Refactor/ExpressionAndTypeExtractor.cs +++ b/src/Bicep.LangServer/Refactor/ExpressionAndTypeExtractor.cs @@ -193,7 +193,7 @@ private IEnumerable CreateAllExtractions(ExtractionContext e yield return CreateExtraction( extractionContext, ExtractionKind.Type, - $"[Preview] Create type for {GetQuotedText(stringifiedUserDefinedType)}", + $"[Preview] Create user-defined type for {GetQuotedText(stringifiedUserDefinedType)}", stringifiedUserDefinedType); } }