How to access view folder (PageLayout) to add view dynamically ? [message #444751] |
Mon, 20 February 2006 09:10  |
Eclipse User |
|
|
|
Hi there,
I am having following problem while using Eclipse RCP 3.0 / 3.1.
I have a perspective with three views setup (one view on the upper left
side, one view on the upper right side and one view on the bottom)
into folder containers on start-up of the RCP app.
How can I add a view dynamically (using an Action) to a certain folder
container (e.g. view folder on the upper left side) ?
Or maybe anyone knows how to access the page layout during runtime?
Thanks in advance for your help !
Cheers,
Eric
|
|
|
|
|
Re: How to access view folder (PageLayout) to add view dynamically ? [message #444780 is a reply to message #444757] |
Mon, 20 February 2006 15:45  |
Eclipse User |
|
|
|
It's better to access the page directly. And for most cases you can use
the single-arg variant of showView:
getSite().getPage().showView(viewID);
James Leotta wrote:
> You would need to add a view placeholder to the perspective or you
> cannot open the view during runtime. Then
> try {
>
> getSite().getWorkbenchWindow().getActivePage().showView(view ID,null,3);
> } catch (PartInitException e) {
> e.printStackTrace();
> }
>
> Eric Bredtmann wrote:
>
>> Hi there,
>>
>> I am having following problem while using Eclipse RCP 3.0 / 3.1.
>> I have a perspective with three views setup (one view on the upper
>> left side, one view on the upper right side and one view on the bottom)
>> into folder containers on start-up of the RCP app.
>>
>> How can I add a view dynamically (using an Action) to a certain folder
>> container (e.g. view folder on the upper left side) ?
>> Or maybe anyone knows how to access the page layout during runtime?
>>
>>
>> Thanks in advance for your help !
>>
>>
>> Cheers,
>> Eric
>>
|
|
|
Powered by
FUDForum. Page generated in 0.07553 seconds