Eclipse RCP:org.eclipse.ui.views.showView参数 [英] Eclipse RCP: org.eclipse.ui.views.showView Parameters
本文介绍了Eclipse RCP:org.eclipse.ui.views.showView参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用命令在我的RCP应用程序中显示一个特定的视图。使用showView打开一个对话框以选择视图。有没有办法没有选择对话框?我尝试参数,但没有帮助。 plugin.xml的相关部分如下。
com.dbtek.hyperbola.views.contactsView是我的视图ID
I want to show a specific view in my RCP application using a command. Using showView opens a dialog to select view. Is there any way to do without selection dialog? I tried parameters but didn't help. Related part of plugin.xml is below. com.dbtek.hyperbola.views.contactsView is my view ID
推荐答案
您需要添加一个具有要显示的视图的id的命令参数。例如
You need to add a command parameter with the id of the view to show. E.g.
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="window"
label="Window">
<command
commandId="org.eclipse.ui.views.showView"
label="Show Progress"
style="push">
<parameter
name="org.eclipse.ui.views.showView.viewId"
value="org.eclipse.ui.views.ProgressView">
</parameter>
</command>
</menu>
</menuContribution>
</extension>
这篇关于Eclipse RCP:org.eclipse.ui.views.showView参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文