简体   繁体   English

如何在 Eclipse Juno 中以编程方式分离编辑器?

[英]How to programatically detach editor in Eclipse Juno?

In my RCP application, I am able to open an editor in Eclipse 4.2 (Juno), but I would like it to open in a separate window by default (that is, to be detached).在我的 RCP 应用程序中,我能够在 Eclipse 4.2 (Juno) 中打开一个编辑器,但我希望它默认在单独的窗口中打开(即分离)。 I don't want to be forced to manually drag and drop it outside the main workbench window.我不想被迫手动将其拖放到主工作台窗口之外。

I wander around classes like IEditorPart, WorkbenchWindow, WorkbenchPage, IViewSite etc. but no luck so far.我在 IEditorPart、WorkbenchWindow、WorkbenchPage、IViewSite 等类中徘徊,但到目前为止没有运气。

Actually, it would be great to be able to embed editor into some dialog window from org.eclipse.jface.dialogs.实际上,能够将编辑器从 org.eclipse.jface.dialogs 嵌入到某个对话框窗口中会很棒。 But I don't think it's possible, as windows (as much as views) and Editors don't go well together.但我认为这是不可能的,因为窗口(尽可能多的视图)和编辑器不能很好地结合在一起。

try looking here试试看这里

there is an example concerning views but I thik that it can be adapter to your needs有一个关于视图的例子,但我认为它可以适应你的需要

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM