DocumentTask Class

Definition

Important

This API is not CLS-compliant.

Represents an item for a language service in the Error List Options window.

public ref class DocumentTask : Microsoft::VisualStudio::Shell::ErrorTask, IDisposable, Microsoft::VisualStudio::TextManager::Interop::IVsTextMarkerClient
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.ComVisible(true)]
public class DocumentTask : Microsoft.VisualStudio.Shell.ErrorTask, IDisposable, Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient
[System.Runtime.InteropServices.ComVisible(true)]
public class DocumentTask : Microsoft.VisualStudio.Shell.ErrorTask, IDisposable, Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient
[<System.CLSCompliant(false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type DocumentTask = class
    inherit ErrorTask
    interface IVsTextMarkerClient
    interface IDisposable
[<System.Runtime.InteropServices.ComVisible(true)>]
type DocumentTask = class
    inherit ErrorTask
    interface IVsTextMarkerClient
    interface IDisposable
Public Class DocumentTask
Inherits ErrorTask
Implements IDisposable, IVsTextMarkerClient
Inheritance
DocumentTask
Inheritance
Attributes
Implements

Remarks

This class is a specialized version of the ErrorTask class and represents an item that reports a problem in the parsing of the current source file. In addition, it supports the functionality of jumping to the line that caused the error. This class overrides the ErrorTask and Task base classes and creates an IVsTextLineMarker object that manages a span in a buffer and provides custom navigation to the source of the error.

Notes to Inheritors

This class contains all the functionality that is required to manage an item in the Error List Options window. You can derive from this class to change marker command behaviors. Beyond this, you do not have to derive from this class.

Notes to Callers

An instance of this class is created in the Microsoft.VisualStudio.Package.Source.CreateErrorTaskItem(Microsoft.VisualStudio.TextManager.Interop.IVsTextLineMarker,Microsoft.VisualStudio.TextManager.Interop.TextSpan,System.String) method in the Source class. The Source class uses the DocumentTask class to show all warnings and errors that are produced by the language service parser. Typically, the Source class handles all instances of the DocumentTask class internally.

Constructors

DocumentTask(IServiceProvider, IVsTextLines, MARKERTYPE, TextSpan, String)

Initializes a new instance of DocumentTask for the specified text buffer, text span, and file name.

Fields

contextNameKeyword

Represents the keyword for the user context. This field is constant.

(Inherited from Task)
contextNameKeyword (Inherited from TaskListItem)

Properties

CanDelete

Gets or sets whether or not the task can be deleted.

(Inherited from Task)
CanDelete (Inherited from TaskListItem)
Category

Gets or sets the task's category.

(Inherited from Task)
Category (Inherited from TaskListItem)
Checked

Gets or sets whether not the task's check box is currently selected or cleared.

(Inherited from Task)
Checked (Inherited from TaskListItem)
Column

Gets or sets the column number within the file associated with the task.

(Inherited from Task)
Column (Inherited from TaskListItem)
Document

Gets or sets the file associated with the task.

(Inherited from Task)
Document (Inherited from TaskListItem)
ErrorCategory

Gets or sets the error category associated with this task.

(Inherited from ErrorTask)
HelpKeyword

Gets or sets the Help keyword associated with the task.

(Inherited from Task)
HelpKeyword (Inherited from TaskListItem)
HierarchyItem

Gets or sets the hierarchy item associated with this task.

(Inherited from ErrorTask)
ImageIndex

Gets or sets the index of the image associated with the task.

(Inherited from Task)
ImageIndex (Inherited from TaskListItem)
IsCheckedEditable

Gets or sets whether or not it is possible to edit the checked state of the task.

(Inherited from Task)
IsCheckedEditable (Inherited from TaskListItem)
IsMarkerValid

Gets whether the marker has been set to invalid.

IsPriorityEditable

Gets or sets whether or not it is possible to edit the priority of a task.

(Inherited from Task)
IsPriorityEditable (Inherited from TaskListItem)
IsTextEditable

Gets or sets whether or not it is possible to edit the description of a task.

(Inherited from Task)
IsTextEditable (Inherited from TaskListItem)
Line

Gets or sets the line number of the file associated with the task.

(Inherited from Task)
Line (Inherited from TaskListItem)
Priority

Gets or sets the priority of a task.

(Inherited from Task)
Priority (Inherited from TaskListItem)
Site

Gets the service provider.

Span

Gets the span where the error occurred.

SubcategoryIndex

Gets or sets the index of the subcategory of the task.

(Inherited from Task)
SubcategoryIndex (Inherited from TaskListItem)
Text

Gets or sets the description of a task.

(Inherited from Task)
Text (Inherited from TaskListItem)
TextLineMarker

Returns the text line marker object that describes the location of the error.

Methods

Dispose()

Recovers resources just before the DocumentTask object is destroyed.

Dispose(Boolean)

Recovers resources just before the DocumentTask object is destroyed.

ExecMarkerCommand(IVsTextMarker, Int32)

Executes a command on a specific marker in the text buffer.

Finalize()

Recovers resources just before the DocumentTask object is destroyed.

GetMarkerCommandInfo(IVsTextMarker, Int32, String[], UInt32[])

Queries the marker for the command information.

GetTipText(IVsTextMarker, String[])

Gets the tip text for the text marker that is displayed when the mouse hovers over the marker.

GetUserContext(IVsUserContext)

Creates a new user context.

(Inherited from Task)
GetUserContext(IVsUserContext) (Inherited from TaskListItem)
MarkerInvalidated()

Called when the text that is associated with a marker is deleted by a user action.

OnAfterMarkerChange(IVsTextMarker)

Signals that the marker position has changed.

OnAfterSpanReload()

Signals that the text under the marker has been altered but the marker has not been deleted.

OnBeforeBufferClose()

Sends notification that the text buffer is about to close.

OnBufferSave(String)

Called when the buffer has been saved.

OnDeleted(EventArgs)

Raised when the task has been deleted.

(Inherited from Task)
OnDeleted(EventArgs) (Inherited from TaskListItem)
OnHelp(EventArgs)

Raised when the user requests Help; for example by right-clicking and selecting Show Error Help.

(Inherited from Task)
OnHelp(EventArgs) (Inherited from TaskListItem)
OnNavigate(EventArgs)

Loads the document that is associated with the error and jumps to the location of the error.

OnRemoved(EventArgs)

Called when this DocumentTask object is removed from the Error List Options window.

Events

Deleted

Handles OnDeleted(EventArgs) events.

(Inherited from Task)
Deleted (Inherited from TaskListItem)
Help

Handles OnHelp(EventArgs) events.

(Inherited from Task)
Help (Inherited from TaskListItem)
Navigate

Handles OnNavigate(EventArgs) events.

(Inherited from Task)
Navigate (Inherited from TaskListItem)
Removed

Handles OnRemoved(EventArgs) events.

(Inherited from Task)
Removed (Inherited from TaskListItem)

Explicit Interface Implementations

IVsErrorItem.GetCategory(UInt32)

Gets the category of the error.

(Inherited from ErrorTask)
IVsErrorItem.GetHierarchy(IVsHierarchy)

Gets the hierarchy node associated with the task.

(Inherited from ErrorTask)
IVsTaskItem.CanDelete(Int32)

Gets whether or not it is possible to delete the task.

(Inherited from Task)
IVsTaskItem.CanDelete(Int32) (Inherited from TaskListItem)
IVsTaskItem.Category(VSTASKCATEGORY[])

Sets the task category.

(Inherited from Task)
IVsTaskItem.Category(VSTASKCATEGORY[]) (Inherited from TaskListItem)
IVsTaskItem.Column(Int32)

Gets the column number of the file associated with the task.

(Inherited from Task)
IVsTaskItem.Column(Int32) (Inherited from TaskListItem)
IVsTaskItem.Document(String)

Gets the name of the file associated with the task.

(Inherited from Task)
IVsTaskItem.Document(String) (Inherited from TaskListItem)
IVsTaskItem.get_Checked(Int32)

Determines whether the task item's check box is currently selected or cleared.

(Inherited from Task)
IVsTaskItem.get_Checked(Int32) (Inherited from TaskListItem)
IVsTaskItem.get_Priority(VSTASKPRIORITY[])

Gets the priority of the task.

(Inherited from Task)
IVsTaskItem.get_Priority(VSTASKPRIORITY[]) (Inherited from TaskListItem)
IVsTaskItem.get_Text(String)

Gets the description of the task.

(Inherited from Task)
IVsTaskItem.get_Text(String) (Inherited from TaskListItem)
IVsTaskItem.HasHelp(Int32)

Determines whether or not the task has associated help.

(Inherited from Task)
IVsTaskItem.HasHelp(Int32) (Inherited from TaskListItem)
IVsTaskItem.ImageListIndex(Int32)

Gets the index of the image associated with the task.

(Inherited from Task)
IVsTaskItem.ImageListIndex(Int32) (Inherited from TaskListItem)
IVsTaskItem.IsReadOnly(VSTASKFIELD, Int32)

Determines whether or not the specified task field is read-only.

(Inherited from Task)
IVsTaskItem.IsReadOnly(VSTASKFIELD, Int32) (Inherited from TaskListItem)
IVsTaskItem.Line(Int32)

Gets the line number of the file associated with the task.

(Inherited from Task)
IVsTaskItem.Line(Int32) (Inherited from TaskListItem)
IVsTaskItem.NavigateTo()

Opens a file associated with a task and moves to the appropriate position in the file.

(Inherited from Task)
IVsTaskItem.NavigateTo() (Inherited from TaskListItem)
IVsTaskItem.NavigateToHelp()

Opens the Help resource associated with a task.

(Inherited from Task)
IVsTaskItem.NavigateToHelp() (Inherited from TaskListItem)
IVsTaskItem.OnDeleteTask()

Raised when a task has been deleted.

(Inherited from Task)
IVsTaskItem.OnDeleteTask() (Inherited from TaskListItem)
IVsTaskItem.OnFilterTask(Int32)

Raised when a task has been filtered into or out of a view.

(Inherited from Task)
IVsTaskItem.OnFilterTask(Int32) (Inherited from TaskListItem)
IVsTaskItem.put_Checked(Int32)

Sets whether a task item's check box is selected or cleared.

(Inherited from Task)
IVsTaskItem.put_Checked(Int32) (Inherited from TaskListItem)
IVsTaskItem.put_Priority(VSTASKPRIORITY)

Sets the priority level of a task item.

(Inherited from Task)
IVsTaskItem.put_Priority(VSTASKPRIORITY) (Inherited from TaskListItem)
IVsTaskItem.put_Text(String)

Sets the description of the task.

(Inherited from Task)
IVsTaskItem.put_Text(String) (Inherited from TaskListItem)
IVsTaskItem.SubcategoryIndex(Int32)

Gets the index of the task in the subcategory list.

(Inherited from Task)
IVsTaskItem.SubcategoryIndex(Int32) (Inherited from TaskListItem)

Applies to