This page will explain how to activate criteria. To enable criteria you need define which criteria are associated with each topic and also set preferences which tell the help system to show criteria. The association between criteria and topics can be either in a toc file or using a criteria provider class.
Some topics of the plug-in might only be of interest to certain users, for example a topic may be specific to the linux platform. The document writer can define a criterion "platform" with values such as "linux", "windows" etc applied to different topics. The user can then filter the documentation to show only documents applicable to a specific platform.
When defining a table of contents file criteria information can be appended according to these steps:
For example:
<toc href="tochref"> <criteria name="platform" value="AIX"/> <criteria name="platform" value="Windows"/> <topic label="label1" href="href1"> <criteria name="platform" value="Windows"/> </topic> <topic label="label2" href="href2"> <criteria name="platform" value="AIX"/> </topic> </toc>
Some rules to follow when adding criteria:
As an alternative to defining criteria in a table of contents file the extension point org.eclipse.criteriaProvider can be used to define a class which will associate criteria with topics. Criteria defined using this extension point will be merged with those defined in the table of contents and if multiple criteria providers are defined each will contribute to the criteria of an ITopic or IToc.
The names and values of criteria can be localized. Follow these steps to add localization information for criteria:
<extension point="org.eclipse.help.criteriaDefinition"> <criteriaDefinition file="criteria.xml"/> </extension>
<criteriaDefinition> <criterion id="platform" name="Platform"> <criterion-value id="AIX" name="AIX Server"/> <criterion-value id="Windows" name="Windows Server"/> </criterion> </criteriaDefinition>
Define the necessary preferences in your plugin customization file.
example: org.eclipse.help/enableCriteria = true
example: org.eclipse.help/supportedCriteria = platform,versionwhich means that 'platform' and 'version' are the supported criteria in help system.
See Also:
The criteria definition extension point.
The criteria provider extension point.