Пример #1
0
 public void ExecuteCommand(SortAndRemoveUnnecessaryImportsCommandArgs args, Action nextHandler)
 {
     this.WaitIndicator.Wait(
         title: EditorFeaturesResources.Organize_Document,
         message: EditorFeaturesResources.Organizing_document,
         allowCancel: true,
         action: waitContext => this.SortAndRemoveUnusedImports(args.SubjectBuffer, waitContext.CancellationToken));
 }
Пример #2
0
        public bool ExecuteCommand(SortAndRemoveUnnecessaryImportsCommandArgs args, CommandExecutionContext context)
        {
            using (context.OperationContext.AddScope(allowCancellation: true, EditorFeaturesResources.Organizing_document))
            {
                this.SortAndRemoveUnusedImports(args.SubjectBuffer, context.OperationContext);
            }

            return(true);
        }
Пример #3
0
 public CommandState GetCommandState(SortAndRemoveUnnecessaryImportsCommandArgs args, Func <CommandState> nextHandler)
 {
     return(GetCommandState(args, nextHandler, o => o.SortAndRemoveUnusedImportsDisplayStringWithAccelerator));
 }
Пример #4
0
 public CommandState GetCommandState(SortAndRemoveUnnecessaryImportsCommandArgs args)
 {
     return(GetCommandState(args, o => o.SortAndRemoveUnusedImportsDisplayStringWithAccelerator, needsSemantics: true));
 }
Пример #5
0
 public VSCommanding.CommandState GetCommandState(SortAndRemoveUnnecessaryImportsCommandArgs args)
 {
     return(GetCommandState(args, o => o.SortAndRemoveUnusedImportsDisplayStringWithAccelerator));
 }