문제

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