Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In the activator class of an Eclipse plugin how can I find view instances?

I have an Eclipse plugin with a view (ViewPart) which can be opened as usual with Window->Show View... etc

In my activator class how can I find out if it's open and access the instance of it?

like image 522
Johnny Avatar asked Aug 11 '11 16:08

Johnny


1 Answers

Activators are for the lifecycle management of the plugin. The activators are mainly used during the startup and shutdown of the plugin. If its going through the activator, the view is not created already. Can you give some more info on what you are trying to do?

Did you try PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(View.ID);

like image 77
Kathir Avatar answered Sep 27 '22 20:09

Kathir