Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Adding Views and Perspectives dynamically
Adding Views and Perspectives dynamically [message #437460] Wed, 28 September 2005 21:15 Go to next message
Hani Seifeddine is currently offline Hani SeifeddineFriend
Messages: 11
Registered: July 2009
Junior Member
Hi,

I am developing a client/server application based on eclipse RCP and I
want to do the following: the server publishes a list of view
dynamically and lays them out in a default manner. The client can
modify the layout provided by the server depending on the current user
setting.

I believe this is totally feasible using views and perspectives if
these parts are declared within the plugin.xml manifest. Is there any
way to add views and arrange them in perspectives dynamically?

The only useful information I found is the thread entitled "Modifying
plugin descriptor programmatically" but it suggests altering the
plugin.xml file, invalidating the loaded plugin and reloading it
again!

Can someone advise please?
Regards
H.S
Re: Adding Views and Perspectives dynamically [message #437472 is a reply to message #437460] Thu, 29 September 2005 11:59 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
If you have a single perspective, you could create a PerspectiveFactory class that does the initial layout, as described in

http://help.eclipse.org/help30/topic/org.eclipse.platform.do c.isv/reference/api/org/eclipse/ui/IPerspectiveFactory.html

However, this only has any effect (a) when the perspective is first created, or (b) if the perspective is 'reset' to its status.

If it were programmatically possible to issue the 'reset' call, you might be able to use this mechanism. The menu performs a call to 'IWorkbenchPage.resetPerspective()', so if you call that you may be able to relayout the perspective on demand.

However, you wouldn't be able to do that with dynamic perspectives as such. The number of perspectives is fixed per plugin.
Re: Adding Views and Perspectives dynamically [message #437537 is a reply to message #437472] Thu, 29 September 2005 20:22 Go to previous messageGo to next message
Hani Seifeddine is currently offline Hani SeifeddineFriend
Messages: 11
Registered: July 2009
Junior Member
Thanks Alex I will give it a try.
Can we do the same thing with views? I mean defining views dynamically
and not within the plugin.xml
Regards,
H.S


On Thu, 29 Sep 2005 07:59:45 EDT, Alex Blewitt
<alex_blewitt@yahoo.com> wrote:

>If you have a single perspective, you could create a PerspectiveFactory class that does the initial layout, as described in
>
> http://help.eclipse.org/help30/topic/org.eclipse.platform.do c.isv/reference/api/org/eclipse/ui/IPerspectiveFactory.html
>
>However, this only has any effect (a) when the perspective is first created, or (b) if the perspective is 'reset' to its status.
>
>If it were programmatically possible to issue the 'reset' call, you might be able to use this mechanism. The menu performs a call to 'IWorkbenchPage.resetPerspective()', so if you call that you may be able to relayout the perspective on demand.
>
>However, you wouldn't be able to do that with dynamic perspectives as such. The number of perspectives is fixed per plugin.
Re: Adding Views and Perspectives dynamically [message #437622 is a reply to message #437537] Fri, 30 September 2005 08:16 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
You could use the same technique to change the contents of a view, I guess. But some SWT platforms don't support changing contents as easily. However, the purpose of the Eclipse platform is to provide individual single views for a specific purpose, rather than a uber-view that can be changed on the fly for everything. It might be better to review what you are want to achieve and trying to work with Eclipse, rather than trying to fight it ...
Previous Topic:Using IResource in RCp
Next Topic:Exporting RCP product fails since 3.2M1
Goto Forum:
  


Current Time: Thu Dec 05 16:22:23 GMT 2024

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

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

Back to the top