public void ApplyDefaultSourceFileHighlighting() { // Remove hover marker LineMarker?.RemoveHighlightMarker(); // Add default marker instead LineMarker?.AddHighlightMarker(DefaultSourceHighlightColor); }
internal void RemoveMarkers() { LineMarker?.RemoveHighlightMarker(); foreach (AnnotatedCodeLocationModel location in Locations) { location.LineMarker?.RemoveHighlightMarker(); } foreach (AnnotatedCodeLocationModel location in RelatedLocations) { location.LineMarker?.RemoveHighlightMarker(); } foreach (CallTree callTree in CallTrees) { Stack <CallTreeNode> nodesToProcess = new Stack <CallTreeNode>(); foreach (CallTreeNode topLevelNode in callTree.TopLevelNodes) { nodesToProcess.Push(topLevelNode); } while (nodesToProcess.Count > 0) { CallTreeNode current = nodesToProcess.Pop(); try { current.LineMarker?.RemoveHighlightMarker(); } catch (ArgumentException) { // An argument exception is thrown if the node does not have a region. // Since there's no region, there's no document to attach to. // Just move on with processing the child nodes. } foreach (CallTreeNode childNode in current.Children) { nodesToProcess.Push(childNode); } } } foreach (StackCollection stackCollection in Stacks) { foreach (StackFrameModel stackFrame in stackCollection) { stackFrame.LineMarker?.RemoveHighlightMarker(); } } }
/// <summary> /// A method for handling the event when this object is selected /// </summary> public void ApplySelectionSourceFileHighlighting() { // Remove previous highlighting and replace with hover color LineMarker?.RemoveHighlightMarker(); LineMarker?.AddHighlightMarker(SelectedSourceHighlightColor); }