Пример #1
0
        ContextActionsBulbViewModel BuildPopupViewModel(ITextEditor editor)
        {
            var actionsProvider = ContextActionsService.Instance.GetAvailableActions(editor);

            this.lastActions = actionsProvider;
            return(new ContextActionsBulbViewModel(actionsProvider));
        }
Пример #2
0
 void ClosePopup()
 {
     this.popup.Close();
     this.popup.IsDropdownOpen          = false;
     this.popup.IsHiddenActionsExpanded = false;
     this.popup.ViewModel = null;
     if (this.lastActions != null)
     {
         // Clear the context to prevent memory leaks in case some users kept long-lived references to EditorContext
         this.lastActions.EditorContext.Clear();
         this.lastActions = null;
     }
 }
		ContextActionsBulbViewModel BuildPopupViewModel()
		{
			var actionsProvider = new EditorActionsProvider(new EditorRefactoringContext(this.Editor), providers.ToArray());
			return new ContextActionsBulbViewModel(actionsProvider);
		}