[英]Open Eclipse view programmatically in plugin-project
I want to open the view "Package Explorer" after a special event, inside my Eclipse plugin application. 我想在特殊事件后在Eclipse插件应用程序中打开视图“ Package Explorer”。
This is what I am trying to do: 这就是我想要做的:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("viewId");
But what is the id
od the package explorer view? 但是,包浏览器视图的
id
是什么?
The id is org.eclipse.jdt.ui.PackageExplorer
for the JDT Package Explorer. JDT包浏览器的ID为
org.eclipse.jdt.ui.PackageExplorer
。
You can determine any ID if you press Alt + Shift + F1 while in the view. 如果在视图中按Alt + Shift + F1 ,则可以确定任何ID。 eg you get this pop-up (if you have PDE installed).
例如,您会看到此弹出窗口(如果已安装PDE)。 See Vogella's tutorials for more info on using the Spy.
有关使用间谍的更多信息,请参见Vogella的教程 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.