public bool Navigate(Document doc, int start, int end, bool arrow) { if (SetActive(doc)) { var editor = App.Editor() as ITextEditor; if (editor != null) { editor.SelectText(start, end); if (arrow) { var sci = editor.Control as ScintillaControl; if (sci != null) sci.PutArrow(sci.GetLineFromPosition(start)); } return true; } else return false; } else return false; }
public bool Navigate(Document doc, int line, int col, int length, bool arrow) { if (SetActive(doc)) { var editor = App.Editor() as ITextEditor; if (editor != null) { editor.SelectText(line, col, length); if (arrow) { var sci = editor.Control as ScintillaControl; if (sci != null) sci.PutArrow(line); } return true; } else return false; } else return false; }
public ResultItem(string text, Document doc, int line, int col, int length) { Text = text; Document = doc; Line = line; Column = col; Length = length; }
public MessageItem(MessageItemType type, string message, Document doc, int line, int col) { Type = type; Message = message; Document = doc; Line = line; Column = col; }
internal CompiledAssembly(Document rootDoc, CodeAssembly asm) { Assembly = asm; Units = Assembly.EnumerateModules() .Select(n => Assembly.GetModule(Assembly.GetModuleHandle(n))) .Select(m => new CompiledUnit(new VirtualDocument(m.File), m)) .ToList(); var root = Assembly.GetRootModule(); MainUnit = new CompiledUnit(rootDoc, root); }
internal BuildLogger(IApp app, Document doc, ScintillaControl sci, BuildOptions options) { this.app = app; this.doc = doc; this.sci = sci; this.options = options; app.CloseView("ErrorList"); this.err = app.GetService<IErrorListService>(); this.output = app.GetService<IOutputService>(); }
internal CompiledUnit(Document doc, CodeFrame codeFrame) { CodeFrame = codeFrame; Document = doc; if (codeFrame != null) { Globals = ExtractNames(codeFrame).ToList(); Classes = codeFrame.Classes.Select(kv => new TypeClass(kv.Key, kv.Value, GetLocation("$$$" + kv.Key))).ToList(); Instances = codeFrame.Instances.Select(i => new TypeClassInstance(i.Class, i.Type, new Location(i.Line, i.Column))); Types = codeFrame.Types.Select(s => new UserType(s, GetLocation("$$" + s))); References = codeFrame.References.Where(r => !r.Key.StartsWith("$__")).Select(r => new Reference(this, r.Value)).ToList(); } }
public void Save(Document doc, FileInfo fileInfo) { }
public void ReloadDocument(Document doc, bool silent) { }
public void OpenDocument(Document doc) { if (doc != WelcomePageDocument.Instance) throw new ElideException("Unable to open document '{0}'.", doc.Title); }
public void CloseDocument(Document doc) { }
public void OpenDocument(Document doc) { control.SetContent(ReadFile(doc.FileInfo)); OpenDocument(doc.FileInfo); }
public DocumentEventArgs(Document doc) { Document = doc; }
public CodeException(Document doc, int line, string message) { this.message = message; Document = doc; Line = line; }
public CodeException(Document doc, int line, Exception ex) { this.ex = ex; Document = doc; Line = line; }
public bool SetActive(Document doc) { var docSrv = App.GetService<IDocumentService>(); if (!docSrv.SetActiveDocument(doc)) return SetActive(doc.FileInfo); else return true; }
private void DocumentOpened(Document doc) { var inf = App.EditorInfo(doc); var wrap = default(BackgroundCompiler); if (inf.Instance is ICodeEditor && CompilerInstances.TryGetValue(inf.Key, out wrap) && EnableBackgroundCompilation) wrap.CompileAlways((CodeDocument)doc); }