I am trying to reset a particular Eclipse view that I have developed. I want to reset the state of the view when I restart the application. Is there any way to achieve this in RCP programming?
Asked
Active
Viewed 458 times
0
-
I want something like how we reset the whole perspective with page.resetPerspective(). – Vinod Kotha Jan 09 '16 at 00:10
-
2Is this a view you have written? – greg-449 Jan 09 '16 at 08:13
-
Use IWorkbenchPage.resetPerspective when you restart – SomeDude Jan 09 '16 at 15:19
1 Answers
0
When you restart your RCP application, the Eclipse workbench automatically calls the init
method of the view parts. This method (which is located in the class org.eclipse.ui.part.ViewPart
) receives a Memento
object. This is because Eclipse, where possible, tries to recreate the previous states of the view parts. If you want to change this default behavior, override the init
method. You can do this because your classes inherit from org.eclipse.ui.part.ViewPart
.

Mario Cervera
- 671
- 1
- 8
- 19