提交 0fe1e7fa 编写于 作者: A Allison Chou 提交者: Ivan Basov

VB intellisense bug fix

上级 b9d1e62a
......@@ -217,7 +217,7 @@
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn x:Name="callsiteHeader" Binding="{Binding Callsite, Mode=OneWay}" Width="*" IsReadOnly="True">
<DataGridTextColumn x:Name="callsiteHeader" Binding="{Binding CallSite, Mode=OneWay}" Width="*" IsReadOnly="True">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="Padding" Value="{StaticResource ResourceKey=cellPadding}" />
......
......@@ -136,7 +136,7 @@ private void Add_Click(object sender, RoutedEventArgs e)
if (result != null)
{
if (!string.IsNullOrWhiteSpace(result.CallSiteValue))
if (string.IsNullOrWhiteSpace(result.CallSiteValue))
{
result = new AddedParameter(result.TypeName, result.ParameterName, ServicesVSResources.ChangeSignature_NewParameterIntroduceTODOVariable);
}
......
......@@ -23,7 +23,7 @@ internal abstract class ChangeSignatureViewModelFactoryService : IChangeSignatur
private static string[] rolesCollectionForNameTextBox = new[] { PredefinedTextViewRoles.Editable, PredefinedTextViewRoles.Interactive,
AddParameterTextViewRole, AddParameterNameTextViewRole };
private static string[][] rolesCollecitons = new[] { rolesCollectionForTypeTextBox, rolesCollectionForNameTextBox };
private static string[][] rolesCollections = new[] { rolesCollectionForTypeTextBox, rolesCollectionForNameTextBox };
public async Task<ChangeSignatureIntellisenseTextBoxesViewModel?> CreateViewModelsAsync(
IContentTypeRegistryService contentTypeRegistryService,
......@@ -32,14 +32,21 @@ internal abstract class ChangeSignatureViewModelFactoryService : IChangeSignatur
int insertPosition)
{
var viewModels = await intellisenseTextBoxViewModelFactory.CreateIntellisenseTextBoxViewModelsAsync(
document, contentTypeRegistryService.GetContentType(ContentTypeName), insertPosition, TextToInsert, CreateSpansMethod, rolesCollecitons).ConfigureAwait(false);
document, contentTypeRegistryService.GetContentType(ContentTypeName), insertPosition, TextToInsert, CreateSpansMethod, rolesCollections).ConfigureAwait(false);
if (viewModels == null)
{
return null;
}
return new ChangeSignatureIntellisenseTextBoxesViewModel(viewModels[0], viewModels[1]);
// C# and VB have opposite orderings for name and type
if (document.Project.Language.Equals(LanguageNames.CSharp))
{
return new ChangeSignatureIntellisenseTextBoxesViewModel(viewModels[0], viewModels[1]);
}
return new ChangeSignatureIntellisenseTextBoxesViewModel(viewModels[1], viewModels[0]);
}
public abstract SymbolDisplayPart[] GeneratePreviewDisplayParts(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册