Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to get the reference to the perspective from it's view?
How to get the reference to the perspective from it's view? [message #530679] Fri, 30 April 2010 14:01 Go to next message
balcerman  is currently offline balcerman Friend
Messages: 17
Registered: March 2010
Junior Member
Hello,

How to get the reference to the perspective from it's view?
Is it possible?
Re: How to get the reference to the perspective from it's view? [message #530716 is a reply to message #530679] Fri, 30 April 2010 15:26 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

balcerman wrote:
> How to get the reference to the perspective from it's view?
> Is it possible?

No, and maybe. The perspective is just a layout of views, and a
perspective doesn't own a view.

But you can do getSite().getPage().getPerspective() to get the current
perspective. See org.eclipse.ui.IWorkbenchPage.getPerspective()

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to get the reference to the perspective from it's view? [message #531511 is a reply to message #530716] Wed, 05 May 2010 09:42 Go to previous messageGo to next message
balcerman  is currently offline balcerman Friend
Messages: 17
Registered: March 2010
Junior Member
"But you can do getSite().getPage().getPerspective() to get the current
perspective."


It returns only IPerspectiveDescriptor which doesn't contain Perspective object...
Re: How to get the reference to the perspective from it's view? [message #531568 is a reply to message #531511] Wed, 05 May 2010 12:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

balcerman wrote:
>
> It returns only IPerspectiveDescriptor which doesn't contain Perspective
> object...

correct ... the Perspective object is internal, and you can't get it (at
least, not with any API methods). What are you trying to do, anyway?

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to get the reference to the perspective from it's view? [message #531572 is a reply to message #531568] Wed, 05 May 2010 12:58 Go to previous message
balcerman  is currently offline balcerman Friend
Messages: 17
Registered: March 2010
Junior Member
An issue with communication between views which I solved in other way, but still I was curious whether getting perspective from the view is possible or not.


Thanks anyway Smile
Previous Topic:inconsistency between document and displayed text in JavaScript editor
Next Topic:How to change color of editor area
Goto Forum:
  


Current Time: Thu Mar 28 20:10:25 GMT 2024

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

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

Back to the top