public override void Initialize () { base.Initialize (); if (this.Document.HasProject) { var config = this.Document.Project.DefaultConfiguration as PythonConfiguration; if (config != null) m_site = new PythonSite (config.Runtime); } if (m_site == null) m_site = new PythonSite (PythonHelper.FindPreferedRuntime ()); }
public override void Initialize () { base.Initialize (); if (this.Document.HasProject) { var config = this.Document.Project.DefaultConfiguration as PythonConfiguration; if (config != null) m_site = new PythonSite (config.Runtime); } if (m_site == null) m_site = new PythonSite (PythonHelper.FindPreferedRuntime ()); UpdatePath (null, null); Document.Editor.Caret.PositionChanged += UpdatePath; Document.DocumentParsed += delegate { UpdatePath (null, null); }; }