0

I am developing a standalone RCP program in Java. There I have a plugin which opens a perspective in the current workbench, when I click on it.

IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window =     workbench.getActiveWorkbenchWindow();
try {
workbench.showPerspective(perspectiveId, window);
} catch (Exception e) {

}

Now I want to show this perspective in a dialog as well. Basically, I have this plugin on my main page and can open this perspective already with the code above. Now I want to show this perspective in another view as a dialog. I am not sure if this is even possible, since the perspective might needs a workbench.

My question is now, can I use this perspective, in terms of the view that I would get, to open it as a popup as well and if so, how can I achieve this with the given perspective?

1 Answers1

0

You can't. Perspectives, views and editors can only be shown in a workbench window. Dialogs are not workbench windows.

You can have multiple workbench windows open, but they don't behave like dialogs.

greg-449
  • 109,219
  • 232
  • 102
  • 145