本文介绍了Eclipse插件 - 与文件扩展名和透视图关联的编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发拖放eclipse插件,我有下一个问题:



我有两个视角来管理相同的文件。我想在文件扩展名 - 编辑器 - 透视图之间建立关联。



我的意思是如果我在透视图1中打开文件扩展名.XXX,它使用编辑器A,但是如果我在透视图2中打开相同的文件扩展名.XXX,它使用编辑器B。



是可能吗?从现在起,我使用了启动器,但现在我需要更多的区分。



谢谢。

解决方案/ div>

(对不起,这是其中一个不要这样做!不答案:))



如评论中所述,根据目前的观点,我建议不要打开不同的编辑器。我认为这违反了用户的期望,并且有一些不直观的后果,例如当我创建自己的观点。



例如,我建议您去Eclipse的XML /插件清单编辑器的路径。底部的标签允许用户在不同视图之间进行选择,而不管任何透视选项或配置。




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.

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.

Thanks.

解决方案

(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.

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插件 - 与文件扩展名和透视图关联的编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 15:29