Package org.eclipse.help
Class AbstractTocProvider
- java.lang.Object
-
- org.eclipse.help.AbstractTocProvider
-
public abstract class AbstractTocProvider extends Object
AnAbstractTocProvideris a mechanism to provide arbitrary content to the table of contents (TOC).AbstractTocProviders must be registered via theorg.eclipse.help.tocextension point.- Since:
- 3.3
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PRIORITYDefault priority for toc providers that do not override getPriority()static intTOC_FILE_PRIORITYPriority for toc files read from the local file system
-
Constructor Summary
Constructors Constructor Description AbstractTocProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcontentChanged()Notifies the platform that the content managed by this provider may have changed since the last timegetTocContributions()was called, and needs to be updated.intgetPriority()If two toc contributions have the same id, the one with higher priority will be shown.abstract ITocContribution[]getTocContributions(String locale)Returns all toc contributions for this provider.
-
-
-
Field Detail
-
DEFAULT_PRIORITY
public static final int DEFAULT_PRIORITY
Default priority for toc providers that do not override getPriority()- Since:
- 3.5
- See Also:
- Constant Field Values
-
TOC_FILE_PRIORITY
public static final int TOC_FILE_PRIORITY
Priority for toc files read from the local file system- Since:
- 3.5
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTocContributions
public abstract ITocContribution[] getTocContributions(String locale)
Returns all toc contributions for this provider. Providers are free to provide any number of contributions (zero or more).- Parameters:
locale- the locale for which to get contributions- Returns:
- all the contributions for this provider
-
contentChanged
protected void contentChanged()
Notifies the platform that the content managed by this provider may have changed since the last timegetTocContributions()was called, and needs to be updated.
-
getPriority
public int getPriority()
If two toc contributions have the same id, the one with higher priority will be shown. For example, a provider with priority 1 will take precedence over a provider with priority 2.- Returns:
- the priority of this provider
- Since:
- 3.5
-
-