public PythonParserInternal(IPythonRuntime runtime) { if (runtime == null) { throw new ArgumentNullException("runtime"); } m_Runtime = runtime; }
internal static PythonParserInternal GetParser (IPythonRuntime runtime) { if (runtime == null) throw new ArgumentNullException ("runtime"); lock (s_syncRoot) { if (!s_parsers.ContainsKey (runtime.GetType ())) { s_parsers [runtime.GetType ()] = new PythonParserInternal (runtime); } } return s_parsers [runtime.GetType ()]; }
internal static PythonParserInternal GetParser(IPythonRuntime runtime) { if (runtime == null) { throw new ArgumentNullException("runtime"); } lock (s_syncRoot) { if (!s_parsers.ContainsKey(runtime.GetType())) { s_parsers [runtime.GetType()] = new PythonParserInternal(runtime); } } return(s_parsers [runtime.GetType()]); }
public override void CopyFrom(ItemConfiguration config) { PythonConfiguration pyConfig = config as PythonConfiguration; if (pyConfig == null) { throw new ArgumentException("not a PythonConfiguration"); } base.CopyFrom(config); this.m_Module = pyConfig.Module; this.m_Runtime = (IPythonRuntime)pyConfig.Runtime.Clone(); this.m_Optimize = pyConfig.Optimize; this.m_PythonOptions = pyConfig.PythonOptions; }
public PythonSiteImpl(IPythonRuntime runtime) { string name = runtime.GetType().Name; string configPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string dbPath = PathCombine(configPath, "MonoDevelop", "PyBinding", "Sites", name, "completion.db"); m_pathsPath = PathCombine(configPath, "MonoDevelop", "PyBinding", "Sites", name, "paths"); if (File.Exists(m_pathsPath)) { foreach (var line in File.ReadAllLines(m_pathsPath)) { string trimmed = line.Trim(); if (!String.IsNullOrEmpty(line)) { m_Paths.Add(trimmed); } } } m_Database = new ParserDatabase(dbPath); m_Database.Open(); m_parser = ParserManager.GetParser(runtime); }
public PythonParser() : base("Python", "text/x-python") { m_defaultRuntime = PythonHelper.FindPreferedRuntime(); }
public PythonParser () : base ("Python", "text/x-python") { m_defaultRuntime = PythonHelper.FindPreferedRuntime (); }
public PythonSite(IPythonRuntime runtime) { m_runtime = runtime; m_runtimeType = runtime.GetType(); }
public PythonParser () { m_defaultRuntime = PythonHelper.FindPreferedRuntime (); }
public PythonParserInternal (IPythonRuntime runtime) { if (runtime == null) throw new ArgumentNullException ("runtime"); m_Runtime = runtime; }
public override void CopyFrom (ItemConfiguration config) { PythonConfiguration pyConfig = config as PythonConfiguration; if (pyConfig == null) throw new ArgumentException ("not a PythonConfiguration"); base.CopyFrom (config); this.m_Module = pyConfig.Module; this.m_Runtime = (IPythonRuntime) pyConfig.Runtime.Clone (); this.m_Optimize = pyConfig.Optimize; this.m_PythonOptions = pyConfig.PythonOptions; }
public PythonConfiguration () { this.m_Runtime = PythonHelper.FindPreferedRuntime (); this.m_Module = s_DefaultModule; }
public PythonSite (IPythonRuntime runtime) { m_runtime = runtime; m_runtimeType = runtime.GetType (); }
public PythonSiteImpl (IPythonRuntime runtime) { string name = runtime.GetType ().Name; string configPath = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData); string dbPath = PathCombine (configPath, "MonoDevelop", "PyBinding", "Sites", name, "completion.db"); m_pathsPath = PathCombine (configPath, "MonoDevelop", "PyBinding", "Sites", name, "paths"); if (File.Exists (m_pathsPath)) { foreach (var line in File.ReadAllLines (m_pathsPath)) { string trimmed = line.Trim (); if (!String.IsNullOrEmpty (line)) m_Paths.Add (trimmed); } } m_Database = new ParserDatabase (dbPath); m_Database.Open (); m_parser = ParserManager.GetParser (runtime); }
public PythonParser() { m_defaultRuntime = PythonHelper.FindPreferedRuntime(); }
public PythonConfiguration() { this.m_Runtime = PythonHelper.FindPreferedRuntime(); this.m_Module = s_DefaultModule; }