public static GetProxyTarget ( ITextView textView, ICoreShell coreShell ) : |
||
textView | ITextView | |
coreShell | ICoreShell | |
return |
/// <summary> /// Retrieves base command target that is chained to the main controller /// attached to a given view. This is typically a core editor command target. /// </summary> /// <param name="textView">Text view</param> /// <returns>Chained command target</returns> private ICommandTarget GetBaseCommandTarget(ITextView textView) { var controller = MdMainController.FromTextView(textView); // If there is no chained target yet, create a simple proxy target // for now. Real target will be set later. return(controller?.ChainedController ?? CommandTargetProxy.GetProxyTarget(textView)); }
/// <summary> /// Retrieves base command target that is chained to the main controller /// attached to a given view. This is typically a core editor command target. /// </summary> /// <param name="textView">Text view</param> /// <returns>Chained command target</returns> private ICommandTarget GetBaseCommandTarget(ITextView textView) { var controller = MdMainController.FromTextView(textView); // If there is no chained target yet, create a simple proxy target // for now. Real target will be set later. if (controller != null && controller.ChainedController != null) { return(controller.ChainedController); } return(CommandTargetProxy.GetProxyTarget(textView, _coreShell)); }