Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to access view folder (PageLayout) to add view dynamically ?
How to access view folder (PageLayout) to add view dynamically ? [message #444751] Mon, 20 February 2006 14:10 Go to next message
Eric Bredtmann is currently offline Eric BredtmannFriend
Messages: 2
Registered: July 2009
Junior Member
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 #444757 is a reply to message #444751] Mon, 20 February 2006 14:51 Go to previous messageGo to next message
James Leotta is currently offline James LeottaFriend
Messages: 202
Registered: July 2009
Senior Member
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
>
Re: How to access view folder (PageLayout) to add view dynamically ? [message #444760 is a reply to message #444757] Mon, 20 February 2006 15:25 Go to previous messageGo to next message
Eric Bredtmann is currently offline Eric BredtmannFriend
Messages: 2
Registered: July 2009
Junior Member
Great!

Thanks, that worked out just fine.

Cheers,
Eric


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
>>
>
Re: How to access view folder (PageLayout) to add view dynamically ? [message #444780 is a reply to message #444757] Mon, 20 February 2006 20:45 Go to previous message
Nick Edgar is currently offline Nick EdgarFriend
Messages: 439
Registered: July 2009
Senior Member
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
>>
Previous Topic:Dont know whether it is the right place to ask...
Next Topic:JNI cannot find Java Routines with RCP
Goto Forum:
  


Current Time: Fri Jan 03 05:29:36 GMT 2025

Powered by FUDForum. Page generated in 0.03563 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top