Eclipse plugin - Editor associated to file extension and perspective(Eclipse 插件 - 与文件扩展名和透视图关联的编辑器)
问题描述
我正在开发两个eclipse插件,我有下一个问题:
I'm developing tow eclipse plugin, I have the next problem:
我有两个管理相同文件的视角.我想在文件扩展名 - 编辑器 - 透视图之间建立关联.
I have two perspective that manages the same files. I would like to make an association between file extension - editor - perspective.
我的意思是,如果我在透视 1 中打开文件扩展名 .XXX,它使用编辑器 A,但如果我在透视 2 中打开相同的文件扩展名 .XXX,它使用编辑器 B.
I mean if I open the file extension .XXX in perspective 1 it uses the editor A, but if I open the same file extension .XXX in perspective 2, it uses the editor B.
有可能吗?从现在开始,我使用了启动器,但现在我需要更多的差异化.
is it possible? Since now, I used the launcher but now I need more differentiation.
谢谢.
推荐答案
(对不起,这是不要那样做!"未回答的问题之一.:))
(Sorry, this is one of those "don't do that!" non-answers. :))
正如评论中提到的,我建议不要根据当前的观点打开不同的编辑器.我认为这违背了用户的期望,并且会产生一些不直观的后果,例如当我创建自己的观点时.
As mentioned in the comments, I'd recommend against opening a different editor depending on the current perspective. I think that goes against the expectations of the user, and has some unintuitive consequences, e.g. when I create my own perspectives.
例如,我建议使用 Eclipse 的 XML/Plug-in 清单编辑器.底部的选项卡允许用户在不同的视图之间进行选择,而不受任何视角选择或配置的影响.
I'd recommend going the path of Eclipse' XML/Plug-in manifest editors, for example. Tabs at the bottom allow the user to choose between the different views, independent of any perspective choice or configuration.
这篇关于Eclipse 插件 - 与文件扩展名和透视图关联的编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Eclipse 插件 - 与文件扩展名和透视图关联的编辑器


- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01