public bool ExecuteCommand(BackTabKeyCommandArgs args, CommandExecutionContext executionContext) { if (_snippetManager.IsInSession(args.TextView)) { return(_snippetManager.MoveToPreviousField(args.TextView)); } return(false); }
public CommandState GetCommandState(BackTabKeyCommandArgs args, Func <CommandState> nextHandler) { AssertIsForeground(); Workspace workspace; if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out workspace)) { return(nextHandler()); } return(CommandState.Available); }
public void ExecuteCommand(BackTabKeyCommandArgs args, Action nextHandler, CommandExecutionContext context) { // If the Dashboard is focused, just navigate through its UI. if (DashboardShouldReceiveKeyboardNavigation(args.TextView)) { SetDashboardFocusToPreviousElement(args.TextView); return; } else { nextHandler(); } }
public void ExecuteCommand(BackTabKeyCommandArgs args, Action nextHandler, CommandExecutionContext context) { // If the Dashboard is focused, just navigate through its UI. var dashboard = GetDashboard(args.TextView); if (dashboard != null && dashboard.ShouldReceiveKeyboardNavigation) { dashboard.FocusPreviousElement(); return; } else { nextHandler(); } }
public CommandState GetCommandState(BackTabKeyCommandArgs args) { AssertIsForeground(); if (!AreSnippetsEnabled(args)) { return(CommandState.Unspecified); } if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out var workspace)) { return(CommandState.Unspecified); } return(CommandState.Available); }
public bool ExecuteCommand(BackTabKeyCommandArgs args, CommandExecutionContext context) { AssertIsForeground(); if (!AreSnippetsEnabled(args)) { return(false); } if (args.TextView.Properties.TryGetProperty(typeof(AbstractSnippetExpansionClient), out AbstractSnippetExpansionClient snippetExpansionClient) && snippetExpansionClient.TryHandleBackTab()) { return(true); } return(false); }
public CommandState GetCommandState(BackTabKeyCommandArgs args) { ThreadingContext.ThrowIfNotOnUIThread(); if (!AreSnippetsEnabled(args)) { return(CommandState.Unspecified); } if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) { return(CommandState.Unspecified); } return(CommandState.Available); }
public void ExecuteCommand(BackTabKeyCommandArgs args, Action nextHandler) { AssertIsForeground(); if (!AreSnippetsEnabled(args)) { nextHandler(); return; } if (args.TextView.Properties.TryGetProperty(typeof(AbstractSnippetExpansionClient), out AbstractSnippetExpansionClient snippetExpansionClient) && snippetExpansionClient.TryHandleBackTab()) { return; } nextHandler(); }
public CommandState GetCommandState(BackTabKeyCommandArgs args, Func <CommandState> nextHandler) { AssertIsForeground(); if (!args.SubjectBuffer.GetOption(InternalFeatureOnOffOptions.Snippets)) { return(nextHandler()); } Workspace workspace; if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out workspace)) { return(nextHandler()); } return(CommandState.Available); }
public void ExecuteCommand(BackTabKeyCommandArgs args, Action nextHandler) { AssertIsForeground(); if (!args.SubjectBuffer.GetOption(InternalFeatureOnOffOptions.Snippets)) { nextHandler(); return; } AbstractSnippetExpansionClient snippetExpansionClient; if (args.TextView.Properties.TryGetProperty(typeof(AbstractSnippetExpansionClient), out snippetExpansionClient) && snippetExpansionClient.TryHandleBackTab()) { return; } nextHandler(); }
public CommandState GetCommandState(BackTabKeyCommandArgs args, Func <CommandState> nextHandler) => GetCommandState(nextHandler);
public CommandState GetCommandState(BackTabKeyCommandArgs args, Func <CommandState> nextHandler) { return(GetCommandState(nextHandler)); }
public CommandState GetCommandState(BackTabKeyCommandArgs args) => CommandState.Unspecified;
bool ICommandHandler <BackTabKeyCommandArgs> .ExecuteCommand(BackTabKeyCommandArgs args, CommandExecutionContext executionContext) { GetOperations(args.TextView).Unindent(); return(true); }
CommandState ICommandHandler <BackTabKeyCommandArgs> .GetCommandState(BackTabKeyCommandArgs args) { return(AvailableInEditableView(args.TextView)); }
public void ExecuteCommand(BackTabKeyCommandArgs args, Action nextHandler, CommandExecutionContext context) { nextHandler(); }