Adding a view into a perspective without opening the perspective. [message #331826] |
Wed, 24 September 2008 07:23  |
Eclipse User |
|
|
|
Hello,
I want to add a view into a perspective. The view has the 'allowMultiple'
flag set and is opened multiple time within different perspectives.
At the moment I open the view using a IWorkbenchPage received by calling
showPerspective().
IWorkbenchPage page =
PlatformUI.getWorkbench().showPerspective(processor.getId(),
PlatformUI.getWorkbench().getActiveWorkbenchWindow());
...
TaskView processorView = (TaskView)page.showView(TaskView.ID, secondaryId,
IWorkbenchPage.VIEW_CREATE);
This approach has the drawback that the perspective into which a view is
placed has to be shown. I would prefer adding a view 'silently' into a
perspective without having to show the perspective at the same time.
Is this possible?
Thanks,
Jan
|
|
|
Re: Adding a view into a perspective without opening the perspective. [message #331858 is a reply to message #331826] |
Thu, 25 September 2008 13:53   |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Jan Kohnert wrote:
> Hello,
>
> I want to add a view into a perspective. The view has the
> 'allowMultiple' flag set and is opened multiple time within different
> perspectives.
> At the moment I open the view using a IWorkbenchPage received by calling
> showPerspective().
> IWorkbenchPage page =
> PlatformUI.getWorkbench().showPerspective(processor.getId(),
> PlatformUI.getWorkbench().getActiveWorkbenchWindow());
> ..
> TaskView processorView = (TaskView)page.showView(TaskView.ID,
> secondaryId, IWorkbenchPage.VIEW_CREATE);
>
>
> This approach has the drawback that the perspective into which a view is
> placed has to be shown. I would prefer adding a view 'silently' into a
> perspective without having to show the perspective at the same time.
>
> Is this possible?
I suppose you could do it declaratively in plugin.xml instead of via
Java code. Use the org.eclipse.ui.perspectiveExtensions extension point.
Hope this helps,
Eric
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04711 seconds