code: public void init(IWorkbenchWindow window)
  	{
  		setWindow(window);
  
  		IWorkbenchPage page = window.getActivePage();
  		if (page != null)
  		{
  			setPart(page.getActivePart());
  		}
  
  		window.getPartService().addPartListener(this);
  		update();
  	}
docs: IWorkbenchWindowActionDelegate