public Task(TaskManager taskManager , string description, string tipText, string code, string helpKeyword , TaskPriority priority, TaskCategory category, TaskMarker markerType , Location loc , ITaskCommands commands ) { this.taskManager = taskManager; this.code = code; this.description = description; this.tipText = ((tipText == null || tipText.Length == 0) ? description : tipText); this.helpKeyword = helpKeyword; this.priority = priority; this.category = category; this.markerType = markerType; this.commands = commands; location = (loc == null ? new Location(null, null) : loc); initLoc = location.Clone(); persistLoc = location.Clone(); // isChecked = false; // isDeleted = false; // marker = null; // Create markers if the document is already opened. IVsTextLines textLines = location.GetTextLines(false); if (textLines != null) { OnOpenFile(textLines, false); } }
public void OnBufferSave(string pszFileName) { if (location != null) { location.OnRename(pszFileName); persistLoc = location.Clone(); // save the persistent span } }
public void OnBeforeBufferClose() { if (persistLoc != null) { location = persistLoc.Clone(); // back to persistent span if (marker != null) { marker.Invalidate(); marker = null; } } }