1

I have a handler which should reset perspective by using

@Execute
private void execute(IWorkbenchPage workbench) {
    workbench.resetPerspective();
}

However the function is never called due to unresolved argument. I believe the workbench is never injected. I'd like to know how can I fix this.

Any suggestion is welcome.

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79
abiieez
  • 3,139
  • 14
  • 57
  • 110
  • 1
    `IWorkbenchPage` is part of Eclipse 3.x compatibility code and doesn't exist in a pure e4 application. – greg-449 Apr 10 '15 at 08:38
  • I tried to follow http://stackoverflow.com/questions/19717154/how-do-i-reset-perspective-for-eclipse-e4-rcp-application/20106360#20106360 however I get the error `java.lang.IllegalStateException: Workbench has not been created yet.`. What other option do I have ? – abiieez Apr 10 '15 at 08:40
  • That answer is still using Eclipse 3.x compatibility code. If you are writing a pure e4 application it is not even clear what 'reset perspective' means. What exactly do you want to do? – greg-449 Apr 10 '15 at 08:44
  • [This question](http://stackoverflow.com/q/24134818/2670892) looks closer to what you want – greg-449 Apr 10 '15 at 08:46
  • I am trying to reset the perspective to the original state (before resizing or closing). I am checking the question you mentioned now. Thanks – abiieez Apr 10 '15 at 08:55

0 Answers0