public CompletionSource(ITextBuffer textBuffer, ITextStructureNavigator textNavigator, IProjectExplorer projectExplorer) { _textBuffer = textBuffer; _textNavigator = textNavigator; _projectExplorer = projectExplorer; _viewExplorer = ViewExplorer.CreateFromActiveDocument(_projectExplorer); }
public CompletionSource(ITextBuffer textBuffer, IProjectExplorer projectExplorer) { _textBuffer = textBuffer; _projectExplorer = projectExplorer; _viewExplorer = _projectExplorer.GetViewExplorer(textBuffer); _textBuffer.Changed += TextBuffer_Changed; }
public CompletionSessionManager(ICompletionBroker broker, IProjectExplorer projectExplorer, IWpfTextView textView, ITextStructureNavigator textNavigator) { if (broker == null) throw new ArgumentNullException("broker", "Session Config is null."); if (projectExplorer == null) throw new ArgumentNullException("projectExplorer", "Project Explorer is null."); if (textView == null) throw new ArgumentNullException("textView", "Text View is null."); if (textNavigator == null) throw new ArgumentNullException("textNavigator", "textNavigator is null."); _completionBroker = broker; _projectExplorer = projectExplorer; _textView = textView; _textNavigator = textNavigator; }
private bool TryGetEnvironmentAndView() { TextView = AdaptersFactoryService.GetWpfTextView(TextViewAdapter); try { VsEnvironment = (DTE)ServiceProvider.GetService(typeof(DTE)); if (VsEnvironment != null) { ProjectExplorer = new ProjectExplorer(VsEnvironment); } } catch (COMException ex) { //TODO: Log the COM Exception somewhere //Unable to attach to the current visual studio environment VsEnvironment = null; } return(TextView != null && VsEnvironment != null); }
private IProjectExplorer GetFromVsEnvironment() { IProjectExplorer projectExplorer = null; try { VsEnvironment = (DTE)ServiceProvider.GetService(typeof(DTE)); if (VsEnvironment != null) { projectExplorer = new ProjectExplorer(VsEnvironment); } } catch (COMException ex) { //TODO: Log the COM Exception somewhere //Unable to attach to the current visual studio environment VsEnvironment = null; } return(projectExplorer); }
public CompletionSessionManager(ICompletionBroker broker, IProjectExplorer projectExplorer, IWpfTextView textView, ITextStructureNavigator textNavigator) { if (broker == null) { throw new ArgumentNullException("broker", "Session Config is null."); } if (projectExplorer == null) { throw new ArgumentNullException("projectExplorer", "Project Explorer is null."); } if (textView == null) { throw new ArgumentNullException("textView", "Text View is null."); } if (textNavigator == null) { throw new ArgumentNullException("textNavigator", "textNavigator is null."); } _completionBroker = broker; _projectExplorer = projectExplorer; _textView = textView; _textNavigator = textNavigator; }
public void TearDown() { _mockProjectExplorer.VerifyAllExpectations(); _mockProjectExplorer = null; }
public void Setup() { _mockProjectExplorer = MockRepository.GenerateMock <IProjectExplorer>(); }
public void Setup() { _mockProjectExplorer = MockRepository.GenerateMock<IProjectExplorer>(); }
public CompletionSource(ITextBuffer textBuffer, IProjectExplorer projectExplorer) { _textBuffer = textBuffer; _projectExplorer = projectExplorer; _viewExplorer = new ViewExplorer(_projectExplorer); }