Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » e4 Switch perspectives(How to change perspectives in E4)
e4 Switch perspectives [message #1732578] Wed, 18 May 2016 06:58 Go to next message
Eclipse UserFriend
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 19:41 Go to previous messageGo to next message
Eclipse UserFriend
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] Thu, 19 May 2016 20:14 Go to previous messageGo to next message
Eclipse UserFriend
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 14:52 Go to previous messageGo to next message
Eclipse UserFriend
Are you using JavaFX. There is a JavaFX implementation in incubation.
Re: e4 Switch perspectives [message #1810545 is a reply to message #1732678] Tue, 13 August 2019 06:24 Go to previous message
Eclipse UserFriend
Hi Alexander Bunkowski,

It is useful but i need one help how to all perspective into Combobox instead off using separately perspective.
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: Wed Jul 16 05:34:08 EDT 2025

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

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

Back to the top