Skip to content

Commit

Permalink
VB
Browse files Browse the repository at this point in the history
  • Loading branch information
tmat committed Sep 26, 2024
1 parent 2f3bb9e commit 04ab4cd
Show file tree
Hide file tree
Showing 21 changed files with 814 additions and 458 deletions.
245 changes: 149 additions & 96 deletions src/Features/CSharpTest/EditAndContinue/TopLevelEditingTests.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5000,7 +5000,7 @@ public void ReportTypeLayoutUpdateRudeEdits(CancellationToken cancellationToken)
Debug.Assert(newSymbol != null);

Report(
(newSymbol.ContainingType.TypeKind == TypeKind.Struct) ? RudeEditKind.InsertIntoStruct : RudeEditKind.InsertIntoClassWithLayout,
(newSymbol.ContainingType.TypeKind == TypeKind.Struct) ? RudeEditKind.InsertOrMoveStructMember : RudeEditKind.InsertOrMoveTypeWithLayoutMember,
cancellationToken,
arguments:
[
Expand All @@ -5023,7 +5023,7 @@ internal void ReportTypeLayoutUpdateRudeEdits(in DiagnosticContext diagnosticCon
// can't modify order of members in a COM interface:
if (newSymbol.ContainingType is INamedTypeSymbol { IsComImport: true })
{
diagnosticContext.Report(RudeEditKind.InsertIntoComInterface, cancellationToken, arguments: [GetDisplayKind(newSymbol)]);
diagnosticContext.Report(RudeEditKind.InsertOrMoveComInterfaceMember, cancellationToken, arguments: [GetDisplayKind(newSymbol)]);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ void AddGeneralDiagnostic(EditAndContinueErrorCode code, string resourceName, Di
AddRudeEdit(RudeEditKind.InsertExtern, nameof(FeaturesResources.Adding_an_extern_0_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.InsertDllImport, nameof(FeaturesResources.Adding_an_imported_method_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.InsertOperator, nameof(FeaturesResources.Adding_a_user_defined_0_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.InsertIntoStruct, nameof(FeaturesResources.Adding_0_into_a_1_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.InsertIntoClassWithLayout, nameof(FeaturesResources.Adding_0_into_a_1_with_explicit_or_sequential_layout_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.InsertOrMoveStructMember, nameof(FeaturesResources.Adding_or_moving_0_of_1_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.InsertOrMoveTypeWithLayoutMember, nameof(FeaturesResources.Adding_or_moving_0_of_1_with_explicit_or_sequential_layout_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.Move, nameof(FeaturesResources.Moving_0_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.Delete, nameof(FeaturesResources.Deleting_0_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.GenericMethodUpdate, nameof(FeaturesResources.Modifying_a_generic_method_requires_restarting_the_application));
Expand Down Expand Up @@ -149,7 +149,7 @@ void AddGeneralDiagnostic(EditAndContinueErrorCode code, string resourceName, Di
AddRudeEdit(RudeEditKind.ChangingNameOrSignatureOfActiveMember, nameof(FeaturesResources.Changing_name_or_signature_of_0_that_contains_an_active_statement_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.UpdateMightNotHaveAnyEffect, nameof(FeaturesResources.Changing_0_might_not_have_any_effect_until_the_application_is_restarted), DiagnosticSeverity.Warning);
AddRudeEdit(RudeEditKind.TypeUpdateAroundActiveStatement, nameof(FeaturesResources.Updating_a_0_around_an_active_statement_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.InsertIntoComInterface, nameof(FeaturesResources.Adding_0_into_a_COM_interface_requires_restarting_the_application));
AddRudeEdit(RudeEditKind.InsertOrMoveComInterfaceMember, nameof(FeaturesResources.Adding_or_moving_0_of_a_COM_interface_requires_restarting_the_application));

// VB specific
AddRudeEdit(RudeEditKind.HandlesClauseUpdate, nameof(FeaturesResources.Updating_the_Handles_clause_of_0_requires_restarting_the_application));
Expand Down
6 changes: 3 additions & 3 deletions src/Features/Core/Portable/EditAndContinue/RudeEditKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ internal enum RudeEditKind : ushort
// InsertNonPublicConstructor = 27,
// InsertGenericMethod = 28,
InsertDllImport = 29,
InsertIntoStruct = 30,
InsertIntoClassWithLayout = 31,
InsertOrMoveStructMember = 30,
InsertOrMoveTypeWithLayoutMember = 31,
Move = 32,
Delete = 33,
// MethodBodyAdd = 34,
Expand Down Expand Up @@ -144,5 +144,5 @@ internal enum RudeEditKind : ushort
ChangingNameOrSignatureOfActiveMember = 117,
UpdateMightNotHaveAnyEffect = 118,
TypeUpdateAroundActiveStatement = 119,
InsertIntoComInterface = 120,
InsertOrMoveComInterfaceMember = 120,
}
12 changes: 6 additions & 6 deletions src/Features/Core/Portable/FeaturesResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -354,20 +354,20 @@
<data name="Changing_the_declaration_scope_of_a_captured_variable_0_requires_restarting_the_application" xml:space="preserve">
<value>Changing the declaration scope of a captured variable '{0}' requires restarting the application.</value>
</data>
<data name="Adding_0_into_a_1_requires_restarting_the_application" xml:space="preserve">
<value>Adding {0} into a {1} requires restarting the application.</value>
<data name="Adding_or_moving_0_of_1_requires_restarting_the_application" xml:space="preserve">
<value>Adding or moving {0} of {1} requires restarting the application.</value>
</data>
<data name="Adding_0_into_an_interface_requires_restarting_the_application" xml:space="preserve">
<value>Adding {0} into an interface requires restarting the application.</value>
</data>
<data name="Adding_0_into_an_interface_method_requires_restarting_the_application" xml:space="preserve">
<value>Adding {0} into an interface method requires restarting the application.</value>
</data>
<data name="Adding_0_into_a_1_with_explicit_or_sequential_layout_requires_restarting_the_application" xml:space="preserve">
<value>Adding {0} into a {1} with explicit or sequential layout requires restarting the application.</value>
<data name="Adding_or_moving_0_of_1_with_explicit_or_sequential_layout_requires_restarting_the_application" xml:space="preserve">
<value>Adding or moving {0} of {1} with explicit or sequential layout requires restarting the application.</value>
</data>
<data name="Adding_0_into_a_COM_interface_requires_restarting_the_application" xml:space="preserve">
<value>Adding {0} into a COM interface requires restarting the application.</value>
<data name="Adding_or_moving_0_of_a_COM_interface_requires_restarting_the_application" xml:space="preserve">
<value>Adding or moving {0} of a COM interface requires restarting the application.</value>
</data>
<data name="Updating_the_modifiers_of_0_requires_restarting_the_application" xml:space="preserve">
<value>Updating the modifiers of {0} requires restarting the application.</value>
Expand Down
30 changes: 15 additions & 15 deletions src/Features/Core/Portable/xlf/FeaturesResources.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions src/Features/Core/Portable/xlf/FeaturesResources.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions src/Features/Core/Portable/xlf/FeaturesResources.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions src/Features/Core/Portable/xlf/FeaturesResources.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 04ab4cd

Please sign in to comment.