/* (non-Javadoc)
* @see org.eclipse.ui.IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart)
*/
@Override
public void partBroughtToTop(IWorkbenchPart part) {
ILogViewEditor editor = (ILogViewEditor) part.getAdapter(ILogViewEditor.class);
if (editor != null) {
Integer selectedPage = (Integer) editor.getSelectedPage();
updateWidgets(true, selectedPage.intValue(), editor.getPageCount());
updateToolItemIfAvailable();
}
}
/* (non-Javadoc)
* @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
*/
@Override
public void partClosed(IWorkbenchPart part) {
// nadda
}
/* (non-Javadoc)
* @see org.eclipse.ui.IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart)
*/
@Override
public void partDeactivated(IWorkbenchPart part) {
// nadda
}
/* (non-Javadoc)
* @see org.eclipse.ui.IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)
*/
@Override
public void partOpened(IWorkbenchPart part) {
ILogViewEditor editor = (ILogViewEditor) part.getAdapter(ILogViewEditor.class);
if (editor != null) {
editor.addPageChangedListener(new IPageChangedListener() {
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
*/
@Override
public void pageChanged(PageChangedEvent event) {
ILogViewEditor editor = (ILogViewEditor) event.getSource();
Integer selectedPage = (Integer) event.getSelectedPage();
updateWidgets(true, selectedPage.intValue(), editor.getPageCount());
updateToolItemIfAvailable();
}
});
}
}