Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » e4 Switch perspectives(How to change perspectives in E4)
e4 Switch perspectives [message #1732578] Wed, 18 May 2016 10:58 Go to next message
Tom Cx is currently offline Tom CxFriend
Messages: 13
Registered: July 2009
Junior Member
I'm diving a little bit into e4 applications. I'm creating an RCP application and have several perspectives.

I looked on how to change perspectives and found a tutorial using a GitHub project (e4-perspective-switcher : https://github.com/jd-carroll/e4-perspective-switcher)

I was wondering if using this is still a good approach or if Eclipse has been involved and some other (better methods(?)) can be used in an RCP application?

How does the current workbench handle this or is this still a 3.x approach that's used there?

If there are better methods please point out where to find info.

Thank you.
Re: e4 Switch perspectives [message #1732678 is a reply to message #1732578] Wed, 18 May 2016 23:41 Go to previous messageGo to next message
Alexander Bunkowski is currently offline Alexander BunkowskiFriend
Messages: 29
Registered: February 2014
Junior Member
You can use the EModelService to find the perspective and the EPartService to switch it:

public class SwitchPerspectiveHandler {
  @Execute
  public void execute(MApplication app, EPartService partService, 
      EModelService modelService) {
    MPerspective element = 
        (MPerspective) modelService.find("secondperspective", app);
    // now switch perspective
    partService.switchPerspective(element);
  }
} 

source: http://www.vogella.com/tutorials/Eclipse4Services/article.html#selectedservices_partservice4
Re: e4 Switch perspectives [message #1732772 is a reply to message #1732678] Fri, 20 May 2016 00:14 Go to previous messageGo to next message
Tom Cx is currently offline Tom CxFriend
Messages: 13
Registered: July 2009
Junior Member
Hi,

Tnx for the answer ! I'll have a look at this kind of implementatio.
Re: e4 Switch perspectives [message #1732847 is a reply to message #1732578] Fri, 20 May 2016 18:52 Go to previous messageGo to next message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 207
Registered: March 2012
Location: Chattanooga, TN USA
Senior Member
Are you using JavaFX. There is a JavaFX implementation in incubation.

Oxygen 3a
Windows 10
Re: e4 Switch perspectives [message #1810545 is a reply to message #1732678] Tue, 13 August 2019 10:24 Go to previous message
Lalit Solanki is currently offline Lalit SolankiFriend
Messages: 153
Registered: April 2015
Senior Member
Hi Alexander Bunkowski,

It is useful but i need one help how to all perspective into Combobox instead off using separately perspective.


Lalit
Previous Topic: integrating custom help on click of next and previous in custom spring boot wizard
Next Topic:Custom CDT project plugin
Goto Forum:
  


Current Time: Tue Apr 23 16:03:38 GMT 2024

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

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

Back to the top