Share via


Dynamic Help Window Implementation

The Dynamic Help window provides a list of topics specific to the area of the integrated development environment (IDE) a user is working in or the task a user is trying to finish.

Dynamic Help window

The Dynamic Help window is updated by the IDE's context service. At the appropriate time, which is typically at idle time, the context service collects context and subcontext from each active context provider and adds them to the active context collection. For more information about the active context providers, see Active Context.

During idle time, only context and subcontext marked as having changed since the last update are passed through to the active context collection during this collection. The change in context is determined by the status of the SetDirty flag on each context or subcontext bag in the active selection. This flag is automatically set to TRUE when context is added or removed from the context or subcontext bag. For more information, see SetDirty.

The keywords gathered by the context service and added in the active context collection are used to complete a lookup in the information provider, which is the group of compiled Help files registered on the system. The information provider returns a list of topics related to each keyword. The context service then uses the attributes in the active context to filter this list. Any topics with attribute values that conflict with those in the active context are filtered away and are not shown in the Dynamic Help window. For example, if the Language = "XML" attribute is pushed in the active context, but a topic only contains the Language = "C++" attribute, there is a conflict and the topic is filtered away. However, if the topic contains both the Language = "C++" and Language = "XML" attributes, there is no conflict and the topic is not filtered away.

In instances where an F1 keyword corresponds to more than one topic, the context service prioritizes the potential matches according to the following criteria:

  • Whether the topic is attributed as a syntax or reference topic type.

  • The number of attributes in the topic that match those in the active context collection.

If one topic is not singled out by using this process, the best topic is chosen arbitrarily from those with the highest priority.

Both F1 and lookup keywords are displayed in the Dynamic Help window, with F1 keywords given the higher priority. By default, only ten Help (keyword) topics are displayed in the Dynamic Help window at the same time. However, this option can be changed in the Environment folder. This folder is accessed by clicking Options on the Tools menu. If no relevant information is available for F1 keywords, the window displays the text "No links are available for the current selection."

See Also

Concepts

Active Context

Context-Sensitive Help Overview

Reference

SetDirty