Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Add default perspectives
Add default perspectives [message #436531] Mon, 12 September 2005 09:36 Go to next message
Eclipse UserFriend
Originally posted by: sulf.upb.de

Hello,

My application need for default two perspectives (like in eclipse debug &
java). I specified them in the plugin.xml and added the following line to
each perspective-class:
layout.addPerspectiveShortcut(<id of the perspective>);

In my WorkbenchAdvisor-class I specified getInitialWindowPerspectiveId()
with PERSPECTIVE1. Now I run my application and I See only my first
Perspective in the PerspectiveBar, but I can manually add the second. How
I do this by default.

Best regards,
Ulf Schwekendiek
Re: Add default perspectives [message #436536 is a reply to message #436531] Mon, 12 September 2005 15:35 Go to previous messageGo to next message
arne anka is currently offline arne ankaFriend
Messages: 133
Registered: July 2009
Senior Member
looking for a solution for the same issue atm.
surfing the eclipse-help gave me the information, that only _opened_
perspectives are shown in the perspective bar, not all available! so we
have to look for a way to programmaticayyl open all perspectives we'd like
to have in the bar.

regards
Re: Add default perspectives [message #436537 is a reply to message #436536] Mon, 12 September 2005 15:54 Go to previous messageGo to next message
arne anka is currently offline arne ankaFriend
Messages: 133
Registered: July 2009
Senior Member
well, found at least one working way:

public class ApplicationWorkbenchWindowAdvisor extends
WorkbenchWindowAdvisor {
...
public void postWindowOpen(){
super.postWindowOpen();
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
try{
configurer.getWorkbenchConfigurer().getWorkbench().showPersp ective( "MyPerspectiveID",
configurer.getWindow());
}catch(WorkbenchException e){
e.printStackTrace();
}
}

....


now both of my perspectives are shown (the one loaded above gains the
focus, which is unwanted). but i have a feeling it's not a really elegant
solution (would like to access the whole PersepctiveBar and among others
change the size and the icon's size ...)

regards
Re: Add default perspectives [message #436546 is a reply to message #436537] Tue, 13 September 2005 06:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sulf.upb.de

thx for your workaround :) Interesting, now it shows in the
perspectivebar, but not in the Window->Open Perspective. There is still
the last loaded Perspective and "Others"

best regards,
Ulf
Re: Add default perspectives [message #436594 is a reply to message #436546] Tue, 13 September 2005 10:14 Go to previous message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
if you have a look in the updated rcp articles ... it says to use the

implements ...IPerspectiveFactory ...
{
public void createInitialLayout ...
{

..
..
layout.addShowViewShortcut -> to let a view show in the Windows ->
show view
layout.addPerspectiveShortcut -> to fill the window > open
perspective list ...
}
}

hope this works

;-)
Previous Topic:Problem with update / instlalation of Help
Next Topic:Disabled Text inside a form, the border doesn't show
Goto Forum:
  


Current Time: Sun Dec 08 06:37:14 GMT 2024

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

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

Back to the top