private static FileParser getFile(string filename, Intellua parent, Dictionary <string, int> required) { if (s_files.ContainsKey(filename)) { FileParser afp = s_files[filename]; if (!afp.modified()) { return(afp); } else { System.Diagnostics.Debug.Print("modified"); } } System.Diagnostics.Debug.Print("parse file " + filename); IntelluaSource source = new IntelluaSource(filename, parent); FileParser fp = new FileParser(source); foreach (var kv in required) { fp.m_required[kv.Key] = kv.Value; } fp.parse(true); s_files[filename] = fp; return(fp); }
private static FileParser getFile(string filename, Intellua parent, Dictionary<string, int> required) { if (s_files.ContainsKey(filename)) { FileParser afp = s_files[filename]; if (!afp.modified()) { return afp; } else { System.Diagnostics.Debug.Print("modified"); } } System.Diagnostics.Debug.Print("parse file " + filename); IntelluaSource source = new IntelluaSource(filename, parent); FileParser fp = new FileParser(source); foreach (var kv in required) { fp.m_required[kv.Key] = kv.Value; } fp.parse(true); s_files[filename] = fp; return fp; }
public IntelluaSource(Intellua intellua, bool copy = false) { m_copy = copy; pos = intellua.CurrentPos; m_intellua = intellua; m_filepath = m_intellua.FilePath; if (copy) { m_text = intellua.Text; rawText = intellua.RawText; ScintillaNET.Range range = new ScintillaNET.Range(0, rawText.Length, intellua); styledText = range.StyledText; } }
public IntelluaSource(string filename, Intellua parent) { m_copy = true; pos = 0; m_intellua = new Intellua(); m_intellua.Parse = false; m_intellua.AutoCompleteData.setParent(parent.AutoCompleteData.getParent()); m_intellua.Text = System.IO.File.ReadAllText(filename); m_intellua.FilePath = filename; m_filepath = m_intellua.FilePath; m_text = m_intellua.Text; rawText = m_intellua.RawText; ScintillaNET.Range range = new ScintillaNET.Range(0, rawText.Length, m_intellua); styledText = range.StyledText; }