tags:

views:

18

answers:

1

Hi,

I'm creating an Eclipse plug-in which amongst other things creates a new perspective. I want to I execute some code when the perspective loads. Previously I was doing this through createInitialLayout of IPerspectiveFactory but then I realized that this is for defining the page layout only and is usually called when when launching the perspective for the first time only.

How can I specify some code to execute whenever the perspective is displayed? (e.g. when it is loaded as the default perspective by Eclipse)

Thanks and regards, Krt_Malta

+1  A: 

Check the documentation for the IPerspectiveListener interface or the PerspectiveAdapter class, the perspective lifecycle events are explained there.

Simon Groenewolt
It helped thanks! Actually I was after this: http://stackoverflow.com/questions/2797071/execute-code-when-eclipse-workbench-loads but still helped :)
Krt_Malta