Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Perspectives in Eclipse(how to add perspectives inside a perspective)
Perspectives in Eclipse [message #668423] Thu, 05 May 2011 11:39 Go to next message
Eclipse UserFriend
Here is situation where when i run my product in Eclipse workbench will be opened with all perspectives defined .when i opened a perspective i should see only perspectives which i added to this opened perspective.Like for exalple workbench have 4 perspective say
A
B
C
D

where when i opened B perspective i have to see only my defined perspectives say D,E..How can i do this please help me..

Thank you.
Re: Perspectives in Eclipse [message #668467 is a reply to message #668423] Thu, 05 May 2011 15:08 Go to previous messageGo to next message
Eclipse UserFriend
you mean you would like the open perspective dropdown to show you only
the 4 perspectives you've already defined? That can be done by either
adding the perspective shortcuts in each IPerspectiveFactory you create
or creating an org.eclipse.ui.perspectiveExtensions with a target of '*'.

Or are you asking that when you switch to perspective B, you can only
see B,D,and E in the bar and perspective A should have disappeared?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: Perspectives in Eclipse [message #668521 is a reply to message #668467] Thu, 05 May 2011 23:33 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for the reply..
But here a small correction is when i open perspective "B" i should show only see my own perspectives like "F" and "E" how can i add these and none of other perspectives like "A" ,"C" and "D" should not be viewed in "B" perspective..

configurer.setShowPerspectiveBar(true);

After putting this i can see open perspective by clicking on that button i can see all perspectives which are defined in WorkBench.How can i filter perspectives which i want to show.

[Updated on: Fri, 06 May 2011 00:07] by Moderator

Re: Perspectives in Eclipse [message #668586 is a reply to message #668521] Fri, 06 May 2011 07:02 Go to previous messageGo to next message
Eclipse UserFriend
On 05/05/2011 11:33 PM, nani wrote:
> Thank you for the reply..
> But here a small correction is when i open perspective "B" i should show
> only see my own perspectives like "F" and "E" how can i add these and
> none of other perspectives like "A" ,"C" and "D" should not be viewed in
> "B" perspective..

Add them where? in the perspective bar itself, which represents the
already open perspectives? Or in the Open Perspective dropdown menu
(which are called Perspective Shortcuts)?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: Perspectives in Eclipse [message #668598 is a reply to message #668586] Fri, 06 May 2011 07:35 Go to previous messageGo to next message
Eclipse UserFriend
In the perspective bar and in the drop down menu also.by default when i open "B" perspective , "F" and "E" has to be displayed in perspective bar..
Re: Perspectives in Eclipse [message #668616 is a reply to message #668598] Fri, 06 May 2011 08:33 Go to previous messageGo to next message
Eclipse UserFriend
On 05/06/2011 07:35 AM, nani wrote:
> In the perspective bar and in the drop down menu also.by default when i
> open "B" perspective , "F" and "E" has to be displayed in perspective bar..

Things only show up in the perspective bar if they are open. And once
open, they stay in the bar.

What shows up in the dropdown menu (perspective shortcuts) is controlled
by the active perspective. So you can only have E and F in the dropdown
menu for B, if that's what you want.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: Perspectives in Eclipse [message #668618 is a reply to message #668616] Fri, 06 May 2011 08:49 Go to previous messageGo to next message
Eclipse UserFriend
By default how can i show "F" perspective, when i open "B" perspective in perspective tool bar?
Re: Perspectives in Eclipse [message #668645 is a reply to message #668618] Fri, 06 May 2011 10:22 Go to previous messageGo to next message
Eclipse UserFriend
On 05/06/2011 08:49 AM, nani wrote:
> By default how can i show "F" perspective, when i open "B" perspective
> in perspective tool bar?

You can't. You could open perspective F (based on an
IPerspectiveListener and probably an asyncExec(*)), but that would
actually switch the user *to* perspective F. If you automated switching
to F and then back, you would get a lot of flicker.

The perspective bar is a record of the perspectives the user has open.
That's it. The only modification I've seen is that RCP apps can provide
a plugin_customization.ini for PERSPECTIVE_BAR_EXTRAS to "pre-open"
perspectives other than the default.

Another option is that you don't use the perspective bar at all.
Instead, use org.eclipse.ui.menus to provide your own perspective bar,
and manage the entire thing (what perspectives are open, and which ones
are visible in the bar) yourself.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: Perspectives in Eclipse [message #668779 is a reply to message #668645] Sat, 07 May 2011 06:57 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for the reply...how can we add perspectives org.eclipse.ui.menus in plugin.xml extenstions??
Re: Perspectives in Eclipse [message #668784 is a reply to message #668645] Sat, 07 May 2011 08:15 Go to previous messageGo to next message
Eclipse UserFriend
how to add perspectives through org.eclipse.ui.menus from plugin.xml extensions..?
Re: Perspectives in Eclipse [message #668786 is a reply to message #668784] Sat, 07 May 2011 08:59 Go to previous messageGo to next message
Eclipse UserFriend
How can i close perspectives..

PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().close().

by using above code, perspective which are on perspective bar all are closed but i need to close the perspective which is opened currently..how can i do this.

Thank you.
Re: Perspectives in Eclipse [message #669502 is a reply to message #668786] Tue, 10 May 2011 10:32 Go to previous message
Eclipse UserFriend
See the API and/or javadoc for org.eclipse.ui.IWorkbenchPage. You don't want to close the page, only a perspective.

PW
Previous Topic:Context Menu in Eclipse
Next Topic:How to match editor inputs while accounting for different editors
Goto Forum:
  


Current Time: Sun Aug 31 00:23:29 EDT 2025

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

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

Back to the top