Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Create type" -> "Create user-defined type" #15335

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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(
"""
Expand Down Expand Up @@ -2452,7 +2452,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit
// comment
@description('v1')
/* comment

*/
var v2 = [
1,
Expand Down Expand Up @@ -2487,7 +2487,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit
// comment
@description('v1')
/* comment

*/
var v2 = [
1,
Expand Down Expand Up @@ -2523,7 +2523,7 @@ public async Task VarsAndParams_ShouldInsertBeforeStatementTrivia(string fileWit
// comment
@description('v1')
/* comment

*/
var v2 = [
1,
Expand Down Expand Up @@ -2794,7 +2794,7 @@ public void TestCheckLineContent()
COMMENT /* cruel, cruel world
COMMENT
COMMENT */

CONTENT @description('description')
CONTENT @allowed([
CONTENT 'abc'
Expand All @@ -2808,39 +2808,39 @@ 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
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}}
""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private IEnumerable<CodeFixWithCommand> CreateAllExtractions(ExtractionContext e
yield return CreateExtraction(
extractionContext,
ExtractionKind.Type,
$"[Preview] Create type for {GetQuotedText(stringifiedUserDefinedType)}",
$"[Preview] Create user-defined type for {GetQuotedText(stringifiedUserDefinedType)}",
stringifiedUserDefinedType);
}
}
Expand Down
Loading