private LibClang.Cursor GetCursorAt(CppCodeBrowser.ICodeLocation loc) { CppCodeBrowser.Symbols.ISymbol symbol = _index.FileSymbolMaps.Lookup(_path, ViewModel.CaretOffset); if (symbol == null) return null; return symbol.Cursor; }
private UInt64 _docVersion; //this is the version number at the time of job creation, when the job executes the version number may be greater public ParseJob(FilePath path, UInt64 version, string[] compilerArgs, CppCodeBrowser.IProjectIndex index) { _path = path; _docVersion = version; _compilerArgs = compilerArgs; _index = index; }
public FindAllReferences(DocumentViewModel vm, FilePath path, CppCodeBrowser.IProjectIndex index) : base(vm) { ViewModel.CaretOffsetChanged += ViewModelCaretOffsetChanged; _path = path; _index = index; }
public InspectCursorCommand(DocumentViewModel vm, FilePath path, CppCodeBrowser.IProjectIndex index) : base(vm) { ViewModel.CaretOffsetChanged += ViewModelCaretOffsetChanged; _path = path; _index = index; RaiseCanExecuteChangedEvent(); }
//private CppCodeBrowser.IProjectFile _indexItem; public SourceFileJumpToCommand(DocumentViewModel vm, FilePath path, CppCodeBrowser.IProjectIndex index) : base(vm) { ViewModel.CaretOffsetChanged += ViewModelCaretOffsetChanged; _path = path; _index = index; _jumpToBrowser = new CppCodeBrowser.JumpToBrowser(_index); // _indexItem = _index.FindProjectItem(_path); RaiseCanExecuteChangedEvent(); }
private void OnCppParserTranslationUnitIndexed(CppCodeBrowser.ParseResult result) { if (result.Path != Document.File.Path) return; //highlight the symbol mappings if (_fileMap == null) { _fileMap = result.Index.FileSymbolMaps.GetMap(Document.File.Path); if (_fileMap != null) { _indexHighlighter.SetMap(_fileMap); } } /* CppCodeBrowser.IProjectFile fileIndex = result.Index.FindProjectItem(Document.File.Path); //highlight diagnostics List<LibClang.Diagnostic> diags = new List<Diagnostic>(fileIndex.Diagnostics); DiagnosticOutputWriter.UpdateOutput(diags); * */ }
private void OnCppParserTranslationUnitIndexed(CppCodeBrowser.ParseResult result) { UpdateTree(result.Index); }
private void UpdateTree(CppCodeBrowser.IProjectIndex index) { ISymbolTable symbols = index.Symbols; ISet<FilePath> files = JadeCore.Services.Provider.WorkspaceController.CurrentWorkspace.Files; foreach(NamespaceDecl ns in symbols.Namespaces) { if (FilterDeclaration(ns, files)) FindOrAddNamespaceNode(ns); } foreach(ClassDecl c in symbols.Classes) { if (FilterDeclaration(c, files)) FindOrAddClassNode(c); } foreach(MethodDecl m in symbols.Methods) { if (FilterDeclaration(m, files)) { DeclarationViewModel parentClass = FindOrAddClassNode(m.Class); parentClass.FindOrAddChildDecl(m); } } foreach(FieldDecl f in symbols.Fields) { if (FilterDeclaration(f, files)) { DeclarationViewModel parentClass = FindOrAddClassNode(f.Class); parentClass.FindOrAddChildDecl(f); } } foreach(ConstructorDecl c in symbols.Constructors) { if (FilterDeclaration(c, files)) { if (c.Class != null) { DeclarationViewModel parentClass = FindOrAddClassNode(c.Class); parentClass.FindOrAddChildDecl(c); } } } foreach (DestructorDecl d in symbols.Destructors) { if (FilterDeclaration(d, files)) { if (d.Class != null) { DeclarationViewModel parentClass = FindOrAddClassNode(d.Class); parentClass.FindOrAddChildDecl(d); } } } foreach(EnumDecl e in symbols.Enums) { if (FilterDeclaration(e, files)) FindOrAddEnumNode(e); } foreach (EnumConstantDecl c in symbols.EnumConstants) { if (FilterDeclaration(c, files)) FindOrAddEnumConstantNode(c); } foreach(FunctionDecl f in symbols.Functions) { if (FilterDeclaration(f, files)) FindOrAddFunctionNode(f); } OnPropertyChanged("RootItems"); OnPropertyChanged("FileNames"); }
public ResultProvider(FilePath sourceFile, CppCodeBrowser.IProjectIndex index, CppCodeBrowser.IUnsavedFileProvider unsavedFiles) { _index = index; _sourceFile = sourceFile; _unsavedFiles = unsavedFiles; }
public DisplayCodeLocationCommandParams(CppCodeBrowser.ICodeLocation location, bool setFocus, bool scroll) { Location = location; SetFocus = setFocus; Scroll = scroll; }
public void OnDisplaySymbolInspector(CppCodeBrowser.Symbols.IDeclaration declaration) { _symbolInspectorViewModel.Declaration = declaration; _symbolInspectorViewModel.IsSelected = true; _symbolInspectorViewModel.IsVisible = true; }
public DocChangeTracker(IEditorDoc document, CppCodeBrowser.IProjectIndex index) { _doc = document; _index = index; _doc.TextDocument.Changed += TextDocument_Changed; }