Export (0) Print
Expand All

DocumentTask Class

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

This API is not CLS-compliant. 

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)

[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public class DocumentTask : ErrorTask, 
	IVsTextMarkerClient, IDisposable

The DocumentTask type exposes the following members.

  NameDescription
Public methodDocumentTaskInitializes a new instance of DocumentTask for the specified text buffer, text span, and file name.
Top

  NameDescription
Public propertyCanDeleteGets or sets whether or not the task can be deleted. (Inherited from Task.)
Public propertyCategoryGets or sets the task's category. (Inherited from Task.)
Public propertyCheckedGets or sets whether not the task's check box is currently selected or cleared. (Inherited from Task.)
Public propertyColumnGets or sets the column number within the file associated with the task. (Inherited from Task.)
Public propertyDocumentGets or sets the file associated with the task. (Inherited from Task.)
Public propertyErrorCategoryGets or sets the error category of this task. (Inherited from ErrorTask.)
Public propertyHelpKeywordGets or sets the Help keyword associated with the task. (Inherited from Task.)
Public propertyHierarchyItemGets or sets the hierarchy item associated with this task. (Inherited from ErrorTask.)
Public propertyImageIndexGets or sets the index of the image associated with the task. (Inherited from Task.)
Public propertyIsCheckedEditableGets or sets whether or not it is possible to edit the checked state of the task. (Inherited from Task.)
Public propertyIsMarkerValidGets whether the marker has been set to invalid.
Public propertyIsPriorityEditableGets or sets whether or not it is possible to edit the priority of a task. (Inherited from Task.)
Public propertyIsTextEditableGets or sets whether or not it is possible to edit the description of a task. (Inherited from Task.)
Public propertyLineGets or sets the line number of the file associated with the task. (Inherited from Task.)
Public propertyPriorityGets or sets the priority of a task. (Inherited from Task.)
Public propertySiteGets the service provider.
Public propertySpanGets the span where the error occurred.
Public propertySubcategoryIndexGets or sets the index of the subcategory of the task. (Inherited from Task.)
Public propertyTextGets or sets the description of a task. (Inherited from Task.)
Public propertyTextLineMarkerReturns the text line marker object that describes the location of the error.
Top

  NameDescription
Public methodDispose()Recovers resources just before the DocumentTask object is destroyed.
Protected methodDispose(Boolean)Recovers resources just before the DocumentTask object is destroyed.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExecMarkerCommandExecutes a command on a specific marker in the text buffer.
Protected methodFinalizeRecovers resources just before the DocumentTask object is destroyed. (Overrides Object.Finalize().)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetMarkerCommandInfoQueries the marker for the command information.
Public methodGetTipTextGets the tip text for the text marker that is displayed when the mouse hovers over the marker.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetUserContextCreates a new user context. (Inherited from Task.)
Public methodMarkerInvalidatedCalled when the text that is associated with a marker is deleted by a user action.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodOnAfterMarkerChangeSignals that the marker position has changed.
Public methodOnAfterSpanReloadSignals that the text under the marker has been altered but the marker has not been deleted.
Public methodOnBeforeBufferCloseSends notification that the text buffer is about to close.
Public methodOnBufferSaveCalled when the buffer has been saved.
Protected methodOnDeletedRaised when the task has been deleted. (Inherited from Task.)
Protected methodOnHelpRaised when the user requests Help; for example by right-clicking and selecting Show Error Help. (Inherited from Task.)
Protected methodOnNavigateLoads the document that is associated with the error and jumps to the location of the error. (Overrides Task.OnNavigate(EventArgs).)
Protected methodOnRemovedCalled when this DocumentTask object is removed from the Error List Options window. (Overrides Task.OnRemoved(EventArgs).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public eventDeletedHandles OnDeleted events. (Inherited from Task.)
Public eventHelpHandles OnHelp events. (Inherited from Task.)
Public eventNavigateHandles OnNavigate events. (Inherited from Task.)
Public eventRemovedHandles OnRemoved events. (Inherited from Task.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIVsTaskItem.CanDeleteGets whether or not it is possible to delete the task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.CategorySets the task category. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.ColumnGets the column number of the file associated with the task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.DocumentGets the name of the file associated with the task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.get_CheckedDetermines whether the task item's check box is currently selected or cleared. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.get_PriorityGets the priority of the task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.get_TextGets the description of the task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsErrorItem.GetCategoryGets the category of the error. (Inherited from ErrorTask.)
Explicit interface implemetationPrivate methodIVsErrorItem.GetHierarchyGets the hierarchy node associated with the task. (Inherited from ErrorTask.)
Explicit interface implemetationPrivate methodIVsTaskItem.HasHelpDetermines whether or not the task has associated help. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.ImageListIndexGets the index of the image associated with the task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.IsReadOnlyDetermines whether or not the specified task field is read-only. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.LineGets the line number of the file associated with the task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.NavigateToOpens a file associated with a task and moves to the appropriate position in the file. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.NavigateToHelpOpens the Help resource associated with a task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.OnDeleteTaskRaised when a task has been deleted. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.OnFilterTaskRaised when a task has been filtered into or out of a view. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.put_CheckedSets whether a task item's check box is selected or cleared. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.put_PrioritySets the priority level of a task item. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.put_TextSets the description of the task. (Inherited from Task.)
Explicit interface implemetationPrivate methodIVsTaskItem.SubcategoryIndexGets the index of the task in the subcategory list. (Inherited from Task.)
Top

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 Implementers

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 CreateErrorTaskItem 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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft