eclipse - 新的 html 内容未更新搜索索引
问题描述
我有一个带有 toc 和一些 html 文件作为集成帮助的 Eclipse 插件。 当我更改某些 HTML 文件时,不会重建搜索操作的索引。
我什至尝试按照此处所述预构建索引: https ://help.eclipse.org/2019-09/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fua_help_setup_preindex.htm
这是我的蚂蚁目标:
<target name="build.index" description="Builds search index for the plug-in: com.marchesini.mas.rcp.help." if="eclipse.running">
<help.buildHelpIndex manifest="plugin.xml" destination="."/>
<help.buildHelpIndex manifest="plugin.xml" destination="nl/en_US"/>
</target>
构建似乎是成功的,语言环境是 en_US,来自 config.ini。但是当我在运行时搜索索引时,它没有更新。
我发现触发索引重建的唯一方法是更改插件的版本号,如https://stackoverflow.com/a/12033859/11643143中所示。这真的是唯一的方法吗?
如何在插件部署时自动重建?
谢谢!
解决方案
当然,相同的版本号意味着没有任何变化,包括帮助内容。
作为 hack,您可以在配置区域中删除子目录中的索引org.eclipse.help.base/index/
。
对于动态内容,您可以实现扩展点org.eclipse.help.ui.searchEngine
。
推荐阅读
- python - 如何更新熊猫数据框中的值
- javascript - Javascript:如何从 API 获取特定数据?
- c - 为什么你可以在 C 中以 $ 开头的变量名?
- javascript - 创建phantomjs实例时如何设置代理
- c# - 将控件添加到用户控件
- visual-studio-code - 为什么 vscode 打开 code.js 文件而不是当前文件夹?
- javascript - Javascript多字段验证
- mysql - Common Lisp:如何解决我在尝试通过 cl-dbi 连接到 mysql 时收到的错误?
- python - 如何格式化字符串文字十六进制操作码?
- r - dplyr 包 - 变异