gpt4 book ai didi

eclipse - 在 Eclipse RCP 应用程序中查找当前选定 View 的 ID

转载 作者:行者123 更新时间:2023-12-01 08:34:52 25 4
gpt4 key购买 nike

当我的 Eclipse RCP 应用程序运行时,我打开了许多 View 。谁能告诉我如何在我的工作台中获取当前选定 View 的 View ID(不是辅助 View ID)?

最佳答案

最后,我有一种方法可以在我的应用程序的工作台中获取当前选定(打开) View 的 View ID,如下代码行:

IWorkbenchPage wbp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
String id = wbp.getActivePartReference().getId();

这正是我想要的。

关于eclipse - 在 Eclipse RCP 应用程序中查找当前选定 View 的 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12767184/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com