private void Workspace_DocumentOpened(object sender, DocumentEventArgs e) { lock (_gate) { _openDocumentContexts.Add(e.Document.Id, Task.Run(() => GetConventionContextAsync(e.Document.FilePath, CancellationToken.None))); } }
void HandleDocumentClosed (object sender, DocumentEventArgs e) { if (e.Document == null || e.Document.Editor == null || e.Document.Editor.Parent == null) return; e.Document.Editor.Parent.ButtonReleaseEvent -= HandleButtonReleaseEvent; e.Document.Editor.Parent.MotionNotifyEvent -= HandleMotionNotifyEvent; }
private void OnDocumentActiveContextChanged(object sender, DocumentEventArgs e) { var document = SubjectBuffer.AsTextContainer().GetOpenDocumentInCurrentContext(); if (document != null && document.Id == e.Document.Id) { this.RaiseChanged(); } }
private void OnDocumentOpened(object sender, DocumentEventArgs e) { InvokeBelowInputPriority(() => { if (!_isDisposed) { SetReadOnly(e.Document); } }); }
private void OnDocumentClosed(object sender, DocumentEventArgs e) { // The buffer is gone by now, so we don't need to remove the read-only region from it, just clean up our dictionary. InvokeBelowInputPriority(() => { if (_readOnlyRegions != null) { _readOnlyRegions.Remove(e.Document.Id); } }); }
private void Workspace_DocumentClosed(object sender, DocumentEventArgs e) { lock (_gate) { if (_openDocumentContexts.TryGetValue(e.Document.Id, out var contextTask)) { _openDocumentContexts.Remove(e.Document.Id); // Ensure we dispose the context, which we'll do asynchronously contextTask.ContinueWith( t => t.Result.Dispose(), CancellationToken.None, TaskContinuationOptions.OnlyOnRanToCompletion, TaskScheduler.Default); } } }
void HandleDocumentOpened (object sender, DocumentEventArgs e) { if (!(e.Document.Project is DotNetProject) || !e.Document.IsFile) return; string ext = e.Document.FileName; if (!ext.EndsWith (".addin.xml") && !ext.EndsWith (".addin")) return; var data = AddinData.GetAddinData ((DotNetProject)e.Document.Project); if (data != null) { IWorkbenchWindow window = e.Document.Window; var adesc = data.AddinRegistry.ReadAddinManifestFile (e.Document.FileName); window.AttachViewContent (new ExtensionEditorView (adesc, data)); window.AttachViewContent (new ExtensionPointsEditorView (adesc, data)); } }
void CANAPEProject_DocumentAdded(object sender, DocumentEventArgs e) { AddEntryToTree(e.Document); }
private void OnActiveContextChanged(object sender, DocumentEventArgs e) { // REVIEW: it would be nice for changed event to pass in both old and new document. OnSuggestedActionsChanged(e.Document.Project.Solution.Workspace, e.Document.Id, e.Document.Project.Solution.WorkspaceVersion); }
private void events_DocumentClosing(DocumentEventArgs ea) { UpdateMarkerList(); }
private void OnDocumentClosed(object sender, DocumentEventArgs e) { var asyncToken = _listener.BeginAsyncOperation("OnDocumentClosed"); _eventProcessingQueue.ScheduleTask( () => EnqueueWorkItemAsync(e.Document, InvocationReasons.DocumentClosed), _shutdownToken).CompletesAsyncOperation(asyncToken); }
/// <summary> /// The event handler that occurs before you save the document. /// </summary> /// <param name="args"></param> protected override void SavingDocumentEventHandler(DocumentEventArgs args) { VariablesEventHandler(); }
private void Colorizer_Plugin_DocumentActivated(DocumentEventArgs ea) { _paintableElements.Clear(); }
private void OnDocumentClosed(object?sender, DocumentEventArgs e) { _eventProcessingQueue.ScheduleTask("OnDocumentClosed", () => EnqueueDocumentWorkItemAsync(e.Document.Project, e.Document.Id, e.Document, InvocationReasons.DocumentClosed), _shutdownToken); }
/// <summary> /// Rebuilds the list of documents after a document is opened or closed /// </summary> private void HandleDocumentOpenedOrClosed(object sender, DocumentEventArgs e) { RebuildDocumentList(); }
private void OnDocumentActiveContextChanged(object sender, DocumentEventArgs e) { Reanalyze(e.Document.Project.Solution.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(e.Document.Id), highPriority: true); }
void OnDocumentClosed(Document doc) { var e = new DocumentEventArgs(doc); DocumentClosed?.SafeInvoke(this, e); }
void OnDocumentOpened(DocumentEventArgs e) { DocumentOpened?.SafeInvoke(this, e); }
/// <summary>The document document changed.</summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> private void DocumentDocumentChanged(object sender, DocumentEventArgs e) { IsDirty = true; }
void CANAPEProject_DocumentRenamed(object sender, DocumentEventArgs e) { if (InvokeRequired) { Invoke(new EventHandler<DocumentEventArgs>(CANAPEProject_DocumentRenamed), sender, e); } else { if(_documentToNode.ContainsKey(e.Document.Uuid)) { _documentToNode[e.Document.Uuid].Text = e.Document.Name; OnDocumentRenamed(e.Document); } } }
/// <summary> /// The event handler is creating a new document. /// </summary> /// <param name="args"></param> protected override void NewDocumentCreatedEventHandler(DocumentEventArgs args) { args.Document.AttachPlugin(this); }
private void RhinoDoc_DocumentPropertiesChanged(object sender, DocumentEventArgs e) { //The document has been changed, we need to look at our doc strings the next time rhino is idle. UpdateStrings = true; }
void WorkbenchDocumentClosed (object sender, DocumentEventArgs e) { e.Document.DocumentParsed -= HandleDocumentParsed; }
private void state_ResolveDocumentClient(object sender, DocumentEventArgs e) { e.Document.Client = GetTextBox(); }
private void events_DocumentSaved(DocumentEventArgs ea) { if (Options.Storage.ReadBoolean(Options.GetPageName(), Options.FormatOnSave)) CodeRush.Command.Execute("Edit.FormatDocument"); }
private void OnDocumentOpened(object sender, DocumentEventArgs args) { EnqueueProcessSnapshotAsync(args.Document.Id); }
private void OnDocumentOpened(object sender, DocumentEventArgs args) { this.Parse(args.Document); }
private void OnDocumentClosed(object sender, DocumentEventArgs args) { Rebuild(args.Document.Project.Solution, args.Document.Project.Id); }
private void OnDocumentActiveContextChanged(object sender, DocumentEventArgs e) { Reanalyze(e.Document.Project.Solution.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(e.Document.Id)); }
void tabbedView_DocumentClosed(object sender, DocumentEventArgs e) { RecreateUserControls(e); SetAccordionSelectedElement(e); }
private void DocumentOpened(object?sender, DocumentEventArgs e) => _ = TrackActiveSpansAsync(e.Document, _cancellationSource.Token);
void _editorController_ActiveDocumentChanged(object sender, DocumentEventArgs e) { _service.ActiveDocument = e.Document; }
private void modelExplorer_DocumentOpening(object sender, DocumentEventArgs e) { docManager.AddOrActivate(e.Document); }
private void OnCloseDocument(object sender, DocumentEventArgs e) { IsolateIndex = 0; }
void CANAPEProject_DocumentDeleted(object sender, DocumentEventArgs e) { //if (InvokeRequired) //{ // Invoke(new EventHandler<DocumentEventArgs>(CANAPEProject_DocumentDeleted), sender, e); //} //else //{ // TreeNode folder = GetFolderNodeForDocument(e.Document); // if (folder != null) // { // foreach (TreeNode node in folder.Nodes) // { // if (node.Tag == e.Document) // { // node.Remove(); // break; // } // } // } //} }
private void OnDocumentOpened(object sender, DocumentEventArgs e) { InvokeBelowInputPriority(() => TrackDocument(e.Document.Id)); }
/// <summary> /// The event handler that occurs before closing the document. /// </summary> /// <param name="args"></param> protected override void ClosingDocumentEventHandler(DocumentEventArgs args) { //.. }
private void OnDocumentChangedDoUpdateContextMenu(object sender, DocumentEventArgs e) { bool isVisible = (Document.TotalNumberOfLines > ActiveTextAreaControl.TextArea.TextView.VisibleLineCount); ActiveTextAreaControl.VScrollBar.Visible = isVisible; }
/// <summary> /// The event handler open the document. /// </summary> /// <param name="args"></param> protected override void DocumentOpenEventHandler(DocumentEventArgs args) { args.Document.AttachPlugin(this); }
private void PlugIn1_DocumentActivated(DocumentEventArgs ea) { _ImplementsIDisposable.Clear(); }
private void DocEventsOnDocumentOpened(object sender, DocumentEventArgs args) { try { var solution = GetSolution(); if (solution == null) return; HandleActivity(args.Document.FileName, false); } catch (Exception ex) { Logger.Instance.Error("DocEventsOnDocumentOpened : " + ex.Message); } }
private void DocumentOpened(object sender, DocumentEventArgs e) { _ = DocumentOpenedAsync(e.Document); }
void WorkbenchDocumentOpened (object sender, DocumentEventArgs e) { e.Document.DocumentParsed += HandleDocumentParsed; }
private void OnDocumentClosed(object?sender, DocumentEventArgs e) => ClearVersionMap(e.Document.Project.Solution.Workspace, e.Document.Id);
private void OnDocumentChanged(object sender, DocumentEventArgs e) { OnDocumentChanged(e.Document.Id); }
private void RhinoDoc_NewDocument(object sender, DocumentEventArgs e) { Debug.WriteLine("New document event"); NotifySpeckleFrame("purge-clients", "", ""); RemoveAllClients(); }
private void DocumentOpened(object sender, DocumentEventArgs e) { ITextSnapshot snapshot; ImmutableArray<ActiveStatementSpan> activeStatements; if (_editSession.BaseActiveStatements.TryGetValue(e.Document.Id, out activeStatements) && TryGetSnapshot(e.Document, out snapshot)) { lock (_trackingSpans) { TrackActiveSpansNoLock(e.Document, snapshot, activeStatements); } bool leafChanged = activeStatements.Contains(a => (a.Flags & ActiveStatementFlags.LeafFrame) != 0); _service.OnTrackingSpansChanged(leafChanged); } }
/// <summary> /// Called when Rhino closes the active document /// </summary> public static void OnCloseDocument(object sender, DocumentEventArgs e) { DebugWriteMethod(); }
private void OnDocumentClosed(object sender, DocumentEventArgs args) { this.CancelParse(args.Document.Id); }
/// <summary> /// Called when the properties of the active document are changed /// </summary> void OnDocumentPropertiesChanged(object sender, DocumentEventArgs e) { DebugWriteMethod(); }
private void OnDocumentOpened(object sender, DocumentEventArgs args) { if (_workspace != null) { ParseIfThisDocument(null, args.Document.Project.Solution, args.Document.Id); } }
private void OnDocumentClosed(object sender, DocumentEventArgs e) { ClearVersionMap(e.Document.Project.Solution.Workspace, e.Document.Id); }
private static void OnDocumentClosed(object sender, DocumentEventArgs e) { if (!e.Document.IsFromPrimaryBranch()) { return; } ConditionalWeakTable<DocumentId, SyntaxTreeIdentifierInfo> infoTable; if (cache.TryGetValue(e.Document.Project.Solution.BranchId, out infoTable)) { // remove closed document from primary branch from live cache. infoTable.Remove(e.Document.Id); } }
private void Document_DocumentChanged(object sender, DocumentEventArgs e) { textChanged = true; }
private void DocumentChanged(object sender, DocumentEventArgs e) { // reset markers table markersTable.Clear(); Document.UpdateSegmentListOnDocumentChange(textMarker, e); }
static void OnDisableConditionalCompilation (DocumentEventArgs e) { EventHandler<DocumentEventArgs> handler = DisableConditionalCompilation; if (handler != null) handler (null, e); }