Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在运行我的 Eclipse RCP 应用程序时打开了许多视图。谁能告诉我如何在我的工作台中获取当前选定视图的视图 ID(不是辅助视图 ID)?
最后,我有一种方法可以在我的应用程序的工作台中获取当前选定(打开)视图的视图 ID,如下代码行:
IWorkbenchPage wbp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); String id = wbp.getActivePartReference().getId();
这正是我所寻求的。