2

is there an easy way to reuse the complete Perspective implementation from the Eclipse Juno 4.2 IDE ("Open Perspective", Customize Perspective, "Save Perspective As ...", "Reset Perspective...", "Close Perspective...", ... ) in an e4 RCP application (if possible without using the Eclipse 3 compatibility layer)?

Thanks and Best Regards Marc

Marc
  • 37
  • 4

1 Answers1

2

I am assuming you mean to reuse them as Menu items, just as they are in Eclipse.

You can locate their ids using the Plugin Spy - on your Eclipse development platform, press Alt++Shift+F2 and then click on the Window menu and then on Customize Perspective... (for example). This will give you its id as org.eclipse.ui.window.customizePerspective.

Then go to your plugin.xml and to the menu extension where you want to add this command, right click and add a command. For the commandId you put that id you found (org.eclipse.ui.window.customizePerspective). You can even find these ids when you click on Browse, next to commandId.

Unfortunately for E4 RCP you must use plugin.xml for the Eclipse defined commands. If you do not wish to, then you can get an idea of the implementation of the command by viewing its source code.

I have a more detailed answer here - https://stackoverflow.com/a/14370898/462285

Community
  • 1
  • 1
nbz
  • 3,806
  • 3
  • 28
  • 56