2

I hava a piece of Code, that can only be executed, when a given perspective is already loaded/open.

I can use PlatformUI.getWorkbench().showPerspective("perspectiveID",PlatformUI.getWorkbench().getActiveWorkbenchWindow()); (from a Gui-Thread) to forcefully show the Perspective, but that is not good manner.

I want to show a similiar Dialog to the "Do you want to open the Debug-Perspective now", but with the difference, that i allways open the Perspective, but only bring it to the front, if the user wishes to.

For completeness: This is the result of a user-context-menu click and the user might not know, what has happened to him when i change the perspective without him knowing. (The RCP-Application did not made use of perspectives before)

4

1 回答 1

0

与其投入大量精力处理尴尬的用户交互,不如投入精力修复代码只能在打开某个视角时运行的错误。

Eclipse 中没有“打开一个透视图,但不把它放在前面”的概念。

于 2013-04-19T16:23:50.460 回答