public void TestSubjectProperty() { var view = new StandardBufferView(EditorFactory.CreateView(TestExportProvider.ExportProvider, "class C { }")); var args = new BackspaceKeyCommandArgs(view, view.TextBuffer); Assert.Equal(view.TextBuffer, args.SubjectBuffer); }
public void ExecuteCommand(BackspaceKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext) { if (Enabled(args.TextView) && Manager(args.TextView).HasActiveSessions) { bool handledCommand = false; Manager(args.TextView).PreBackspace(out handledCommand); if (handledCommand) { return; } nextCommandHandler(); Manager(args.TextView).PostBackspace(); return; } nextCommandHandler(); }
void ICommandHandler <BackspaceKeyCommandArgs> .ExecuteCommand(BackspaceKeyCommandArgs args, Action nextHandler) { ExecuteBackspaceOrDelete(args.TextView, nextHandler, isDelete: false); }
CommandState ICommandHandler <BackspaceKeyCommandArgs> .GetCommandState(BackspaceKeyCommandArgs args, System.Func <CommandState> nextHandler) { AssertIsForeground(); return(nextHandler()); }
void IChainedCommandHandler <BackspaceKeyCommandArgs> .ExecuteCommand(BackspaceKeyCommandArgs args, Action nextHandler, CommandExecutionContext context) { ExecuteBackspaceOrDelete(args.TextView, nextHandler, isDelete: false); }
void ICommandHandler <BackspaceKeyCommandArgs> .ExecuteCommand(BackspaceKeyCommandArgs args, Action nextHandler) { AssertIsForeground(); ExecuteCommandWorker(args, nextHandler); }
CommandState ICommandHandler <BackspaceKeyCommandArgs> .GetCommandState(BackspaceKeyCommandArgs args, Func <CommandState> nextHandler) { AssertIsForeground(); return(GetCommandStateWorker(args, nextHandler)); }
void IChainedCommandHandler <BackspaceKeyCommandArgs> .ExecuteCommand(BackspaceKeyCommandArgs args, Action nextHandler, CommandExecutionContext context) { AssertIsForeground(); ExecuteCommandWorker(args, nextHandler, context); }
public CommandState GetCommandState(BackspaceKeyCommandArgs args, Func <CommandState> nextCommandHandler) { return(nextCommandHandler()); }