在对话框中打开Eclipse编辑器 [英] Open up Eclipse Editor in a dialog

查看:139
本文介绍了在对话框中打开Eclipse编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,我需要在对话框中打开我的编辑器。

I have a requirement where I need to open my editor in a dialog.

我有的东西是


  1. 我的编辑器插件

  1. My Editor Plugin

另一个插件中的按钮侦听器,我需要在对话框

A button listener in a different plugin where I need to open this editor in a dialog

我尝试过一种方法,下面是该按钮监听器内的代码

I tried one way , below is code inside that button listener

//this opens up a new workbench window
PlatformUI.getWorkbench().openWorkbenchWindow("<provide perspective id here>", null);
//this gets active window, which is the above one and opens our editor
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(myEditorInput, "editor.plugin.id");

但是使用上面我必须从新打开的窗口中隐藏成千上万的东西,如菜单栏,其他

But using above I have to hide a thousands of things from that newly opened window like Menu Bar, Other Views.

我的问题是任何人都可以帮助我在新创建的对话框中打开编辑器,没有菜单栏和视图。

My question is can anyone help me opening the editor in a newly created dialog which comes without those menu bars and views.

提前感谢

推荐答案

Eclipse不支持在对话框中打开编辑器。编辑依赖于Eclipse框架中太多的东西,在对话框中不可用。

Eclipse does not support opening editors in a dialog. Editors rely on too many things in the Eclipse framework which are not available in a dialog.

可以使用JFace SourceViewer TextViewer 在对话框中形成许多文本编辑器核心的类。

You can use the JFace SourceViewer or TextViewer classes which form the core of many text editor in a dialog.

这篇关于在对话框中打开Eclipse编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆