コード例 #1
0
        public GotoWordController([NotNull] Lifetime lifetime,
                                  [NotNull] IShellLocks shellLocks,
                                  [NotNull] IProjectModelElement projectElement,
                                  [CanBeNull] ITextControl textControl,
                                  [NotNull] IDocumentMarkupManager markupManager)
            : base(lifetime, new GotoByNameModel(lifetime), shellLocks)
        {
            myShellLocks     = shellLocks;
            myTextControl    = textControl;
            myProjectElement = projectElement;
            mySelectedItem   = new Property <object>(lifetime, "SelectedItem");

            var projectFile = projectElement as IProjectFile;

            if (projectFile != null)
            {
                myCurrentFile = projectFile.ToSourceFile();

                if (textControl != null)
                {
                    myHighlighter = new LocalOccurrencesHighlighter(
                        lifetime, shellLocks, textControl, markupManager);
                    SelectedItem.Change.Advise(lifetime, AdviceSelectionItem);
                }
            }

            InitializeModel(lifetime, Model);
        }
コード例 #2
0
 public ExpressionChooser([NotNull] JetPopupMenus popupMenus, [NotNull] ShellLocks shellLocks,
                          [NotNull] IActionManager actionManager, [NotNull] IThreading threading,
                          [NotNull] IDocumentMarkupManager markupManager)
 {
     myPopupMenus    = popupMenus;
     myShellLocks    = shellLocks;
     myActionManager = actionManager;
     myMarkupManager = markupManager;
     myThreading     = threading;
 }
コード例 #3
0
 public ExpressionChooser([NotNull] JetPopupMenus popupMenus, [NotNull] ShellLocks shellLocks,
                      [NotNull] IActionManager actionManager, [NotNull] IThreading threading,
                      [NotNull] IDocumentMarkupManager markupManager)
 {
     myPopupMenus = popupMenus;
       myShellLocks = shellLocks;
       myActionManager = actionManager;
       myMarkupManager = markupManager;
       myThreading = threading;
 }
コード例 #4
0
 public GotoWordControllerFactory([NotNull] IShellLocks shellLocks,
                                  [NotNull] UIApplication uiApplication,
                                  [NotNull] GotoByNameMenuComponent menuComponent,
                                  [NotNull] IDocumentMarkupManager markupManager)
 {
     myShellLocks    = shellLocks;
     myUiApplication = uiApplication;
     myMenuComponent = menuComponent;
     myMarkupManager = markupManager;
 }
コード例 #5
0
        public LocalOccurrencesHighlighter([NotNull] Lifetime lifetime,
                                           [NotNull] IShellLocks shellLocks,
                                           [NotNull] ITextControl textControl,
                                           [NotNull] IDocumentMarkupManager markupManager)
        {
            myLifetime                = lifetime;
            myShellLocks              = shellLocks;
            myMarkupManager           = markupManager;
            myTextControl             = textControl;
            mySequentialOccurrences   = new SequentialLifetimes(lifetime);
            mySequentialFocused       = new SequentialLifetimes(lifetime);
            myTextControlViewportRect = textControl.Scrolling.ViewportRect.Value;

            mySyncRoot = new object();

            myLifetime.AddAction(DropHighlightings);
        }
コード例 #6
0
        public HighlightingTracker(Lifetime lifetime, ITextControlManager textControlManager,
                                   IDocumentMarkupManager markupManager, IViewable <IHighlightingChangeHandler> handlers)
        {
            textControlManager.TextControls.View(lifetime, (textControlLifetime, textControl) =>
            {
                var markupModel = markupManager.GetMarkupModel(textControl.Document);

                Action <DocumentMarkupModifiedEventArgs> onChanged = args =>
                {
                    Lifetimes.Using(l =>
                    {
                        handlers.View(l, (_, h) =>
                        {
                            h.OnHighlightingChanged(textControl.Document, args.Added, args.Removed, args.Modified);
                        });
                    });
                };

                markupModel.Changed += onChanged;
                textControlLifetime.AddAction(() => markupModel.Changed -= onChanged);
            });
        }
コード例 #7
0
 public TestExpressionChooser([NotNull] JetPopupMenus popupMenus, [NotNull] ShellLocks shellLocks,
                              [NotNull] IActionManager actionManager, [NotNull] IThreading threading,
                              [NotNull] IDocumentMarkupManager markupManager)
     : base(popupMenus, shellLocks, actionManager, threading, markupManager)
 {
 }