public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { this.viewer = viewer; if (oldInput != null) { IExecutionContext oldContext = (IExecutionContext) oldInput; oldContext.removeExecutionContextListener(this); } if (newInput != null) { IExecutionContext newContext = (IExecutionContext) newInput; newContext.addExecutionContextListener(this); } }