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;
        }
Example #3
0
 public ResultItem(string text, Document doc, int line, int col, int length)
 {
     Text = text;
     Document = doc;
     Line = line;
     Column = col;
     Length = length;
 }
Example #4
0
 public MessageItem(MessageItemType type, string message, Document doc, int line, int col)
 {
     Type = type;
     Message = message;
     Document = doc;
     Line = line;
     Column = col;
 }
Example #5
0
 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);
 }
Example #6
0
        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>();
        }
Example #7
0
        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();
            }
        }
Example #8
0
 public void Save(Document doc, FileInfo fileInfo)
 {
 }
Example #9
0
 public void ReloadDocument(Document doc, bool silent)
 {
 }
Example #10
0
 public void OpenDocument(Document doc)
 {
     if (doc != WelcomePageDocument.Instance)
         throw new ElideException("Unable to open document '{0}'.", doc.Title);
 }
Example #11
0
 public void CloseDocument(Document doc)
 {
 }
Example #12
0
 public void OpenDocument(Document doc)
 {
     control.SetContent(ReadFile(doc.FileInfo));
     OpenDocument(doc.FileInfo);
 }
Example #13
0
 public DocumentEventArgs(Document doc)
 {
     Document = doc;
 }
Example #14
0
 public CodeException(Document doc, int line, string message)
 {
     this.message = message;
     Document = doc;
     Line = line;
 }
Example #15
0
 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);
        }