public FindAllReferencesAction() { _dockingService = DependencyFactory.Resolve <IDockingService>(); _projectService = DependencyFactory.Resolve <IProjectService>(); _activeTextEditor = _dockingService.ActiveDocument as ITextEditor; _findResults = _dockingService.GetDockingWindow <FindResultsWindow>(); }
private FindAndReplaceForm() { _dockingService = DependencyFactory.Resolve <IDockingService>(); _projectService = DependencyFactory.Resolve <IProjectService>(); _dockingService.ActiveDocumentChanged += DockingServiceActiveDocumentChanged; _results = _dockingService.GetDockingWindow <FindResultsWindow>(); InitializeComponent(); }
public GotoDefinitionAction(FilePath fileName, string text, int currentLine) { _fileName = fileName; _text = text; _currentLine = currentLine; _dockingService = DependencyFactory.Resolve <IDockingService>(); _fileService = DependencyFactory.Resolve <IFileService>(); _parserService = DependencyFactory.Resolve <IParserService>(); _projectService = DependencyFactory.Resolve <IProjectService>(); _findResults = _dockingService.GetDockingWindow <FindResultsWindow>(); }
private IDockContent GetContentFromPersistString(string persistString) { string[] parsedStrings = persistString.Split(';'); Type type = Type.GetType(parsedStrings[0]); if (type == null) { return(null); } if (typeof(ToolWindow).IsAssignableFrom(type)) { ToolWindow window = _dockingService.GetDockingWindow(type); if (window != null) { return(window); } } if (parsedStrings.Length < 2 || !typeof(AbstractFileEditor).IsAssignableFrom(type)) { return(null); } FilePath fileName = new FilePath(parsedStrings[1]); if (!File.Exists(fileName)) { return(null); } AbstractUiAction.RunCommand(new OpenFileAction(fileName)); var doc = _dockingService.Documents.OfType <AbstractFileEditor>() .FirstOrDefault(d => fileName == d.FileName); if (doc == null) { return(null); } doc.PersistStringLoad(parsedStrings); return(doc); }
private void addNewFileMenuItem_Click(object sender, EventArgs e) { ProjectViewer projectViewer = _dockingService.GetDockingWindow <ProjectViewer>(); AbstractUiAction.RunCommand(new AddNewFileAction(projectViewer)); }