2

I am developing a plugin with several custom perspectives. So I would like to open one by default on start.

I override WorkbenchWindowAdvisor#getInitialWindowPerspectiveId after that specified the same perspective ID in the file plugin_customization.ini like this org.eclipse.ui/defaultPerspectiveId=myPerspectiveId but it does not help. Each time Eclipse opens last visited perspective.

Only if I specified in the run configuration program arguments -perspective myPerspectiveId it works as expected.

How fix that without using program arguments? (for Eclipse Mars)

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
eugenn
  • 1,638
  • 6
  • 23
  • 38
  • Possible duplicate of [Is there a way to force Eclipse to open in the default perspective?](http://stackoverflow.com/questions/4604267/is-there-a-way-to-force-eclipse-to-open-in-the-default-perspective) – greg-449 Jan 20 '16 at 10:42
  • nope, it is different – eugenn Jan 20 '16 at 10:48
  • Did you mean `WorkbenchAdvisor`? There is no `WorkbenchWindowAdvisor#getInitialWindowPerspectiveId()`. – Rüdiger Herrmann Jan 20 '16 at 12:01
  • Eclipse restores the perspective that was active before the last shutdown. If you want to show the same perspective with each start, you will have to leverage this mechanism. Did you try to set the desired perspective in WorkbenchWindowAdvisor#postWindowRestore()`? – Rüdiger Herrmann Jan 20 '16 at 12:07

0 Answers0