Ejemplo n.º 1
0
        // Track the "active" source file. The UI can use this as the default
        // target for input (eg, who processes the stepping commands).

        // There's one SourceViewerForm instance for each source-file
        // Get the instance for the new source file.
        // Called on UI thread.
        public static SourceViewerForm GetSourceFile(MainForm parent, string path)
        {
            path = CommandBase.Shell.FileLocator.GetFileLocation(path);
            var source = (SourceViewerForm)m_sourceList[path];

            if (source == null)
            {
                source = SourceViewerForm.Build(parent, path);
                if (source != null)
                {
                    AddSourceViewer(source);
                }
            }
            m_ActiveSourceFile = source;
            return(source);
        }