public void GotoDeclaration(DocumentInfo ASMDoc, string Word, string Zone, string CheapLabelParent) { Types.ASM.FileInfo fileToDebug = DetermineASMFileInfo(ASMDoc); Types.SymbolInfo tokenInfo = fileToDebug.TokenInfoFromName(Word, Zone, CheapLabelParent); if (tokenInfo == null) { fileToDebug = ASMDoc.ASMFileInfo; tokenInfo = ASMDoc.ASMFileInfo.TokenInfoFromName(Word, Zone, CheapLabelParent); } if (tokenInfo != null) { string documentFile = ""; int documentLine = -1; if ((tokenInfo.LineIndex == 0) && (!string.IsNullOrEmpty(tokenInfo.DocumentFilename))) { // try stored info first OpenDocumentAndGotoLine(ASMDoc.Project, tokenInfo.DocumentFilename, tokenInfo.LocalLineIndex); return; } if (fileToDebug.FindTrueLineSource(tokenInfo.LineIndex, out documentFile, out documentLine)) { OpenDocumentAndGotoLine(ASMDoc.Project, documentFile, documentLine); } } else { System.Windows.Forms.MessageBox.Show("Could not determine item source"); } }
private void treeProject_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { Types.SymbolInfo tokenInfo = (Types.SymbolInfo)e.Node.Tag; if (tokenInfo == null) { if (e.Node == NodeRoot) { // project node return; } //// zone node //MainForm.OpenDocumentAndGotoLine( tokenInfo.DocumentFilename, tokenInfo.LocalLineIndex ); return; } Core.Navigating.OpenDocumentAndGotoLine(OutlineProject, tokenInfo.DocumentFilename, tokenInfo.LocalLineIndex); }