从Eclipse插件以编程方式显示视图 [英] Programmatically showing a View from an Eclipse Plug-in
本文介绍了从Eclipse插件以编程方式显示视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我会认为工作单位可能会处理这件事情,但我还没有找到任何地方。
解决方案
您可能正在寻找:
PlatformUI。 getWorkbench()getActiveWorkbenchWindow()getActivePage()showView( viewId)。。。;
I have a plug-in to an Eclipse RCP application that has a view. After an event occurs in the RCP application, the plug-in is instantiated, its methods are called to populate the plug-in's model, but I cannot find how to make the view appear without going to the "Show View..." menu.
I would think that there would be something in the workbench singleton that could handle this, but I have not found out how anywhere.
解决方案
You are probably looking for this:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("viewId");
这篇关于从Eclipse插件以编程方式显示视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文