当用户搜索产品的帮助内容时,就会在文档索引内执行搜索。缺省情况下,索引是在第一次调用帮助搜索时创建的,但可以预先构建并随产品交付给用户。这避免在用户机器上建立索引并使用户能够更快地获取第一个搜索结果。
要构建索引,遵循下列步骤:
eclipse -nosplash -application org.eclipse.help.indexTool -vmargs -DindexOutput=outputDirectory -DindexLocale=locale。需要设置下列自变量:
例如,运行
eclipse -nosplash -application org.eclipse.help.indexTool -vmargs -DindexOutput=d:/build/com.my.plugin -DindexLocale=en
将导致文件 doc_index.zip 保存在 nl/en
目录中,该目录将在 d:/build/com.my.plugin 下面创建。zip 将包含用户在
en 语言环境中运行产品时可用的文档内容的索引。
com.my.plugin/
plugin.xml
nl/
de/
doc_index.zip
en/
doc_index.zip
该插件的其它文件
org.eclipse.help/productIndex=com.my.plugin