提交 8a4b1281 编写于 作者: I Ivan Basov

form alignment. host control

上级 12b023c4
......@@ -5,10 +5,10 @@
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0" xmlns:changesignature="clr-namespace:Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature"
Height="200" Width="400"
MinHeight="200" MinWidth="400"
Title="Add Parameter"
Title="{Binding ElementName=dialog, Path=AddParameterDialogTitle}"
HasHelpButton="False"
ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False"
......@@ -26,21 +26,26 @@
<RowDefinition />
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Height="Auto" Width="Auto" Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label>Type:</Label>
<TextBox Width="200" Text="{Binding TypeNameEditorControl, Mode=OneTime}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label>Name:</Label>
<TextBox Width="200" Text="{Binding ParameterName}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label>Callsite value:</Label>
<TextBox Width="200" Text="{Binding CallsiteValue}"/>
</StackPanel>
</StackPanel>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Name="Table" Margin="11,6,11,11">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="{Binding ElementName=dialog, Path=TypeNameLabel}" />
<Control Grid.Row="0" Grid.Column="1" Name="TypeControl" Width="200" Visibility="Visible" PreviewKeyDown="TypeControl_PreviewKeyDown" BorderBrush="Black" />
<Label Grid.Row="1" Grid.Column="0" Content="{Binding ElementName=dialog, Path=ParameterNameLabel}" />
<TextBox Grid.Row="1" Grid.Column="1" Width="200" Text="{Binding ParameterName}" HorizontalAlignment="Right"/>
<Label Grid.Row="2" Grid.Column="0" Content="{Binding ElementName=dialog, Path=CallsiteValueLabel}" />
<TextBox Grid.Row="2" Grid.Column="1" Width="200" Text="{Binding CallsiteValue}"/>
</Grid>
<StackPanel Grid.Row="1"
HorizontalAlignment="Right"
Margin="0, 11, 0, 0"
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows;
using System.Windows.Input;
using Microsoft.VisualStudio.Commanding;
using Microsoft.VisualStudio.PlatformUI;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Editor.Commanding;
using Microsoft.VisualStudio.Text.Editor.Commanding.Commands;
using Microsoft.VisualStudio.Text.Operations;
using Microsoft.VisualStudio.Utilities;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
{
......@@ -11,18 +22,60 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
internal partial class AddParameterDialog : DialogWindow
{
private readonly AddParameterDialogViewModel _viewModel;
private readonly ITextEditorFactoryService _textEditorFactoryService;
private readonly ITextBufferFactoryService _textBufferFactoryService;
private IEditorCommandHandlerServiceFactory _commandServiceFactory;
private readonly IEditorOperationsFactoryService _editorOperationsFactoryService;
private readonly IContentType _contentType;
private IWpfTextView _wpfView;
private IEditorCommandHandlerService _commandService;
private Action Noop { get; } = new Action(() => { });
private Func<CommandState> Available { get; } = () => CommandState.Available;
public string OK { get { return ServicesVSResources.OK; } }
public string Cancel { get { return ServicesVSResources.Cancel; } }
public string TypeNameLabel { get { return ServicesVSResources.Type_Name; } }
public string ParameterNameLabel { get { return ServicesVSResources.Parameter_Name; } }
public string CallsiteValueLabel { get { return ServicesVSResources.Callsite_Value; } }
public AddParameterDialog(AddParameterDialogViewModel viewModel)
public string AddParameterDialogTitle { get { return ServicesVSResources.Add_Parameter; } }
public AddParameterDialog(
AddParameterDialogViewModel viewModel,
ITextEditorFactoryService textEditorFactoryService,
ITextBufferFactoryService textBufferFactoryService,
IEditorCommandHandlerServiceFactory commandServiceFactory,
IEditorOperationsFactoryService editorOperationsFactoryService,
IContentType contentType)
{
_viewModel = viewModel;
_textEditorFactoryService = textEditorFactoryService;
_textBufferFactoryService = textBufferFactoryService;
_commandServiceFactory = commandServiceFactory;
_editorOperationsFactoryService = editorOperationsFactoryService;
_contentType = contentType;
this.Loaded += AddParameterDialog_Loaded;
InitializeComponent();
}
private void AddParameterDialog_Loaded(object sender, RoutedEventArgs e)
{
var buffer = _textBufferFactoryService.CreateTextBuffer(_contentType);
_wpfView = _textEditorFactoryService.CreateTextView(buffer, _textEditorFactoryService.AllPredefinedRoles); // DefaultRoles might be ok
var viewHost = _textEditorFactoryService.CreateTextViewHost(_wpfView, setFocus: true).HostControl;
this.TypeControl = viewHost;
_commandService = _commandServiceFactory.GetService(_wpfView, buffer);
DataContext = viewModel;
var editorOperations = _editorOperationsFactoryService.GetEditorOperations(_wpfView);
this.TypeControl.Focus();
}
private void OK_Click(object sender, RoutedEventArgs e)
......@@ -37,5 +90,83 @@ private void Cancel_Click(object sender, RoutedEventArgs e)
{
DialogResult = false;
}
private void TypeControl_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
// TODO shift/alt
InsertChar(GetCharFromKey(e.Key));
}
// --- Get char from Key, courtesy of https://stackoverflow.com/a/5826175/879243
public enum MapType : uint
{
MAPVK_VK_TO_VSC = 0x0,
MAPVK_VSC_TO_VK = 0x1,
MAPVK_VK_TO_CHAR = 0x2,
MAPVK_VSC_TO_VK_EX = 0x3,
}
[DllImport("user32.dll")]
public static extern int ToUnicode(
uint wVirtKey,
uint wScanCode,
byte[] lpKeyState,
[Out, MarshalAs(UnmanagedType.LPWStr, SizeParamIndex = 4)]
StringBuilder pwszBuff,
int cchBuff,
uint wFlags);
[DllImport("user32.dll")]
public static extern bool GetKeyboardState(byte[] lpKeyState);
[DllImport("user32.dll")]
public static extern uint MapVirtualKey(uint uCode, MapType uMapType);
public static char GetCharFromKey(Key key)
{
char ch = '\0';
int virtualKey = KeyInterop.VirtualKeyFromKey(key);
byte[] keyboardState = new byte[256];
GetKeyboardState(keyboardState);
uint scanCode = MapVirtualKey((uint)virtualKey, MapType.MAPVK_VK_TO_VSC);
StringBuilder stringBuilder = new StringBuilder(2);
int result = ToUnicode((uint)virtualKey, scanCode, keyboardState, stringBuilder, stringBuilder.Capacity, 0);
switch (result)
{
case -1:
break;
case 0:
break;
case 1:
{
ch = stringBuilder[0];
break;
}
default:
{
ch = stringBuilder[0];
break;
}
}
return ch;
}
public void InsertChar(char character)
{
QueryAndExecute((v, b) => new TypeCharCommandArgs(v, b, character));
}
public void QueryAndExecute<T>(Func<ITextView, ITextBuffer, T> argsFactory) where T : EditorCommandArgs
{
var state = _commandService.GetCommandState(argsFactory, Available);
if (state.IsAvailable)
{
_commandService.Execute(argsFactory, Noop);
}
}
}
}
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Windows.Input;
using Microsoft.VisualStudio.LanguageServices.Implementation.Utilities;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
{
internal class AddParameterDialogViewModel : AbstractNotifyPropertyChanged
{
public AddParameterDialogViewModel(ParameterTypeEditorControl parameterTypeEditorControl)
{
TypeNameEditorControl = parameterTypeEditorControl;
}
public string ParameterName { get; set; }
public string CallsiteValue { get; set; }
public ParameterTypeEditorControl TypeNameEditorControl { get; }
public string TypeName { get; set; }
internal bool TrySubmit()
{
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.CodeAnalysis.Editor;
using Microsoft.CodeAnalysis.Editor.Shared.Extensions;
using System.ComponentModel.Design;
using System.Net.Mime;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
using Microsoft.VisualStudio.Editor;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Operations;
using Microsoft.VisualStudio.TextManager.Interop;
using Microsoft.VisualStudio.Utilities;
using Constants = Microsoft.VisualStudio.OLE.Interop.Constants;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.ChangeSignature
{
internal sealed class ParameterTypeEditorControl : AbstractOleCommandTarget
internal sealed class ParameterTypeEditorControl : TextBox
{
internal ParameterTypeEditorControl(
private IVsTextView _vsTextView;
private IWpfTextView _wpfTextView;
private IWpfTextViewHost _host;
private IEditorOperations _editorOperations;
private IVsEditorAdaptersFactoryService _vsEditorAdaptersFactoryService;
private IEditorOperationsFactoryService _editorOperationsFactoryService;
private System.IServiceProvider _serviceProvider;
private IOleCommandTarget _nextCommandTarget;
public void Initialize(
IVsTextView vsTextView,
IWpfTextView wpfTextView,
IWpfTextViewHost textViewHost,
IVsEditorAdaptersFactoryService editorAdaptersFactory,
IServiceProvider serviceProvider)
: base(wpfTextView, editorAdaptersFactory, serviceProvider)
IEditorOperationsFactoryService editorOperationsFactoryService,
ITextEditorFactoryService textEditorFactoryService,
ITextBufferFactoryService textBufferFactoryService,
System.IServiceProvider serviceProvider,
IContentType contentType)
{
var buffer = textBufferFactoryService.CreateTextBuffer(contentType);
var view = textEditorFactoryService.CreateTextView(buffer, textEditorFactoryService.AllPredefinedRoles); // DefaultRoles might be ok
var viewHost = textEditorFactoryService.CreateTextViewHost((IWpfTextView)view, setFocus: true).HostControl;
//Control viewHost = textViewHost.HostControl;
_vsTextView = vsTextView;
_wpfTextView = wpfTextView;
_host = textViewHost;
_vsEditorAdaptersFactoryService = editorAdaptersFactory;
_editorOperationsFactoryService = editorOperationsFactoryService;
_serviceProvider = serviceProvider;
InstallCommandFilter();
InitializeEditorControl();
}
private void InitializeEditorControl()
{
//AddLogicalChild(_host.HostControl);
//AddVisualChild(_host.HostControl);
}
private void InstallCommandFilter()
{
//if (_vsEditorAdaptersFactoryService != null)
//{
// _editorOperations = _editorOperationsFactoryService.GetEditorOperations(this._host.TextView);
//}
//ErrorHandler.ThrowOnFailure(this._vsTextView.AddCommandFilter(this, out this._nextCommandTarget));
}
public string GetText() => this._wpfTextView.TextSnapshot.GetText();
/// <summary>
/// Query command status
/// </summary>
/// <param name="pguidCmdGroup">Command group guid</param>
/// <param name="cmdCount">The number of commands in the OLECMD array</param>
/// <param name="prgCmds">The set of command ids</param>
/// <param name="cmdText">Unuses pCmdText</param>
/// <returns>A Microsoft.VisualStudio.OLE.Interop.Constants value</returns>
public int QueryStatus(ref Guid pguidCmdGroup, uint cmdCount, OLECMD[] prgCmds, IntPtr cmdText)
{
// Return status UNKNOWNGROUP if the passed command group is different than the ones we know about
if (pguidCmdGroup != VsMenus.guidStandardCommandSet2K &&
pguidCmdGroup != VsMenus.guidStandardCommandSet97)
{
return (int)Microsoft.VisualStudio.OLE.Interop.Constants.OLECMDERR_E_UNKNOWNGROUP;
}
// 1. For the commands we support and don't need to have a custom implementation
// simply ask the next command handler in the filter chain for the command status
// 2. For the commands we have a custom implementation, calculate and return status value
// 3. For other commands, set status to NOTSUPPORTED (0)
for (int i = 0; i < cmdCount; i++)
{
if (this.IsPassThroughCommand(ref pguidCmdGroup, prgCmds[i].cmdID))
{
OLECMD[] cmdArray = new OLECMD[] { new OLECMD() };
cmdArray[0].cmdID = prgCmds[i].cmdID;
int hr = this._nextCommandTarget.QueryStatus(ref pguidCmdGroup, 1, cmdArray, cmdText);
if (ErrorHandler.Failed(hr))
{
continue;
}
prgCmds[i].cmdf = cmdArray[0].cmdf;
}
else if ((pguidCmdGroup == VsMenus.guidStandardCommandSet97 && prgCmds[i].cmdID == StandardCommands.Cut.ID) ||
(pguidCmdGroup == VsMenus.guidStandardCommandSet2K && prgCmds[i].cmdID == (uint)VSConstants.VSStd2KCmdID.CUT) ||
(pguidCmdGroup == VsMenus.guidStandardCommandSet97 && prgCmds[i].cmdID == StandardCommands.Copy.ID) ||
(pguidCmdGroup == VsMenus.guidStandardCommandSet2K && prgCmds[i].cmdID == (uint)VSConstants.VSStd2KCmdID.COPY))
{
prgCmds[i].cmdf = (uint)OLECMDF.OLECMDF_SUPPORTED;
//if (this.CanCutCopy())
//{
// prgCmds[i].cmdf |= (uint)OLECMDF.OLECMDF_ENABLED;
//}
}
else if ((pguidCmdGroup == VsMenus.guidStandardCommandSet97 && prgCmds[i].cmdID == StandardCommands.Paste.ID) ||
(pguidCmdGroup == VsMenus.guidStandardCommandSet2K && prgCmds[i].cmdID == (uint)VSConstants.VSStd2KCmdID.PASTE))
{
prgCmds[i].cmdf = (uint)OLECMDF.OLECMDF_SUPPORTED;
//if (this.CanPaste())
//{
// prgCmds[i].cmdf |= (uint)OLECMDF.OLECMDF_ENABLED;
//}
}
else
{
prgCmds[i].cmdf = 0;
}
}
return VSConstants.S_OK;
}
/// <summary>
/// Executes the given shell command
/// </summary>
/// <param name="pguidCmdGroup">Command group guid</param>
/// <param name="cmdID">Command id</param>
/// <param name="cmdExecOpt">Options for the executing command</param>
/// <param name="pvaIn">The input arguments structure</param>
/// <param name="pvaOut">The command output structure</param>
/// <returns>Exec return value</returns>
public int Exec(ref Guid pguidCmdGroup, uint cmdID, uint cmdExecOpt, IntPtr pvaIn, IntPtr pvaOut)
{
// Return status UNKNOWNGROUP if the passed command group is different than the ones we know about
if (pguidCmdGroup != VsMenus.guidStandardCommandSet2K &&
pguidCmdGroup != VsMenus.guidStandardCommandSet97)
{
return (int)Constants.OLECMDERR_E_UNKNOWNGROUP;
}
int hr = 0;
// 1. For the commands we support and don't need to have a custom implementation
// simply pass the command to the next command handler in the filter chain
// 2. For the commands we have a custom implementation, carry out the command
// don't pass it to the next command handler
// 3. For other commands, simply return with NOTSUPPORTED
if (this.IsPassThroughCommand(ref pguidCmdGroup, cmdID))
{
hr = this._nextCommandTarget.Exec(ref pguidCmdGroup, cmdID, cmdExecOpt, pvaIn, pvaOut);
}
else
{
hr = (int)Constants.OLECMDERR_E_NOTSUPPORTED;
}
return hr;
}
protected override ITextBuffer GetSubjectBufferContainingCaret()
/// <summary>
/// Determines whether the given command should be passed to the
/// next command handler in the text view command filter chain.
/// </summary>
/// <param name="pguidCmdGroup">The command group guid</param>
/// <param name="cmdID">The command id</param>
/// <returns>True, if the command is supported and should be passed to the next command handler</returns>
private bool IsPassThroughCommand(ref Guid pguidCmdGroup, uint cmdID)
{
return this.WpfTextView.GetBufferContainingCaret(contentType: ContentTypeNames.RoslynContentType);
if (pguidCmdGroup == VsMenus.guidStandardCommandSet2K)
{
switch ((VSConstants.VSStd2KCmdID)cmdID)
{
case VSConstants.VSStd2KCmdID.COMPLETEWORD:
case VSConstants.VSStd2KCmdID.TYPECHAR:
case VSConstants.VSStd2KCmdID.BACKSPACE:
case VSConstants.VSStd2KCmdID.TAB:
case VSConstants.VSStd2KCmdID.BACKTAB:
case VSConstants.VSStd2KCmdID.DELETE:
case VSConstants.VSStd2KCmdID.DELETEWORDRIGHT:
case VSConstants.VSStd2KCmdID.DELETEWORDLEFT:
case VSConstants.VSStd2KCmdID.DELETETOBOL:
case VSConstants.VSStd2KCmdID.DELETETOEOL:
case VSConstants.VSStd2KCmdID.UP:
case VSConstants.VSStd2KCmdID.DOWN:
case VSConstants.VSStd2KCmdID.LEFT:
case VSConstants.VSStd2KCmdID.LEFT_EXT:
case VSConstants.VSStd2KCmdID.LEFT_EXT_COL:
case VSConstants.VSStd2KCmdID.RIGHT:
case VSConstants.VSStd2KCmdID.RIGHT_EXT:
case VSConstants.VSStd2KCmdID.RIGHT_EXT_COL:
case VSConstants.VSStd2KCmdID.EditorLineFirstColumn:
case VSConstants.VSStd2KCmdID.EditorLineFirstColumnExtend:
case VSConstants.VSStd2KCmdID.BOL:
case VSConstants.VSStd2KCmdID.BOL_EXT:
case VSConstants.VSStd2KCmdID.BOL_EXT_COL:
case VSConstants.VSStd2KCmdID.EOL:
case VSConstants.VSStd2KCmdID.EOL_EXT:
case VSConstants.VSStd2KCmdID.EOL_EXT_COL:
case VSConstants.VSStd2KCmdID.SELECTALL:
case VSConstants.VSStd2KCmdID.CANCEL:
case VSConstants.VSStd2KCmdID.WORDPREV:
case VSConstants.VSStd2KCmdID.WORDPREV_EXT:
case VSConstants.VSStd2KCmdID.WORDPREV_EXT_COL:
case VSConstants.VSStd2KCmdID.WORDNEXT:
case VSConstants.VSStd2KCmdID.WORDNEXT_EXT:
case VSConstants.VSStd2KCmdID.WORDNEXT_EXT_COL:
case VSConstants.VSStd2KCmdID.SELECTCURRENTWORD:
case VSConstants.VSStd2KCmdID.TOGGLE_OVERTYPE_MODE:
return true;
}
}
else if (pguidCmdGroup == VsMenus.guidStandardCommandSet97)
{
switch ((VSConstants.VSStd97CmdID)cmdID)
{
case VSConstants.VSStd97CmdID.Delete:
case VSConstants.VSStd97CmdID.SelectAll:
case VSConstants.VSStd97CmdID.Undo:
case VSConstants.VSStd97CmdID.Redo:
return true;
}
}
return false;
}
/// <summary>
/// Return visual child at given index
/// </summary>
/// <param name="index">child index</param>
/// <returns>returns visual child</returns>
// protected override Visual GetVisualChild(int index) => this._host?.HostControl;
// protected override Size ArrangeOverride(Size finalSize)
// {
//// _host.HostControl.Arrange(new Rect(new Point(0, 0), finalSize));
// return finalSize;
// }
// protected override void OnGotFocus(RoutedEventArgs e)
// {
// e.Handled = true;
// this._host.TextView.VisualElement.Focus();
// }
private static DependencyObject TryGetParent(DependencyObject obj)
{
return (obj is Visual) ? VisualTreeHelper.GetParent(obj) : null;
}
private static T GetParentOfType<T>(DependencyObject element) where T : Visual
{
var parent = TryGetParent(element);
if (parent is T)
{
return (T)parent;
}
if (parent == null)
{
return null;
}
return GetParentOfType<T>(parent);
}
internal static void HandleKeyDown(object sender, KeyEventArgs e)
{
var parameterTypeEditorControl = Keyboard.FocusedElement as ParameterTypeEditorControl;
if (parameterTypeEditorControl != null && parameterTypeEditorControl._vsTextView != null)
{
switch (e.Key)
{
case Key.Escape:
case Key.Tab:
case Key.Enter:
e.Handled = true;
break;
default:
// Let the editor control handle the keystrokes
var msg = ComponentDispatcher.CurrentKeyboardMessage;
var oleInteropMsg = new OLE.Interop.MSG();
oleInteropMsg.hwnd = msg.hwnd;
oleInteropMsg.message = (uint)msg.message;
oleInteropMsg.wParam = msg.wParam;
oleInteropMsg.lParam = msg.lParam;
oleInteropMsg.pt.x = msg.pt_x;
oleInteropMsg.pt.y = msg.pt_y;
e.Handled = parameterTypeEditorControl.HandleKeyDown(oleInteropMsg);
break;
}
}
else
{
if (e.Key == Key.Escape)
{
//OnCancel();
}
}
}
private bool HandleKeyDown(OLE.Interop.MSG message)
{
uint editCmdID = 0;
Guid editCmdGuid = Guid.Empty;
int VariantSize = 16;
var filterKeys = Package.GetGlobalService(typeof(SVsFilterKeys)) as IVsFilterKeys2;
if (filterKeys != null)
{
int translated;
int firstKeyOfCombo;
var pMsg = new OLE.Interop.MSG[1];
pMsg[0] = message;
ErrorHandler.ThrowOnFailure(filterKeys.TranslateAcceleratorEx(pMsg,
(uint)(__VSTRANSACCELEXFLAGS.VSTAEXF_NoFireCommand | __VSTRANSACCELEXFLAGS.VSTAEXF_UseTextEditorKBScope | __VSTRANSACCELEXFLAGS.VSTAEXF_AllowModalState),
0,
null,
out editCmdGuid,
out editCmdID,
out translated,
out firstKeyOfCombo));
if (translated == 1)
{
var inArg = IntPtr.Zero;
try
{
// if the command is undo (Ctrl + Z) or redo (Ctrl + Y) then leave it as IntPtr.Zero because of a bug in undomgr.cpp where
// it does undo or redo only for null, VT_BSTR and VT_EMPTY
if ((int)message.wParam != Convert.ToInt32('Z') && (int)message.wParam != Convert.ToInt32('Y'))
{
inArg = Marshal.AllocHGlobal(VariantSize);
Marshal.GetNativeVariantForObject(message.wParam, inArg);
}
return Exec(ref editCmdGuid, editCmdID, 0, inArg, IntPtr.Zero) == VSConstants.S_OK;
}
finally
{
if (inArg != IntPtr.Zero)
Marshal.FreeHGlobal(inArg);
}
}
}
// no translation available for this message
return false;
}
public string GetText() => this.WpfTextView.TextSnapshot.GetText();
}
}
......@@ -12,8 +12,11 @@
using Microsoft.CodeAnalysis.Notification;
using Microsoft.VisualStudio.Editor;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Editor.Commanding;
using Microsoft.VisualStudio.Text.Operations;
using Microsoft.VisualStudio.TextManager.Interop;
using Microsoft.VisualStudio.Utilities;
using ImportingConstructorAttribute = System.Composition.ImportingConstructorAttribute;
......@@ -26,11 +29,13 @@ internal class VisualStudioChangeSignatureOptionsService : IChangeSignatureOptio
private readonly IClassificationFormatMap _classificationFormatMap;
private readonly ClassificationTypeMap _classificationTypeMap;
private readonly IVsEditorAdaptersFactoryService _editorAdaptersFactoryService;
private readonly IEditorOperationsFactoryService _editorOperationsFactoryService;
private readonly ITextEditorFactoryService _textEditorFactoryService;
private readonly IVsEditorAdaptersFactoryService _vsEditorAdaptersFactoryService;
private readonly IServiceProvider _originalServiceProvider;
private readonly IContentType _contentType;
private readonly OLE.Interop.IServiceProvider _serviceProvider;
private readonly ITextBufferFactoryService _textBufferFactoryService;
private readonly IEditorCommandHandlerServiceFactory _editorCommandHandlerServiceFactory;
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
......@@ -39,18 +44,22 @@ internal class VisualStudioChangeSignatureOptionsService : IChangeSignatureOptio
ClassificationTypeMap classificationTypeMap,
IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
ITextEditorFactoryService textEditorFactoryService,
IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService,
IEditorOperationsFactoryService editorOperationsFactoryService,
IContentTypeRegistryService contentTypeRegistryService,
ITextBufferFactoryService textBufferFactoryService,
IEditorCommandHandlerServiceFactory editorCommandHandlerServiceFactory,
SVsServiceProvider services)
{
_classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap("tooltip");
_classificationTypeMap = classificationTypeMap;
_editorAdaptersFactoryService = editorAdaptersFactoryService;
_textEditorFactoryService = textEditorFactoryService;
_vsEditorAdaptersFactoryService = vsEditorAdaptersFactoryService;
_editorOperationsFactoryService = editorOperationsFactoryService;
_contentType = contentTypeRegistryService.GetContentType(ContentTypeNames.CSharpContentType);
_originalServiceProvider = services;
_editorCommandHandlerServiceFactory = editorCommandHandlerServiceFactory;
_serviceProvider = (OLE.Interop.IServiceProvider)services.GetService(typeof(OLE.Interop.IServiceProvider));
_textBufferFactoryService = textBufferFactoryService;
}
public ChangeSignatureOptionsResult GetChangeSignatureOptions(
......@@ -83,17 +92,17 @@ internal class VisualStudioChangeSignatureOptionsService : IChangeSignatureOptio
public AddedParameterResult GetAddedParameter(Document document)
{
// TODO async?
var vsTextView = GetTextViewAsync(document, CancellationToken.None).Result.Item1;
var wpfTextView = _editorAdaptersFactoryService.GetWpfTextView(vsTextView);
var parameterTypeEditorControl = new ParameterTypeEditorControl(
wpfTextView,
_editorAdaptersFactoryService,
_originalServiceProvider);
var tuple = GetTextViewAsync(document, CancellationToken.None).Result;
var wpfTextView = _editorAdaptersFactoryService.GetWpfTextView(tuple.Item1);
var viewModel = new AddParameterDialogViewModel();
var dialog = new AddParameterDialog(
viewModel,
_textEditorFactoryService,
_textBufferFactoryService,
_editorCommandHandlerServiceFactory,
_editorOperationsFactoryService,
_contentType);
parameterTypeEditorControl.AttachToVsTextView();
var viewModel = new AddParameterDialogViewModel(parameterTypeEditorControl);
var dialog = new AddParameterDialog(viewModel);
var result = dialog.ShowModal();
if (result.HasValue && result.Value)
......@@ -102,7 +111,7 @@ public AddedParameterResult GetAddedParameter(Document document)
{
IsCancelled = false,
AddedParameter = new AddedParameter(
viewModel.TypeNameEditorControl.GetText(),
viewModel.TypeName,
viewModel.ParameterName,
viewModel.CallsiteValue)
};
......@@ -130,8 +139,8 @@ public async Task<(IVsTextView, IWpfTextViewHost)> GetTextViewAsync(Document doc
PredefinedTextViewRoles.Editable,
PredefinedTextViewRoles.Interactive);
var textViewAdapter = _vsEditorAdaptersFactoryService.CreateVsTextViewAdapter(_serviceProvider, roleSet);
var bufferAdapter = _vsEditorAdaptersFactoryService.CreateVsTextBufferAdapter(_serviceProvider, _contentType);
var textViewAdapter = _editorAdaptersFactoryService.CreateVsTextViewAdapter(_serviceProvider, roleSet);
var bufferAdapter = _editorAdaptersFactoryService.CreateVsTextBufferAdapter(_serviceProvider, _contentType);
bufferAdapter.InitializeContent(documentText, documentText.Length);
// var textBuffer = _vsEditorAdaptersFactoryService.GetDataBuffer(bufferAdapter);
......@@ -153,7 +162,7 @@ public async Task<(IVsTextView, IWpfTextViewHost)> GetTextViewAsync(Document doc
(uint)TextViewInitFlags3.VIF_NO_HWND_SUPPORT,
initView);
var textViewHost = _vsEditorAdaptersFactoryService.GetWpfTextViewHost(textViewAdapter);
var textViewHost = _editorAdaptersFactoryService.GetWpfTextViewHost(textViewAdapter);
return (textViewAdapter, textViewHost);
}
......
......@@ -162,15 +162,6 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Active.
/// </summary>
internal static string Active {
get {
return ResourceManager.GetString("Active", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to _Add.
/// </summary>
......@@ -216,6 +207,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Add Parameter.
/// </summary>
internal static string Add_Parameter {
get {
return ResourceManager.GetString("Add_Parameter", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Add to _current file.
/// </summary>
......@@ -533,6 +533,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Callsite Value.
/// </summary>
internal static string Callsite_Value {
get {
return ResourceManager.GetString("Callsite_Value", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to camel Case Name.
/// </summary>
......@@ -904,6 +913,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to _Edit.
/// </summary>
internal static string Edit {
get {
return ResourceManager.GetString("Edit", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Edit {0}.
/// </summary>
......@@ -2235,6 +2253,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Parameter Name.
/// </summary>
internal static string Parameter_Name {
get {
return ResourceManager.GetString("Parameter_Name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Parameter preferences:.
/// </summary>
......@@ -3350,6 +3377,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Type Name.
/// </summary>
internal static string Type_Name {
get {
return ResourceManager.GetString("Type_Name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Type Parameters:.
/// </summary>
......
......@@ -1373,4 +1373,16 @@ I agree to all of the foregoing:</value>
<data name="Callsite" xml:space="preserve">
<value>Callsite</value>
</data>
<data name="Add_Parameter" xml:space="preserve">
<value>Add Parameter</value>
</data>
<data name="Callsite_Value" xml:space="preserve">
<value>Callsite Value</value>
</data>
<data name="Parameter_Name" xml:space="preserve">
<value>Parameter Name</value>
</data>
<data name="Type_Name" xml:space="preserve">
<value>Type Name</value>
</data>
</root>
\ No newline at end of file
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Přidat do _aktuálního souboru</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Klasifikace</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Předvolby parametrů:</target>
......@@ -557,6 +572,11 @@
<target state="translated">Toto je neplatný obor názvů.</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">Nepoužitá hodnota se explicitně přiřadí nepoužité lokální hodnotě.</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Zu a_ktueller Datei hinzufügen</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Klassifizierungen</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Parametereinstellungen:</target>
......@@ -557,6 +572,11 @@
<target state="translated">Dies ist ein ungültiger Namespace.</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">Der nicht verwendete Wert wird explizit einer nicht verwendeten lokalen Variablen zugewiesen.</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Agregar al archivo _actual</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Clasificaciones</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Preferencias de parámetros:</target>
......@@ -557,6 +572,11 @@
<target state="translated">Este espacio de nombres no es válido</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">El valor sin usar se asigna explícitamente a una variable local sin usar</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Ajouter au fichier a_ctif</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Classifications</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Préférences relatives aux paramètres :</target>
......@@ -557,6 +572,11 @@
<target state="translated">Ceci est un espace de noms non valide</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">La valeur inutilisée est explicitement affectée à une variable locale inutilisée</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Aggiungi al file _corrente</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Classificazioni</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Preferenze per parametri:</target>
......@@ -557,6 +572,11 @@
<target state="translated">Questo è uno spazio dei nomi non valido</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">Il valore inutilizzato viene assegnato in modo esplicito a una variabile locale inutilizzata</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">現在のファイルに追加(_C)</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">分類</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">パラメーターの優先順位:</target>
......@@ -557,6 +572,11 @@
<target state="translated">これは無効な名前空間です</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">未使用のローカルに未使用の値が明示的に割り当てられます</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">현재 파일에 추가(_C)</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">분류</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">매개 변수 기본 설정:</target>
......@@ -557,6 +572,11 @@
<target state="translated">잘못된 네임스페이스입니다.</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">사용되지 않는 값이 사용되지 않는 로컬에 명시적으로 할당됩니다.</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Dodaj do _bieżącego pliku</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Klasyfikacje</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Preferencje dotyczące parametrów:</target>
......@@ -557,6 +572,11 @@
<target state="translated">To jest nieprawidłowa przestrzeń nazw</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">Nieużywana wartość jest jawnie przypisywana do nieużywanej zmiennej lokalnej</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Adicionar ao _arquivo atual</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Classificações</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Preferências de parâmetro:</target>
......@@ -557,6 +572,11 @@
<target state="translated">Este é um namespace inválido</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">O valor não utilizado é explicitamente atribuído a um local não utilizado</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Добавить в _текущий файл</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Классификации</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Предпочтения для параметров:</target>
......@@ -557,6 +572,11 @@
<target state="translated">Это недопустимое пространство имен.</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">Неиспользуемое значение явным образом задано неиспользуемой локальной переменной.</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">Geçerli _dosyaya ekle</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">Sınıflandırmalar</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">Parametre tercihleri:</target>
......@@ -557,6 +572,11 @@
<target state="translated">Bu geçersiz bir ad alanı</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">Kullanılmayan değer açıkça kullanılmayan bir yerele atandı</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">添加到当前文件(_C)</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">分类</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">参数首选项:</target>
......@@ -557,6 +572,11 @@
<target state="translated">这是一个无效的命名空间</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">未使用的值会显式分配给未使用的本地函数</target>
......
......@@ -17,6 +17,11 @@
<target state="new">_Add</target>
<note>Adding an element to a list</note>
</trans-unit>
<trans-unit id="Add_Parameter">
<source>Add Parameter</source>
<target state="new">Add Parameter</target>
<note />
</trans-unit>
<trans-unit id="Add_to_current_file">
<source>Add to _current file</source>
<target state="translated">新增至 _current 檔案</target>
......@@ -92,6 +97,11 @@
<target state="new">Callsite</target>
<note />
</trans-unit>
<trans-unit id="Callsite_Value">
<source>Callsite Value</source>
<target state="new">Callsite Value</target>
<note />
</trans-unit>
<trans-unit id="Classifications">
<source>Classifications</source>
<target state="translated">分類</target>
......@@ -397,6 +407,11 @@
<target state="new">Parameter Details</target>
<note />
</trans-unit>
<trans-unit id="Parameter_Name">
<source>Parameter Name</source>
<target state="new">Parameter Name</target>
<note />
</trans-unit>
<trans-unit id="Parameter_preferences_colon">
<source>Parameter preferences:</source>
<target state="translated">參數喜好設定:</target>
......@@ -557,6 +572,11 @@
<target state="translated">這是無效的命名空間</target>
<note />
</trans-unit>
<trans-unit id="Type_Name">
<source>Type Name</source>
<target state="new">Type Name</target>
<note />
</trans-unit>
<trans-unit id="Unused_value_is_explicitly_assigned_to_an_unused_local">
<source>Unused value is explicitly assigned to an unused local</source>
<target state="translated">未使用的值已明確指派至未使用的區域</target>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册