Ejemplo n.º 1
0
        Document InternalInformDocumentOpen(DocumentId documentId, ITextDocument editor)
        {
            var document = this.GetDocument(documentId);

            if (document == null || IsDocumentOpen(documentId))
            {
                return(document);
            }
            var monoDevelopSourceTextContainer = new MonoDevelopSourceTextContainer(documentId, editor);

            lock (openDocuments) {
                openDocuments.Add(monoDevelopSourceTextContainer);
            }
            OnDocumentOpened(documentId, monoDevelopSourceTextContainer);
            return(document);
        }
Ejemplo n.º 2
0
        internal void InformDocumentOpen(DocumentId documentId, ITextDocument editor)
        {
            var document = this.GetDocument(documentId);

            if (document == null)
            {
                return;
            }
            if (IsDocumentOpen(documentId))
            {
                InformDocumentClose(documentId, document.FilePath);
            }
            var monoDevelopSourceTextContainer = new MonoDevelopSourceTextContainer(documentId, editor);

            lock (openDocuments) {
                openDocuments.Add(monoDevelopSourceTextContainer);
            }
            OnDocumentOpened(documentId, monoDevelopSourceTextContainer);
        }
Ejemplo n.º 3
0
		Document InternalInformDocumentOpen (DocumentId documentId, ITextDocument editor)
		{
			var document = this.GetDocument (documentId);
			if (document == null || IsDocumentOpen (documentId)) {
				return document;
			}
			var monoDevelopSourceTextContainer = new MonoDevelopSourceTextContainer (documentId, editor);
			lock (openDocuments) {
				openDocuments.Add (monoDevelopSourceTextContainer);
			}
			OnDocumentOpened (documentId, monoDevelopSourceTextContainer);
			return document;
		}
Ejemplo n.º 4
0
 public ChangedSourceText(ITextSnapshot buffer, Encoding encoding, MonoDevelopSourceTextContainer container)
 {
     this.buffer    = buffer;
     this.encoding  = encoding;
     this.container = container;
 }
Ejemplo n.º 5
0
 public static SourceText Create(TextEditor editor, MonoDevelopSourceTextContainer container)
 {
     return(new ChangedSourceText(editor.GetPlatformTextBuffer().CurrentSnapshot, editor.Encoding, container));
 }