在我自己的产品中使用 PerspectiveSwitcher。没有整个工作台可能吗?
我遵循了 Lars Vogel 的 Eclipse 4 教程,并且我正在尝试在此基础上进行构建应用进一步一点。我读了《Eclipse Plugins》一书,但学习 Eclipse RCP 仍然有点困难。
我添加了一个带有以下类 URI 的 ToolControl,该 URI 是从 IDE 中的实时应用程序模型复制的。
bundleclass://org.eclipse.ui.workbench/org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher
但是启动产品后我得到了这个异常:
!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-02-08 20:30:39.010
!MESSAGE Unable to create class 'org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher' from bundle '66'
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException: Workbench has not been created yet.
我尝试提高启动 -我自己的插件的级别,因此它比 org.eclipse.ui.workbench 插件的级别更高。它没有改变任何东西。
所以我的问题是:是否可以在我自己的产品中使用透视切换器?或者我需要以完全不同的方式来处理这个问题?
I followed the Eclipse 4 tutorial by Lars Vogel and I am trying to build on that application a bit further. I read the Eclipse Plugins book, but I'm still having a bit of a hard time learning Eclipse RCP.
I added a ToolControl with the following Class URI that I copied from the Live Application Model in the IDE.
bundleclass://org.eclipse.ui.workbench/org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher
But after launching the product I get this exception:
!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-02-08 20:30:39.010
!MESSAGE Unable to create class 'org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher' from bundle '66'
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException: Workbench has not been created yet.
I tried upping the start-level of my own plugin so it is higher than that of the org.eclipse.ui.workbench plugin. It did not change anything.
So my question is: Is it possible to use the perspective switcher in my own product? Or do I need to approach this in a completely different way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
插件包中的透视切换器当前需要 4.2 Workbench,这意味着创建一个基于 Eclipse 4.2 SDK 的标准 3.x RCP 应用程序。
有计划将透视切换器与工作台分离,但这可能要到 Eclipse 4.3 才会实现。如果您想在 Eclipse 4 中使用透视切换器,您似乎必须创建自己的透视切换器。
The perspective switcher that's in the addons bundle currently needs the 4.2 Workbench, which means creating a standard 3.x RCP app based on Eclipse 4.2 SDK.
There are plans to decouple the perspective switcher from the Workbench but that probably won't happen until Eclipse 4.3. If you want to use a perspective switcher in Eclipse 4 it looks like you would have to create your own.