Reputation: 49
I have made RCP product file in which I have to reset perspective every time. Is there any way by which it will reset perspective before it load ?
Upvotes: 2
Views: 1827
Reputation: 8960
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().resetPerspective();
Eclipse 3.x - for Eclipse 4.x, see greg's answer.
Upvotes: 1
Reputation: 111217
If you always want your RCP to start in the same state you can specify the flags
-clearPersistedState -persistState false
in the Program Arguments section on the Launching tab of the .product file.
-clearPersistedState
causes Eclipse to drop any persisted state during starting.
-persistState false
stops Eclipse for persisting the state on exit.
This is for Eclipse 4.x only.
Upvotes: 2