public void ExecuteCommand(SortImportsCommandArgs args, Action nextHandler)
 {
     this.WaitIndicator.Wait(
         title: EditorFeaturesResources.OrganizeDocument,
         message: EditorFeaturesResources.OrganizingDocument,
         allowCancel: true,
         action: waitContext => this.SortImports(args.SubjectBuffer, waitContext.CancellationToken));
 }
Esempio n. 2
0
        public bool ExecuteCommand(SortImportsCommandArgs args, CommandExecutionContext context)
        {
            using (context.OperationContext.AddScope(allowCancellation: true, EditorFeaturesResources.Organizing_document))
            {
                this.SortImports(args.SubjectBuffer, context.OperationContext);
            }

            return(true);
        }
Esempio n. 3
0
 public CommandState GetCommandState(SortImportsCommandArgs args)
 {
     return(GetCommandState(args, o => o.SortImportsDisplayStringWithAccelerator, needsSemantics: false));
 }