예제 #1
0
        public ContextPaneViewModel(JadeCore.IEditorController editCtrl)
        {
            Title = "Context Tool";
            ContentId = "ContextToolPane";
            _editorController = editCtrl;
            _root = new ObservableCollection<DeclarationViewModel>();
            _files = new HashSet<FilePath>();

            JadeCore.Services.Provider.CppParser.TranslationUnitIndexed += OnCppParserTranslationUnitIndexed;
        }
예제 #2
0
        public JadeViewModel(DockingGui.MainWindow view)
        {
            _workspaceController = JadeCore.Services.Provider.WorkspaceController;
            //Todo - Workspace viewmodel to track WorkspaceController changes
            _workspaceController.WorkspaceChanged += delegate { OnWorkspaceChanged(); };
            _currentWorkspace = new WorkspaceViewModel();
            
            _editorController = JadeCore.Services.Provider.EditorController;
            _editorController.ActiveDocumentChanged += OnEditorControllerActiveDocumentChanged;
            _editorViewModel = new JadeControls.EditorControl.ViewModel.EditorControlViewModel(_editorController, new JadeControls.EditorControl.ViewModel.DocumentViewModelFactory());

            _outputViewModel = new OutputViewModel(JadeCore.Services.Provider.OutputController);

            _searchController = JadeCore.Services.Provider.SearchController;
            _seachResultsViewModel = new SearchResultsPaneViewModel(_searchController);

            _symbolInspectorViewModel = new SymbolInspectorPaneViewModel(_editorController);

            _cursorInspectorViewModel = new CursorInspectorPaneViewModel();

            _contextPaneViewModel = new ContextPaneViewModel(_editorController);

            _commands = new JadeCommandAdaptor(this);
            _view = view;

            _toolWindows = new ObservableCollection<JadeControls.Docking.ToolPaneViewModel>();                        
            _toolWindows.Add(_seachResultsViewModel);
            _toolWindows.Add(_outputViewModel);
            _toolWindows.Add(_currentWorkspace);
            _toolWindows.Add(_symbolInspectorViewModel);
            _toolWindows.Add(_cursorInspectorViewModel);
            _toolWindows.Add(_contextPaneViewModel);
            OnViewWorkspaceWindow();

            UpdateWindowTitle();
        }