Eclipse 插件 - 与文件扩展名和透视图关联的编辑器

2023-08-22Java开发问题
2

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

The End

相关推荐

在 Eclipse 项目中使用西里尔文 .properties 文件
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)...
2024-08-25 Java开发问题
18

Eclipse 在尝试启动 Android 应用程序时卡住了
Eclipse gets stuck when trying to launch Android app(Eclipse 在尝试启动 Android 应用程序时卡住了)...
2024-08-25 Java开发问题
14

Eclipse:无法初始化监视器线程:无法建立环回连接
Eclipse: Failed to initialize Monitor Thread: Unable to establish loopback connection(Eclipse:无法初始化监视器线程:无法建立环回连接)...
2024-08-25 Java开发问题
4

Eclipse-找不到JDK
Eclipse- JDK not found(Eclipse-找不到JDK)...
2024-08-25 Java开发问题
6

如何让 Eclipse 在 Windows 7 任务栏中表现良好?
How to make Eclipse behave well in the Windows 7 taskbar?(如何让 Eclipse 在 Windows 7 任务栏中表现良好?)...
2024-08-25 Java开发问题
9

本机方法中的致命错误:JDWP 未初始化传输,jvmtiError=AGENT_ERROR_TRANSPORT_INIT
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)(本机方法中的致命错误:JDWP 未初始化传输,jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197))...
2024-08-25 Java开发问题
107