Exemple #1
0
 protected override void GotoSource(VSOBJGOTOSRCTYPE gotoType)
 {
     // We do not support the "Goto Reference"
     if (gotoType == VSOBJGOTOSRCTYPE.GS_REFERENCE)
     {
         return;
     }
     //
     if (this.CanGoToSource && this.editorInfo != null)
     {
         // Need to retrieve the Project, then the File...
         var file = XSolution.FindFile(editorInfo.FileName);
         XSettings.OpenDocument(file.FullPath, editorInfo.Line, editorInfo.Column, true);
     }
 }
Exemple #2
0
        private static void GotoSystemType(ITextView TextView, XPETypeSymbol petype, XPESymbol element)
        {
            var xFile  = CreateFileForSystemType(petype, element);
            var entity = FindElementInFile(xFile, petype, element);
            var file   = TextView.TextBuffer.GetFile();
            // Copy references to the Orphan file project so type lookup works as expected
            var orphProject = XSolution.OrphanedFilesProject;
            var project     = file.Project;

            if (project != orphProject)
            {
                orphProject.ClearAssemblyReferences();
                foreach (var asm in project.AssemblyReferences)
                {
                    orphProject.AddAssemblyReference(asm.FileName);
                }
            }
            XSettings.OpenDocument(xFile.FullPath, entity.Range.StartLine, 1, true);
        }