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

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

In my activator class, how can I find out if it opens and accesses its instance?

+5
source share
1 answer

Activators are designed to control the life cycle of the plugin. Activators are mainly used when starting and stopping the plugin. If it passes through the activator, the view is no longer created. Can you give more information about what you are trying to do?

Have you tried PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(View.ID);

+7
source

All Articles