Вопрос

I am creating currently an eclipse-plugin that has both an editor and a view, both shell display the same data from an EMF Model... So now my wish is that everytime you change the opened file in the editor, the ViewPart refreshes, too... I have already in the init() function of my editor a call to a method of my view that refresh() its viewer... Problem is just that init() is only called when you open the file. But when you have 2 or more files opened at the same time and you switch between them, init() is not called, so my view doesnt refresh... Anybody a solution for that?

Best regards, Anton

Это было полезно?

Решение

Just override the setFocus() method of your editor. It will be called each time a switch to an opened file occurs.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top